MXADataRecord Class Reference

This class holds the required and any extended information about a data record. Data records can have any number of children but only one parent. More...

Inherits IDataRecord.

Inheritance diagram for MXADataRecord:

Inheritance graph
[legend]
Collaboration diagram for MXADataRecord:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< MXADataRecord::Pointer > MXADataRecords

Public Member Functions

 MXA_SHARED_POINTERS (MXADataRecord)
 MXA_TYPE_MACRO (MXADataRecord)
virtual ~MXADataRecord ()
 Destructor.
void setRecordName (std::string aValue)
 Setter for property name.
std::string getRecordName ()
 Getter for property name.
void setAltName (std::string aValue)
 Setter for property altName.
std::string getAltName ()
 Getter for property altName.
int32 getLuid ()
 Getter for property luid.
void setGuid (int32 aValue)
 Setter for property guid.
int32 getGuid ()
 Getter for property guid.
void setLuid (int32 aValue)
 Setter for property luid.
std::string generatePath ()
 Generates the path to this data record in terms of an internal HDF path.
std::string generateParentPath ()
 Generates the internal HDF5 path only to this records parent.
int32 writeRecord (IDataRecordWriter *writer)
 Writes this data record using the provided IDataRecordWriter implementation.
bool isValid (std::string &message)
 Checks some basic properties of the model to make sure they are set correctly.
void setUniqueId (int32 aValue)
 Setter for property guid.
int32 getUniqueId ()
 Getter for property guid.
void resetGUIDValue ()
 Resets the GUID value for this node.
void setParent (IDataRecord::WeakPointer parent)
 Accessor for Parent iVar.
IDataRecord::WeakPointer getParent ()
 Returns the Parent Node.
int32 getNumChildren () const
 Returns the number of Children of this node.
bool hasChildren () const
 Returns TRUE if this node has children.
void addChild (IDataRecord::Pointer child)
 Adds a child to this node.
void removeChild (int index)
 Removes a child from this node.
void removeChild (IDataRecord *child)
 Removes the given child from this node.
void removeAllChildren ()
 Removes all the children of this Data Record.
int32 indexOfChild (IDataRecord *child)
 Returns the index of a specific child.
IDataRecord::Pointer getChildAt (int32 index)
 Returns a specific child of this node based on a given index.
IDataRecord::ContainergetChildren ()
 Returns a reference to the children of this node.
void printDataRecordTree (int32 depth=0)
 prints the node and the children of this node
virtual void printDataRecord (std::ostream &os, int32 indentSize=0)
 prints the node and the children of this node
void _setWeakPtr (IDataRecord::WeakPointer weakPtr)

Static Public Member Functions

static void generateLUT (IDataRecord::LookupTable &lut, IDataRecord::Container &nodes)
 Creates a flat look up table using the GUID of the data record as the key and the boost::Shared_ptr as the value.
static Pointer New (int luid, std::string name, std::string altName)
 Used to create a new MXANode.
static Pointer New (IDataRecord::Pointer rec)
 Creates a copy of the IDataRecord object which will NOT share any data with the original object.
static int32 nextGUIDValue ()

Protected Member Functions

 MXADataRecord ()

Protected Attributes

int32 _luid
std::string _recordName
std::string _altName
std::string _nodeName
int32 _uniqueId
IDataRecord::WeakPointer _selfPtr
IDataRecord::WeakPointer _parent
IDataRecord::Container _children

Private Member Functions

 MXADataRecord (const MXADataRecord &)
void operator= (const MXADataRecord &)

Static Private Attributes

static int32 _uniqueGUIDValue

Detailed Description

This class holds the required and any extended information about a data record. Data records can have any number of children but only one parent.

Author:
Mike Jackson
Date:
March 2007
Version:
1.2


Member Typedef Documentation

typedef std::vector<MXADataRecord::Pointer> MXADataRecord::MXADataRecords


Constructor & Destructor Documentation

MXADataRecord::~MXADataRecord (  )  [virtual]

Destructor.

MXADataRecord::MXADataRecord (  )  [protected]

MXADataRecord::MXADataRecord ( const MXADataRecord  )  [private]


Member Function Documentation

MXADataRecord::MXA_SHARED_POINTERS ( MXADataRecord   ) 

MXADataRecord::MXA_TYPE_MACRO ( MXADataRecord   ) 

void MXADataRecord::generateLUT ( IDataRecord::LookupTable lut,
IDataRecord::Container nodes 
) [static]

Creates a flat look up table using the GUID of the data record as the key and the boost::Shared_ptr as the value.

Parameters:
lut The look up table to be populated.
nodes The IDataRecord::Container to use as the tree

MXADataRecord::Pointer MXADataRecord::New ( int  luid,
std::string  name,
std::string  altName 
) [static]

Used to create a new MXANode.

Parameters:
luid The local unique Id for this record
name The Name of this node
altName The Alternate name for the Data Record.
Returns:
A Boost SharedPointer to the MXANode Object

static Pointer MXADataRecord::New ( IDataRecord::Pointer  rec  )  [inline, static]

Creates a copy of the IDataRecord object which will NOT share any data with the original object.

Parameters:
rec IDataRecord to copy

void MXADataRecord::setRecordName ( std::string  aValue  )  [inline, virtual]

Setter for property name.

Parameters:
aValue The new value to set for property name

Implements IDataRecord.

std::string MXADataRecord::getRecordName (  )  [inline, virtual]

Getter for property name.

