torc::generic::Property Class Reference

#include <Property.hpp>

Inheritance diagram for torc::generic::Property:

Inheritance graph
[legend]
Collaboration diagram for torc::generic::Property:

Collaboration graph
[legend]

List of all members.

Public Types

typedef VisitorType< PropertyVisitor

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
const Value getValue () const throw ()
void setValue (const Value &inSource) throw ()
const Unit getUnit () const throw ()
void setUnit (const Unit &inSource) throw ()
const std::string getOwner () const throw ()
void setOwner (const std::string &inSource) throw ()
void getChildren (std::map< std::string, PropertySharedPtr > &outValues) const throw ()
template<typename _Action>
void applyOnAllChildren (const _Action &action) throw (Error)
void setChildren (const std::map< std::string, PropertySharedPtr > &inSource) throw ()
bool addChildProperty (const std::string &inName, const PropertySharedPtr &inProperty) throw ()

Private Attributes

std::string mOwner
Unit mUnit
Value mValue
SymTab< std::string,
PropertySharedPtr > 
mChildren

Friends

class FactoryType< Property >

Classes

class  Factory


Detailed Description

Represents an EDIF property. EDIF supports placing of simple and nested properties on different objects.

Definition at line 50 of file Property.hpp.


Member Function Documentation

void torc::generic::Property::accept ( BaseVisitor inoutVisitor  )  throw (Error) [virtual]

Recive a inoutVisitor to this class. The visit method of the inoutVisitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This sitation can arise when the passed Visitor object does not inherit from the appropriate inoutVisitor specialization. See Visitor documentation for more details.

Parameters:
[in,out] inoutVisitor A reference to the inoutVisitor object
Exceptions:
Error Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method.

Implements torc::generic::Visitable.

Definition at line 37 of file Property.cpp.

const Value torc::generic::Property::getValue (  )  const throw () [inline]

Get the Property inSource.

Returns:
Value of property.

Definition at line 206 of file Property.hpp.

void torc::generic::Property::setValue ( const Value inSource  )  throw ()

Set the Property inSource.

Parameters:
[in] inSource Value of property.

Definition at line 66 of file Property.cpp.

const Unit torc::generic::Property::getUnit (  )  const throw () [inline]

Get the Unit inSource.

Returns:
Unit of property.

Definition at line 216 of file Property.hpp.

void torc::generic::Property::setUnit ( const Unit inSource  )  throw ()

Set the Property inSource unit.

Parameters:
[in] inSource Unit of property.

Definition at line 76 of file Property.cpp.

const std::string torc::generic::Property::getOwner (  )  const throw () [inline]

Get the owner/source of this property.

Returns:
string Owner of this property

Definition at line 226 of file Property.hpp.

void torc::generic::Property::setOwner ( const std::string &  inSource  )  throw ()

Set the owner/source of this property.

Parameters:
[in] inSource Owner of this property

Definition at line 86 of file Property.cpp.

void torc::generic::Property::getChildren ( std::map< std::string, PropertySharedPtr > &  outValues  )  const throw () [inline]

Get the nested properties.

Returns:
map Containing properties
Get the nested properties.

Parameters:
[out] outValues map Containing properties

Definition at line 236 of file Property.hpp.

template<typename _Action>
void torc::generic::Property::applyOnAllChildren ( const _Action &  action  )  throw (Error) [inline]

Apply action on all children.

Parameters:
[in] action Action to be applied

Definition at line 243 of file Property.hpp.

void torc::generic::Property::setChildren ( const std::map< std::string, PropertySharedPtr > &  inSource  )  throw ()

Set the nested properties.

Parameters:
[in] inSource Map containing properties

Definition at line 96 of file Property.cpp.

bool torc::generic::Property::addChildProperty ( const std::string &  inName,
const PropertySharedPtr &  inProperty 
) throw ()

Add a nested property to this property

Parameters:
[in] inName Nested property name
[in] inProperty Nested property

Definition at line 113 of file Property.cpp.


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

Generated on Thu Oct 13 16:50:20 2011 for TORC by  doxygen 1.5.6