MADARA  3.1.8
madara::knowledge::VariableReference Class Reference

Optimized reference to a variable within the knowledge base. More...

#include <VariableReference.h>

Collaboration diagram for madara::knowledge::VariableReference:

Public Member Functions

 VariableReference ()
 Default constructor. More...
 
 VariableReference (const VariableReference &rhs)
 Copy Constructor. More...
 
 ~VariableReference ()
 Destructor. More...
 
const char * get_name (void) const
 Returns the name of the variable. More...
 
bool is_valid (void) const
 Checks to see if the variable reference has been initialized. More...
 
bool operator!= (const VariableReference &rhs) const
 Inequality operator. More...
 
void operator= (const VariableReference &input)
 Assignment operator. More...
 
bool operator== (const VariableReference &rhs) const
 Equality operator. More...
 

Private Member Functions

void set_name (const std::string &name)
 Sets the name of the variable. More...
 

Private Attributes

utility::ScopedArray< const char > name_
 potential string value of the node (size int) More...
 
knowledge::KnowledgeRecordrecord_
 Reference to knowledge record. More...
 

Friends

class KnowledgeBaseImpl
 
class rcw::BaseTracker
 
class ThreadSafeContext
 
class Variables
 

Detailed Description

Optimized reference to a variable within the knowledge base.

Definition at line 35 of file VariableReference.h.

Constructor & Destructor Documentation

madara::knowledge::VariableReference::VariableReference ( )

Default constructor.

Definition at line 5 of file VariableReference.cpp.

madara::knowledge::VariableReference::VariableReference ( const VariableReference rhs)

Copy Constructor.

Parameters
rhsvariable reference to copy from

Definition at line 11 of file VariableReference.cpp.

madara::knowledge::VariableReference::~VariableReference ( )

Destructor.

Definition at line 17 of file VariableReference.cpp.

Member Function Documentation

const char * madara::knowledge::VariableReference::get_name ( void  ) const
inline

Returns the name of the variable.

Returns
the name of the referenced variable

Definition at line 13 of file VariableReference.inl.

bool madara::knowledge::VariableReference::is_valid ( void  ) const
inline

Checks to see if the variable reference has been initialized.

Returns
true if valid, false otherwise

Definition at line 31 of file VariableReference.inl.

bool madara::knowledge::VariableReference::operator!= ( const VariableReference rhs) const

Inequality operator.

Parameters
rhsvariable reference to compare to

Definition at line 40 of file VariableReference.cpp.

void madara::knowledge::VariableReference::operator= ( const VariableReference input)

Assignment operator.

Parameters
inputvariable reference to copy from

Definition at line 22 of file VariableReference.cpp.

bool madara::knowledge::VariableReference::operator== ( const VariableReference rhs) const

Equality operator.

Parameters
rhsvariable reference to compare to

Definition at line 33 of file VariableReference.cpp.

void madara::knowledge::VariableReference::set_name ( const std::string &  name)
inlineprivate

Sets the name of the variable.

Parameters
namethe name of the variable

Definition at line 19 of file VariableReference.inl.

Friends And Related Function Documentation

friend class KnowledgeBaseImpl
friend

Definition at line 39 of file VariableReference.h.

friend class rcw::BaseTracker
friend

Definition at line 41 of file VariableReference.h.

friend class ThreadSafeContext
friend

Definition at line 38 of file VariableReference.h.

friend class Variables
friend

Definition at line 40 of file VariableReference.h.

Member Data Documentation

utility::ScopedArray<const char> madara::knowledge::VariableReference::name_
private

potential string value of the node (size int)

Definition at line 100 of file VariableReference.h.

knowledge::KnowledgeRecord* madara::knowledge::VariableReference::record_
private

Reference to knowledge record.

Definition at line 105 of file VariableReference.h.


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