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::TypedProperty< T > Class Template Reference

A property which takes a single value (not a list). More...

#include <happly.h>

Inheritance diagram for happly::TypedProperty< T >:
Collaboration diagram for happly::TypedProperty< T >:

Public Member Functions

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

Public Attributes

std::vector< T > data
 The actual data contained in the property.
 
- Public Attributes inherited from happly::Property
std::string name
 

Detailed Description

template<class T>
class happly::TypedProperty< T >

A property which takes a single value (not a list).

Constructor & Destructor Documentation

◆ TypedProperty() [1/2]

template<class T >
happly::TypedProperty< T >::TypedProperty ( const std::string &  name_)
inline

Create a new Property with the given name.

Parameters
name_

◆ TypedProperty() [2/2]

template<class T >
happly::TypedProperty< T >::TypedProperty ( const std::string &  name_,
const std::vector< T > &  data_ 
)
inline

Create a new property and initialize with data.

Parameters
name_
data_

Member Function Documentation

◆ parseNext()

template<class T >
virtual void happly::TypedProperty< T >::parseNext ( const std::vector< std::string > &  tokens,
size_t &  currEntry 
)
inlineoverridevirtual

(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.

Implements happly::Property.

◆ propertyTypeName()

template<class T >
virtual std::string happly::TypedProperty< T >::propertyTypeName ( )
inlineoverridevirtual

A string naming the type of the property.

Returns

Implements happly::Property.

◆ readNext()

template<class T >
virtual void happly::TypedProperty< T >::readNext ( std::istream &  stream)
inlineoverridevirtual

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

Parameters
streamStream to read from.

Implements happly::Property.

◆ readNextBigEndian()

template<class T >
virtual void happly::TypedProperty< T >::readNextBigEndian ( std::istream &  stream)
inlineoverridevirtual

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

Parameters
streamStream to read from.

Implements happly::Property.

◆ reserve()

template<class T >
virtual void happly::TypedProperty< T >::reserve ( size_t  capacity)
inlineoverridevirtual

Reserve memory.

Parameters
capacityExpected number of elements.

Implements happly::Property.

◆ size()

template<class T >
virtual size_t happly::TypedProperty< T >::size ( )
inlineoverridevirtual

Number of element entries for this property.

Returns

Implements happly::Property.

◆ writeDataASCII()

template<class T >
virtual void happly::TypedProperty< T >::writeDataASCII ( std::ostream &  outStream,
size_t  iElement 
)
inlineoverridevirtual

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

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

Implements happly::Property.

◆ writeDataBinary()

template<class T >
virtual void happly::TypedProperty< T >::writeDataBinary ( std::ostream &  outStream,
size_t  iElement 
)
inlineoverridevirtual

(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.

Implements happly::Property.

◆ writeDataBinaryBigEndian()

template<class T >
virtual void happly::TypedProperty< T >::writeDataBinaryBigEndian ( std::ostream &  outStream,
size_t  iElement 
)
inlineoverridevirtual

(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.

Implements happly::Property.

◆ writeHeader()

template<class T >
virtual void happly::TypedProperty< T >::writeHeader ( std::ostream &  outStream)
inlineoverridevirtual

(reading) Write a header entry for this property.

Parameters
outStreamStream to write to.

Implements happly::Property.


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