Returns:
The value of name

Implements IDataRecord.

void MXADataRecord::setAltName ( std::string  aValue  )  [inline, virtual]

Setter for property altName.

Parameters:
aValue The new value to set for property altName

Implements IDataRecord.

std::string MXADataRecord::getAltName (  )  [inline, virtual]

Getter for property altName.

Returns:
The value of altName

Implements IDataRecord.

int32 MXADataRecord::getLuid (  )  [inline, virtual]

Getter for property luid.

Returns:
The value of luid

Implements IDataRecord.

void MXADataRecord::setGuid ( int32  aValue  )  [inline, virtual]

Setter for property guid.

Parameters:
aValue The new value to set for property guid

Implements IDataRecord.

int32 MXADataRecord::getGuid (  )  [inline, virtual]

Getter for property guid.

Returns:
The value of guid

Implements IDataRecord.

void MXADataRecord::setLuid ( int32  aValue  )  [inline, virtual]

Setter for property luid.

Parameters:
aValue The new value to set for property luid

Implements IDataRecord.

std::string MXADataRecord::generatePath (  )  [virtual]

Generates the path to this data record in terms of an internal HDF path.

Implements IDataRecord.

std::string MXADataRecord::generateParentPath (  )  [virtual]

Generates the internal HDF5 path only to this records parent.

Implements IDataRecord.

int32 MXADataRecord::writeRecord ( IDataRecordWriter writer  )  [virtual]

Writes this data record using the provided IDataRecordWriter implementation.

Parameters:
writer The IDataRecordWriter object to use to write this data record

Implements IDataRecord.

bool MXADataRecord::isValid ( std::string &  message  )  [virtual]

Checks some basic properties of the model to make sure they are set correctly.

Parameters:
message String to hold messages concerning errors/omissions from the model
Returns:
True if the model passes the basic checks

Implements IDataRecord.

void MXADataRecord::setUniqueId ( int32  aValue  )  [inline, virtual]

Setter for property guid.

Parameters:
aValue The new value to set for property guid

Implements IDataRecord.

int32 MXADataRecord::getUniqueId (  )  [inline, virtual]

Getter for property guid.

Returns:
The value of guid

Implements IDataRecord.

void MXADataRecord::resetGUIDValue (  )  [virtual]

Resets the GUID value for this node.

Implements IDataRecord.

int32 MXADataRecord::nextGUIDValue (  )  [static]

void MXADataRecord::setParent ( IDataRecord::WeakPointer  parent  )  [virtual]

Accessor for Parent iVar.

Implements IDataRecord.

IDataRecord::WeakPointer MXADataRecord::getParent (  )  [virtual]

Returns the Parent Node.

Implements IDataRecord.

int32 MXADataRecord::getNumChildren (  )  const [virtual]

Returns the number of Children of this node.

Implements IDataRecord.

bool MXADataRecord::hasChildren (  )  const [virtual]

Returns TRUE if this node has children.

Implements IDataRecord.

void MXADataRecord::addChild ( IDataRecord::Pointer  child  )  [virtual]

Adds a child to this node.

Parameters:
child The child to add to this node

Implements IDataRecord.

void MXADataRecord::removeChild ( int  index  )  [virtual]

Removes a child from this node.

Parameters:
index The index of the child to remove

Implements IDataRecord.

void MXADataRecord::removeChild ( IDataRecord child  )  [virtual]

Removes the given child from this node.

Parameters:
child The child to remove

Implements IDataRecord.

void MXADataRecord::removeAllChildren (  )  [virtual]

Removes all the children of this Data Record.

Implements IDataRecord.

int32 MXADataRecord::indexOfChild ( IDataRecord child  )  [virtual]

Returns the index of a specific child.

Parameters:
child The child object whose index we are interested in

Implements IDataRecord.

IDataRecord::Pointer MXADataRecord::getChildAt ( int32  index  )  [virtual]

Returns a specific child of this node based on a given index.

Parameters:
index The index of the child to return
Returns:
The index of the child

Implements IDataRecord.

IDataRecord::Container & MXADataRecord::getChildren (  )  [virtual]

Returns a reference to the children of this node.

Implements IDataRecord.

void MXADataRecord::printDataRecordTree ( int32  depth = 0  )  [virtual]

prints the node and the children of this node

Parameters:
depth The amount of indentation space

Implements IDataRecord.

void MXADataRecord::printDataRecord ( std::ostream &  os,
int32  indentSize = 0 
) [virtual]

prints the node and the children of this node

Parameters:
os An ostream to print the node to
indentSize The amount of indentation space

Implements IDataRecord.

void MXADataRecord::_setWeakPtr ( IDataRecord::WeakPointer  weakPtr  ) 

void MXADataRecord::operator= ( const MXADataRecord  )  [private]


Member Data Documentation

int32 MXADataRecord::_uniqueGUIDValue [static, private]

int32 MXADataRecord::_luid [protected]

std::string MXADataRecord::_recordName [protected]

std::string MXADataRecord::_altName [protected]

std::string MXADataRecord::_nodeName [protected]

int32 MXADataRecord::_uniqueId [protected]

IDataRecord::WeakPointer MXADataRecord::_selfPtr [protected]

IDataRecord::WeakPointer MXADataRecord::_parent [protected]

IDataRecord::Container MXADataRecord::_children [protected]


The documentation for this class was generated from the following files:
Generated on Tue Nov 17 18:43:15 2009 for MXADataModel by  doxygen 1.5.2