OpenJAUS SAE SDK  6.0.0
Public Member Functions | Protected Attributes | Friends | List of all members
openjaus::model::fields::MessageField Class Reference

#include <MessageField.h>

Inherits openjaus::model::fields::Field, and openjaus::system::Transportable.

Public Member Functions

 MessageField ()
 
virtual ~MessageField ()
 
model::MessagegetMessage () const
 Accessor to get the value of message. More...
 
bool setMessage (model::Message *message)
 Accessor to set value of message. More...
 
const system::BuffergetBuffer () const
 Accessor to get the value of buffer. More...
 
bool setBuffer (const system::Buffer &buffer)
 Accessor to set value of buffer. More...
 
virtual uint64 to (system::BufferWriter &dst) const
 Serializes the contents of this object into the Buffer connected to the provided BufferWriter. More...
 
virtual uint64 from (system::BufferReader &src)
 Deserializes the contents the Buffer connected to the provided BufferReader into this object. More...
 
virtual uint64 length () const
 Gets the serialized length of this object. More...
 
virtual std::string toString () const
 
std::string toXml (unsigned char level=0) const
 
void copy (model::Message *source)
 
- Public Member Functions inherited from openjaus::model::fields::Field
 Field ()
 
virtual ~Field ()
 
std::string getName () const
 Accessor to get the value of name. More...
 
bool setName (std::string name)
 Accessor to set value of name. More...
 
- Public Member Functions inherited from openjaus::system::Transportable
 Transportable ()
 
virtual ~Transportable ()
 

Protected Attributes

model::Messagemessage
 
system::Buffer buffer
 
- Protected Attributes inherited from openjaus::model::fields::Field
std::string name
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const MessageField &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const MessageField *object)
 

Constructor & Destructor Documentation

◆ MessageField()

openjaus::model::fields::MessageField::MessageField ( )

◆ ~MessageField()

openjaus::model::fields::MessageField::~MessageField ( )
virtual

Member Function Documentation

◆ copy()

void openjaus::model::fields::MessageField::copy ( model::Message source)

◆ from()

uint64 openjaus::model::fields::MessageField::from ( system::BufferReader src)
virtual

Deserializes the contents the Buffer connected to the provided BufferReader into this object. The BufferReader position will be advanced inside this method such that calling from() again will attempt to read the next Transportable object from the Buffer.

Parameters
src

Implements openjaus::system::Transportable.

◆ getBuffer()

const system::Buffer & openjaus::model::fields::MessageField::getBuffer ( ) const

◆ getMessage()

model::Message * openjaus::model::fields::MessageField::getMessage ( ) const

◆ length()

uint64 openjaus::model::fields::MessageField::length ( ) const
virtual

◆ setBuffer()

bool openjaus::model::fields::MessageField::setBuffer ( const system::Buffer buffer)
Parameters
bufferThe value of the new buffer.

◆ setMessage()

bool openjaus::model::fields::MessageField::setMessage ( model::Message message)
Parameters
messageThe value of the new message.

◆ to()

uint64 openjaus::model::fields::MessageField::to ( system::BufferWriter dst) const
virtual

Serializes the contents of this object into the Buffer connected to the provided BufferWriter. The BufferWriter position will be advanced inside this method such that calling to() again will write the Transportable object into the Buffer a second time.

Parameters
dst

Implements openjaus::system::Transportable.

◆ toString()

std::string openjaus::model::fields::MessageField::toString ( ) const
virtual

Reimplemented from openjaus::model::fields::Field.

◆ toXml()

std::string openjaus::model::fields::MessageField::toXml ( unsigned char  level = 0) const

Friends And Related Function Documentation

◆ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const MessageField object 
)
friend

◆ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const MessageField object 
)
friend

Member Data Documentation

◆ buffer

system::Buffer openjaus::model::fields::MessageField::buffer
protected

◆ message

model::Message* openjaus::model::fields::MessageField::message
protected

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