ISAAC  0.2.11
Flight software for the ISAAC project, adding functionality to the Astrobee robot, operating inside the International Space Station.
All Classes Functions Variables Pages
happly::Property Class Referenceabstract

A generic property, which is associated with some element. Can be plain Property or a ListProperty, of some type. Generally, the user should not need to interact with these directly, but they are exposed in case someone wants to get clever. More...

#include <happly.h>

Inheritance diagram for happly::Property:

Public Member Functions

 Property (const std::string &name_)
 Create a new Property with the given name. More...
 
virtual void reserve (size_t capacity)=0
 Reserve memory. More...
 
virtual void parseNext (const std::vector< std::string > &tokens, size_t &currEntry)=0
 (ASCII reading) Parse out the next value of this property from a list of tokens. More...
 
virtual void readNext (std::istream &stream)=0
 (binary reading) Copy the next value of this property from a stream of bits. More...
 
virtual void readNextBigEndian (std::istream &stream)=0
 (binary reading) Copy the next value of this property from a stream of bits. More...
 
virtual void writeHeader (std::ostream &outStream)=0
 (reading) Write a header entry for this property. More...
 
virtual void writeDataASCII (std::ostream &outStream, size_t iElement)=0
 (ASCII writing) write this property for some element to a stream in plaintext More...
 
virtual void writeDataBinary (std::ostream &outStream, size_t iElement)=0
 (binary writing) copy the bits of this property for some element to a stream More...
 
virtual void writeDataBinaryBigEndian (std::ostream &outStream, size_t iElement)=0
 (binary writing) copy the bits of this property for some element to a stream More...
 
virtual size_t size ()=0
 Number of element entries for this property. More...
 
virtual std::string propertyTypeName ()=0
 A string naming the type of the property. More...
 

Public Attributes

std::string name
 

Detailed Description

A generic property, which is associated with some element. Can be plain Property or a ListProperty, of some type. Generally, the user should not need to interact with these directly, but they are exposed in case someone wants to get clever.

Constructor & Destructor Documentation

◆ Property()

happly::Property::Property ( const std::string &  name_)
inline

Create a new Property with the given name.

Parameters
name_

Member Function Documentation

◆ parseNext()

virtual void happly::Property::parseNext ( const std::vector< std::string > &  tokens,
size_t &  currEntry 
)
pure virtual

(ASCII reading) Parse out the next value of this property from a list of tokens.

Parameters
tokensThe list of property tokens for the element.
currEntryIndex in to tokens, updated after this property is read.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ propertyTypeName()

virtual std::string happly::Property::propertyTypeName ( )
pure virtual

A string naming the type of the property.

Returns

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ readNext()

virtual void happly::Property::readNext ( std::istream &  stream)
pure virtual

(binary reading) Copy the next value of this property from a stream of bits.

Parameters
streamStream to read from.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ readNextBigEndian()

virtual void happly::Property::readNextBigEndian ( std::istream &  stream)
pure virtual

(binary reading) Copy the next value of this property from a stream of bits.

Parameters
streamStream to read from.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ reserve()

virtual void happly::Property::reserve ( size_t  capacity)
pure virtual

Reserve memory.

Parameters
capacityExpected number of elements.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ size()

virtual size_t happly::Property::size ( )
pure virtual

Number of element entries for this property.

Returns

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ writeDataASCII()

virtual void happly::Property::writeDataASCII ( std::ostream &  outStream,
size_t  iElement 
)
pure virtual

(ASCII writing) write this property for some element to a stream in plaintext

Parameters
outStreamStream to write to.
iElementindex of the element to write.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ writeDataBinary()

virtual void happly::Property::writeDataBinary ( std::ostream &  outStream,
size_t  iElement 
)
pure virtual

(binary writing) copy the bits of this property for some element to a stream

Parameters
outStreamStream to write to.
iElementindex of the element to write.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ writeDataBinaryBigEndian()

virtual void happly::Property::writeDataBinaryBigEndian ( std::ostream &  outStream,
size_t  iElement 
)
pure virtual

(binary writing) copy the bits of this property for some element to a stream

Parameters
outStreamStream to write to.
iElementindex of the element to write.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.

◆ writeHeader()

virtual void happly::Property::writeHeader ( std::ostream &  outStream)
pure virtual

(reading) Write a header entry for this property.

Parameters
outStreamStream to write to.

Implemented in happly::TypedListProperty< T >, and happly::TypedProperty< T >.


The documentation for this class was generated from the following file: