WSF
WsfL16::Messages::InitialBase Class Referenceabstract

#include <Messages.hpp>

Inheritance diagram for WsfL16::Messages::InitialBase:
Collaboration diagram for WsfL16::Messages::InitialBase:

Public Member Functions

virtual InitialBaseClone () const =0
 ~InitialBase () override=default
 InitialBase (const InitialBase &aSrc)
const InitialBaseoperator= (const InitialBase &aRhs)=delete
WordType GetWordType () const override
 Returns the base type of the word.
size_t GetMessageLength () const
 Returns the number of extra words in the message.
virtual void GetLabel (int &aLabel, int &aSubLabel) const =0
bool IsLabelEqual (int aLabel, int aSublabel) const
int GetLabel () const
int GetSubLabel () const
BaseGetSubWord (int index) const
 Returns the sub-word with the given index number.
ContinuationBaseGetContinuation (int aIndex)
const ContinuationBaseGetContinuation (int aIndex) const
size_t GetContinuationCount () const
ContinuationBaseFindContinuation (int aContinuation) const
size_t GetExtensionCount () const
ExtensionBaseGetExtension (int aIndex) const
ContinuationBaseAddContinuationWord (int aWordNumber)
ExtensionBaseAddExtensionWord (int aWordNumber)
void InsertContinuationWord (std::unique_ptr< ContinuationBase >)
 Inserts a new Continuation word into this word.
void InsertExtensionWord (std::unique_ptr< ExtensionBase >)
 Inserts a new Extension word into this word.
const HeaderGetHeader () const
HeaderGetHeader ()
void WriteMessage (MessageBitOutput &aMW, bool aWriteHeader=true) const
virtual std::unique_ptr< ContinuationBaseCreateContinuationWord (int label)=0
 Adds a Continuation word with the given label to this message.
virtual std::unique_ptr< ExtensionBaseCreateExtensionWord (int aExtensionBaseNumber)=0
 Adds an Extension word with the given ExtensionBase number to this message.
std::string GetClassName () const override
 Returns the human-readable class name for the Initial word.
void PrintMessage (ut::log::MessageStream &aStream) const
Public Member Functions inherited from WsfL16::Messages::Base
 Base (char *aData)
 Base ()
virtual ~Base ()
virtual int GetUID () const =0
 Returns the unique identifier of a message word type.
virtual void TransferI (MessageBitInput &aMR)=0
 Reads the message from a MessageBitInput.
virtual void TransferO (MessageBitOutput &aMW)=0
 Reads the message from a MessageBitOutput.
virtual void CreateAccessor (MessageAccessorFiller &aMP)=0
 Used once to provide generic access to messages and fields.
virtual const char * GetFieldName (int i)=0
 Returns the name of the field with a given index.
void PrintWord (ut::log::MessageStream &aStream) const

Protected Member Functions

 InitialBase ()=default
bool Initialize (const char *aData)
 Initialize the message by reading from the data buffer.

Protected Attributes

std::vector< std::unique_ptr< ContinuationBase > > mContinuationWords
std::vector< std::unique_ptr< ExtensionBase > > mExtensionWords
Header mHeader

Friends

class Factory

Additional Inherited Members

Public Types inherited from WsfL16::Messages::Base
enum  WordType { cINITIAL , cCONTINUATION , cEXTENSION , cUNDEFINED }

Constructor & Destructor Documentation

◆ ~InitialBase()

WsfL16::Messages::InitialBase::~InitialBase ( )
overridedefault

References InitialBase().

◆ InitialBase() [1/2]

WsfL16::Messages::InitialBase::InitialBase ( const InitialBase & aSrc)

◆ InitialBase() [2/2]

WsfL16::Messages::InitialBase::InitialBase ( )
protecteddefault

Member Function Documentation

◆ AddContinuationWord()

◆ AddExtensionWord()

◆ Clone()

virtual InitialBase * WsfL16::Messages::InitialBase::Clone ( ) const
pure virtual

References InitialBase().

◆ CreateContinuationWord()

virtual std::unique_ptr< ContinuationBase > WsfL16::Messages::InitialBase::CreateContinuationWord ( int label)
pure virtual

Adds a Continuation word with the given label to this message.

Referenced by AddContinuationWord().

◆ CreateExtensionWord()

virtual std::unique_ptr< ExtensionBase > WsfL16::Messages::InitialBase::CreateExtensionWord ( int aExtensionBaseNumber)
pure virtual

Adds an Extension word with the given ExtensionBase number to this message.

References GetClassName(), and PrintMessage().

Referenced by AddExtensionWord(), and InsertExtensionWord().

◆ FindContinuation()

ContinuationBase * WsfL16::Messages::InitialBase::FindContinuation ( int aContinuation) const

References mContinuationWords.

Referenced by AddContinuationWord().

◆ GetClassName()

std::string WsfL16::Messages::InitialBase::GetClassName ( ) const
overridevirtual

Returns the human-readable class name for the Initial word.

Implements WsfL16::Messages::Base.

References GetLabel().

Referenced by CreateExtensionWord().

◆ GetContinuation() [1/2]

ContinuationBase * WsfL16::Messages::InitialBase::GetContinuation ( int aIndex)
inline

References mContinuationWords.

◆ GetContinuation() [2/2]

const ContinuationBase * WsfL16::Messages::InitialBase::GetContinuation ( int aIndex) const
inline

References mContinuationWords.

◆ GetContinuationCount()

size_t WsfL16::Messages::InitialBase::GetContinuationCount ( ) const
inline

References mContinuationWords.

◆ GetExtension()

ExtensionBase * WsfL16::Messages::InitialBase::GetExtension ( int aIndex) const
inline

References mExtensionWords.

◆ GetExtensionCount()

size_t WsfL16::Messages::InitialBase::GetExtensionCount ( ) const
inline

References mExtensionWords.

◆ GetHeader() [1/2]

Header & WsfL16::Messages::InitialBase::GetHeader ( )
inline

References mHeader.

◆ GetHeader() [2/2]

const Header & WsfL16::Messages::InitialBase::GetHeader ( ) const
inline

◆ GetLabel() [1/2]

int WsfL16::Messages::InitialBase::GetLabel ( ) const
inline

References GetLabel().

◆ GetLabel() [2/2]

virtual void WsfL16::Messages::InitialBase::GetLabel ( int & aLabel,
int & aSubLabel ) const
pure virtual

◆ GetMessageLength()

size_t WsfL16::Messages::InitialBase::GetMessageLength ( ) const
inline

Returns the number of extra words in the message.

References mContinuationWords, and mExtensionWords.

Referenced by WsfL16::Messages::Factory::ReadMessage(), and WriteMessage().

◆ GetSubLabel()

int WsfL16::Messages::InitialBase::GetSubLabel ( ) const
inline

References GetLabel().

Referenced by WsfL16::MessageSpecialized().

◆ GetSubWord()

Base * WsfL16::Messages::InitialBase::GetSubWord ( int index) const

Returns the sub-word with the given index number.

References WsfL16::Messages::Base::Base(), mContinuationWords, and mExtensionWords.

◆ GetWordType()

WordType WsfL16::Messages::InitialBase::GetWordType ( ) const
inlineoverridevirtual

Returns the base type of the word.

Implements WsfL16::Messages::Base.

References WsfL16::Messages::Base::cINITIAL.

◆ Initialize()

bool WsfL16::Messages::InitialBase::Initialize ( const char * aData)
protected

Initialize the message by reading from the data buffer.

◆ InsertContinuationWord()

void WsfL16::Messages::InitialBase::InsertContinuationWord ( std::unique_ptr< ContinuationBase > aContWord)

Inserts a new Continuation word into this word.

References WsfL16::Messages::ContinuationBase::GetLabel(), GetLabel(), and mContinuationWords.

◆ InsertExtensionWord()

void WsfL16::Messages::InitialBase::InsertExtensionWord ( std::unique_ptr< ExtensionBase > aExtensionWord)

Inserts a new Extension word into this word.

References CreateExtensionWord(), WsfL16::Messages::ExtensionBase::GetExtensionNumber(), and mExtensionWords.

Referenced by AddExtensionWord().

◆ IsLabelEqual()

bool WsfL16::Messages::InitialBase::IsLabelEqual ( int aLabel,
int aSublabel ) const
inline

References GetLabel().

◆ operator=()

const InitialBase & WsfL16::Messages::InitialBase::operator= ( const InitialBase & aRhs)
delete

References InitialBase().

◆ PrintMessage()

void WsfL16::Messages::InitialBase::PrintMessage ( ut::log::MessageStream & aStream) const

◆ WriteMessage()

◆ Factory

friend class Factory
friend

References Factory.

Referenced by Factory.

Member Data Documentation

◆ mContinuationWords

◆ mExtensionWords

std::vector<std::unique_ptr<ExtensionBase> > WsfL16::Messages::InitialBase::mExtensionWords
protected

◆ mHeader

Header WsfL16::Messages::InitialBase::mHeader
protected

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved