All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
openfluid::fluidx::AdvancedDomainDescriptor Class Reference

#include <fluidx/AdvancedDomainDescriptor.hpp>

List of all members.

Public Types

typedef std::map< std::string,
std::map< int,
AdvancedUnitDescriptor > > 
UnitsByIdByClass_t

Public Member Functions

 AdvancedDomainDescriptor (openfluid::fluidx::DomainDescriptor &DomainDesc)
 ~AdvancedDomainDescriptor ()
bool isUnitExist (const std::string &ClassName, int ID) const
const std::map< std::string,
std::map< int,
AdvancedUnitDescriptor > > & 
getUnitsByIdByClass () const
const AdvancedUnitDescriptorgetUnit (const std::string &ClassName, int ID) const
const
openfluid::fluidx::UnitDescriptor
getUnitDescriptor (const std::string &ClassName, int ID) const
std::set< int > getIDsOfClass (const std::string &ClassName) const
bool isClassNameExists (const std::string &ClassName) const
std::set< std::string > getClassNames () const
unsigned int getUnitsCount () const
void addUnit (openfluid::fluidx::UnitDescriptor *UnitDesc)
void deleteUnit (const std::string &ClassName, int ID)
std::string & getAttribute (const std::string &ClassName, int ID, const std::string &AttrName)
std::set< std::string > getAttributesNames (const std::string &ClassName) const
void addAttribute (const std::string &ClassName, const std::string &AttrName, const std::string &DefaultValue)
void deleteAttribute (const std::string &ClassName, const std::string &AttrName)
void renameAttribute (const std::string &ClassName, const std::string &OldAttrName, const std::string &NewAttrName)
void addEvent (const openfluid::core::UnitClass_t &UnitsClass, const openfluid::core::UnitID_t &UnitID, const openfluid::core::Event &Event)
void deleteEvent (const openfluid::core::UnitClass_t &UnitsClass, const openfluid::core::UnitID_t &UnitID, const openfluid::fluidx::EventID_t &EventID)
void modifyEvent (const openfluid::fluidx::EventID_t &EventID, const openfluid::core::Event &Event)
openfluid::fluidx::EventDescriptorgetEventDescriptor (const openfluid::fluidx::EventID_t &ID)
const std::list
< openfluid::core::UnitClassID_t > & 
getUnitsToOf (const openfluid::core::UnitClassID_t Unit) const
const std::list
< openfluid::core::UnitClassID_t > & 
getUnitsParentsOf (const openfluid::core::UnitClassID_t Unit) const
std::list
< openfluid::core::UnitClassID_t
getUnitsFromOf (const openfluid::core::UnitClassID_t Unit) const
std::list
< openfluid::core::UnitClassID_t
getUnitsChildrenOf (const openfluid::core::UnitClassID_t Unit) const
void addFromToRelation (const openfluid::core::UnitClassID_t FromUnit, const openfluid::core::UnitClassID_t ToUnit)
 Add ToUnit to the list of "Tos" of FromUnit.
void removeFromToRelation (const openfluid::core::UnitClassID_t FromUnit, const openfluid::core::UnitClassID_t ToUnit)
 Remove ToUnit from the list of "Tos" of FromUnit.
void addParentChildRelation (const openfluid::core::UnitClassID_t ParentUnit, const openfluid::core::UnitClassID_t ChildUnit)
 Add ChildUnit to the list of "Children" of ParentUnit.
void removeParentChildRelation (const openfluid::core::UnitClassID_t ParentUnit, const openfluid::core::UnitClassID_t ChildUnit)
 Remove ChildUnit from the list of "Children" of ParentUnit.
void clearRelations (const openfluid::core::UnitClassID_t Unit)
 Clear the list of "Tos" and "Parents" of Unit, and remove Unit from the list of "Tos" and "Parents" of all other Units of the Domain.
void clearDomain ()

Member Typedef Documentation


Constructor & Destructor Documentation


Member Function Documentation

void openfluid::fluidx::AdvancedDomainDescriptor::addAttribute ( const std::string &  ClassName,
const std::string &  AttrName,
const std::string &  DefaultValue 
)
Exceptions:
openfluid::base::OFExceptionif ClassName doesn't exist or if AttrName already exists for class ClassName
Parameters:
ClassName
AttrName
DefaultValue

Adds an event

Parameters:
[in]UnitsClassThe units class of the event
[in]UnitIDThe unit ID of the event
[in]EventThe event definition

Add ToUnit to the list of "Tos" of FromUnit.

Does nothing if the relation already exists

Exceptions:
openfluid::base::OFExceptionif FromUnit or ToUnit doesn't exist

Add ChildUnit to the list of "Children" of ParentUnit.

Does nothing if the relation already exists

Exceptions:
openfluid::base::OFExceptionif ParentUnit or ChildUnit doesn't exist

Add this UnitDesc ID to the descriptor for all attributes of this UnitDesc class, with a default value of "-"

Warning:
Invalidate UnitDesc
Exceptions:
openfluid::base::OFExceptionif Unit already exists or if Unit has a relation with a non-existent Unit
Parameters:
UnitDesc

Clear the list of "Tos" and "Parents" of Unit, and remove Unit from the list of "Tos" and "Parents" of all other Units of the Domain.

Exceptions:
openfluid::base::OFExceptionif Unit doesn't exist
void openfluid::fluidx::AdvancedDomainDescriptor::deleteAttribute ( const std::string &  ClassName,
const std::string &  AttrName 
)
Exceptions:
openfluid::base::OFExceptionif ClassName doesn't exist or if AttrName doesn't exist for class ClassName
Parameters:
ClassName
AttrName

Deletes an event

Parameters:
[in]UnitsClassThe units class of the event
[in]UnitIDThe unit ID of the event
[in]EventIDThe ID of the event to delete
void openfluid::fluidx::AdvancedDomainDescriptor::deleteUnit ( const std::string &  ClassName,
int  ID 
)

Does nothing if Unit doesn't exist

Parameters:
ClassName
ID
std::string& openfluid::fluidx::AdvancedDomainDescriptor::getAttribute ( const std::string &  ClassName,
int  ID,
const std::string &  AttrName 
)
Exceptions:
openfluid::base::OFExceptionif Unit or DataName doesn't exist
Parameters:
ClassName
ID
AttrName
Returns:
std::set<std::string> openfluid::fluidx::AdvancedDomainDescriptor::getAttributesNames ( const std::string &  ClassName) const
Parameters:
ClassName
Returns:
An empty set if ClassName doesn't exist or has no attribute. Never throws.
Returns:
May return an empty set. Never throws.

Returns a pointer to the event descriptor corresponding to the event ID

Parameters:
[in]IDThe ID of the event to delete
std::set<int> openfluid::fluidx::AdvancedDomainDescriptor::getIDsOfClass ( const std::string &  ClassName) const
Parameters:
ClassName
Returns:
An empty set if ClassName doesn't exist. Never throws.
const AdvancedUnitDescriptor& openfluid::fluidx::AdvancedDomainDescriptor::getUnit ( const std::string &  ClassName,
int  ID 
) const
Exceptions:
openfluid::base::OFExceptionif Unit doesn't exist
Parameters:
ClassName
ID
Returns:
const openfluid::fluidx::UnitDescriptor& openfluid::fluidx::AdvancedDomainDescriptor::getUnitDescriptor ( const std::string &  ClassName,
int  ID 
) const
Exceptions:
openfluid::base::OFExceptionif Unit doesn't exist
Parameters:
ClassName
ID
Returns:
const std::map<std::string, std::map<int, AdvancedUnitDescriptor> >& openfluid::fluidx::AdvancedDomainDescriptor::getUnitsByIdByClass ( ) const
Returns:
May return an empty map. Never throws.
bool openfluid::fluidx::AdvancedDomainDescriptor::isClassNameExists ( const std::string &  ClassName) const
bool openfluid::fluidx::AdvancedDomainDescriptor::isUnitExist ( const std::string &  ClassName,
int  ID 
) const

Modify an event

Parameters:
[in]EventIDThe ID of the event to modify
[in]EventThe new content of the event

Remove ToUnit from the list of "Tos" of FromUnit.

Exceptions:
openfluid::base::OFExceptionif FromUnit or ToUnit doesn't exist or if the relation doesn't exists

Remove ChildUnit from the list of "Children" of ParentUnit.

Exceptions:
openfluid::base::OFExceptionif ParentUnit or ChildUnit doesn't exist or if the relation doesn't exists
void openfluid::fluidx::AdvancedDomainDescriptor::renameAttribute ( const std::string &  ClassName,
const std::string &  OldAttrName,
const std::string &  NewAttrName 
)

Does nothing if NewDataName is the same as OldDataName

Exceptions:
openfluid::base::OFExceptionif ClassName doesn't exist or if OldDataName doesn't exist for the class ClassName
Parameters:
ClassName
OldAttrName
NewAttrName

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines