OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
GuardEncoding Class Reference

#include <GuardEncoding.hh>

Inheritance diagram for GuardEncoding:
Inheritance graph
Collaboration diagram for GuardEncoding:
Collaboration graph

Public Member Functions

virtual ~GuardEncoding ()
 
GuardFieldparent () const
 
bool isGuardInverted () const
 
unsigned int encoding () const
 
virtual ObjectStatesaveState () const
 

Static Public Attributes

static const std::string OSNAME_GUARD_ENCODING = "guard_encoding"
 ObjectState name for guard encoding.
 
static const std::string OSKEY_INVERTED = "inverted"
 ObjectState attribute key for invert flag.
 
static const std::string OSKEY_ENCODING = "encoding"
 ObjectState attribute key for encoding.
 

Protected Member Functions

 GuardEncoding (bool inverted, unsigned int encoding)
 
 GuardEncoding (const ObjectState *state)
 
void setParent (GuardField *parent)
 

Private Attributes

bool inverted_
 The "invert" flag.
 
unsigned int encoding_
 The encoding.
 
GuardFieldparent_
 The parent guard field.
 

Detailed Description

GuardEncoding class captures the properties shared by all types of guard encoding.

Definition at line 45 of file GuardEncoding.hh.

Constructor & Destructor Documentation

◆ ~GuardEncoding()

GuardEncoding::~GuardEncoding ( )
virtual

The destructor

Definition at line 80 of file GuardEncoding.cc.

80 {
81}

◆ GuardEncoding() [1/2]

GuardEncoding::GuardEncoding ( bool  inverted,
unsigned int  encoding 
)
protected

The constructor.

Parameters
invertedThe "invert" flag.
encodingThe control code.

Definition at line 51 of file GuardEncoding.cc.

51 :
52 inverted_(inverted), encoding_(encoding), parent_(NULL) {
53}
GuardField * parent_
The parent guard field.
unsigned int encoding() const
unsigned int encoding_
The encoding.
bool inverted_
The "invert" flag.

◆ GuardEncoding() [2/2]

GuardEncoding::GuardEncoding ( const ObjectState state)
protected

The constructor.

Loads the state of the object from the given ObjectState instance.

Parameters
stateThe ObjectState instance.
Exceptions
ObjectStateLoadingExceptionIf an error occurs while loading the state.

Definition at line 65 of file GuardEncoding.cc.

66 : inverted_(false), encoding_(0), parent_(NULL) {
67 try {
70 } catch (const Exception& exception) {
71 const string procName = "GuardEncoding::GuardEncoding";
73 __FILE__, __LINE__, procName, exception.errorMessage());
74 }
75}
std::string errorMessage() const
Definition Exception.cc:123
static const std::string OSKEY_INVERTED
ObjectState attribute key for invert flag.
static const std::string OSKEY_ENCODING
ObjectState attribute key for encoding.
bool boolAttribute(const std::string &name) const
int intAttribute(const std::string &name) const

References ObjectState::boolAttribute(), encoding_, Exception::errorMessage(), ObjectState::intAttribute(), inverted_, OSKEY_ENCODING, and OSKEY_INVERTED.

Here is the call graph for this function:

Member Function Documentation

◆ encoding()

unsigned int GuardEncoding::encoding ( ) const

◆ isGuardInverted()

bool GuardEncoding::isGuardInverted ( ) const

◆ parent()

GuardField * GuardEncoding::parent ( ) const

◆ saveState()

ObjectState * GuardEncoding::saveState ( ) const
virtual

Saves the state of the object to an ObjectState instance.

Returns
The newly created ObjectState instance.

Reimplemented in FUGuardEncoding, GPRGuardEncoding, and UnconditionalGuardEncoding.

Definition at line 123 of file GuardEncoding.cc.

123 {
127 return state;
128}
static const std::string OSNAME_GUARD_ENCODING
ObjectState name for guard encoding.
bool isGuardInverted() const
void setAttribute(const std::string &name, const std::string &value)

References encoding(), isGuardInverted(), OSKEY_ENCODING, OSKEY_INVERTED, OSNAME_GUARD_ENCODING, and ObjectState::setAttribute().

Referenced by FUGuardEncoding::saveState(), GPRGuardEncoding::saveState(), and UnconditionalGuardEncoding::saveState().

Here is the call graph for this function:

◆ setParent()

void GuardEncoding::setParent ( GuardField parent)
protected

Member Data Documentation

◆ encoding_

unsigned int GuardEncoding::encoding_
private

The encoding.

Definition at line 71 of file GuardEncoding.hh.

Referenced by encoding(), and GuardEncoding().

◆ inverted_

bool GuardEncoding::inverted_
private

The "invert" flag.

Definition at line 69 of file GuardEncoding.hh.

Referenced by GuardEncoding(), and isGuardInverted().

◆ OSKEY_ENCODING

const std::string GuardEncoding::OSKEY_ENCODING = "encoding"
static

ObjectState attribute key for encoding.

Definition at line 60 of file GuardEncoding.hh.

Referenced by GuardEncoding(), BEMSerializer::guardFieldToFile(), BEMSerializer::guardFieldToOM(), and saveState().

◆ OSKEY_INVERTED

const std::string GuardEncoding::OSKEY_INVERTED = "inverted"
static

ObjectState attribute key for invert flag.

Definition at line 58 of file GuardEncoding.hh.

Referenced by GuardEncoding(), BEMSerializer::guardFieldToFile(), BEMSerializer::guardFieldToOM(), and saveState().

◆ OSNAME_GUARD_ENCODING

const std::string GuardEncoding::OSNAME_GUARD_ENCODING = "guard_encoding"
static

ObjectState name for guard encoding.

Definition at line 56 of file GuardEncoding.hh.

Referenced by saveState().

◆ parent_

GuardField* GuardEncoding::parent_
private

The parent guard field.

Definition at line 73 of file GuardEncoding.hh.

Referenced by parent(), and setParent().


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