![]() |
#include <fluidx/AdvancedDomainDescriptor.hpp>
Public Types | |
typedef std::map< std::string, std::map< int, AdvancedUnitDescriptor > > | UnitsByIdByClass_t |
Public Member Functions | |
AdvancedDomainDescriptor (openfluid::fluidx::SpatialDomainDescriptor &DomainDesc) | |
~AdvancedDomainDescriptor () | |
bool | isSpatialUnitExist (const std::string &ClassName, int ID) const |
const std::map< std::string, std::map< int, AdvancedUnitDescriptor > > & | spatialUnitsByIdByClass () const |
const AdvancedUnitDescriptor & | spatialUnit (const std::string &ClassName, int ID) const |
const openfluid::fluidx::SpatialUnitDescriptor & | spatialUnitDescriptor (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::SpatialUnitDescriptor *UnitDesc) |
void | deleteUnit (const std::string &ClassName, int ID) |
std::string & | attribute (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::UnitsClass_t &UnitsClass, const openfluid::core::UnitID_t &UnitID, const openfluid::core::Event &Event) |
void | deleteEvent (const openfluid::core::UnitsClass_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::EventDescriptor * | eventDescriptor (const openfluid::fluidx::EventID_t &ID) |
const std::list < openfluid::core::UnitClassID_t > & | toSpatialUnits (const openfluid::core::UnitClassID_t Unit) const |
const std::list < openfluid::core::UnitClassID_t > & | parentSpatialUnits (const openfluid::core::UnitClassID_t Unit) const |
std::list < openfluid::core::UnitClassID_t > | getFromSpatialUnits (const openfluid::core::UnitClassID_t Unit) const |
std::list < openfluid::core::UnitClassID_t > | getChildSpatialUnits (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. More... | |
void | removeFromToRelation (const openfluid::core::UnitClassID_t FromUnit, const openfluid::core::UnitClassID_t ToUnit) |
Remove ToUnit from the list of "Tos" of FromUnit. More... | |
void | addParentChildRelation (const openfluid::core::UnitClassID_t ParentUnit, const openfluid::core::UnitClassID_t ChildUnit) |
Add ChildUnit to the list of "Children" of ParentUnit. More... | |
void | removeParentChildRelation (const openfluid::core::UnitClassID_t ParentUnit, const openfluid::core::UnitClassID_t ChildUnit) |
Remove ChildUnit from the list of "Children" of ParentUnit. More... | |
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. More... | |
void | clearDomain () |
typedef std::map<std::string, std::map<int, AdvancedUnitDescriptor> > openfluid::fluidx::AdvancedDomainDescriptor::UnitsByIdByClass_t |
openfluid::fluidx::AdvancedDomainDescriptor::AdvancedDomainDescriptor | ( | openfluid::fluidx::SpatialDomainDescriptor & | DomainDesc | ) |
openfluid::fluidx::AdvancedDomainDescriptor::~AdvancedDomainDescriptor | ( | ) |
void openfluid::fluidx::AdvancedDomainDescriptor::addAttribute | ( | const std::string & | ClassName, |
const std::string & | AttrName, | ||
const std::string & | DefaultValue | ||
) |
openfluid::base::FrameworkException | if ClassName doesn't exist or if AttrName already exists for class ClassName |
ClassName | |
AttrName | |
DefaultValue |
void openfluid::fluidx::AdvancedDomainDescriptor::addEvent | ( | const openfluid::core::UnitsClass_t & | UnitsClass, |
const openfluid::core::UnitID_t & | UnitID, | ||
const openfluid::core::Event & | Event | ||
) |
Adds an event
[in] | UnitsClass | The units class of the event |
[in] | UnitID | The unit ID of the event |
[in] | Event | The event definition |
void openfluid::fluidx::AdvancedDomainDescriptor::addFromToRelation | ( | const openfluid::core::UnitClassID_t | FromUnit, |
const openfluid::core::UnitClassID_t | ToUnit | ||
) |
Add ToUnit to the list of "Tos" of FromUnit.
Does nothing if the relation already exists
openfluid::base::FrameworkException | if FromUnit or ToUnit doesn't exist |
void openfluid::fluidx::AdvancedDomainDescriptor::addParentChildRelation | ( | const openfluid::core::UnitClassID_t | ParentUnit, |
const openfluid::core::UnitClassID_t | ChildUnit | ||
) |
Add ChildUnit to the list of "Children" of ParentUnit.
Does nothing if the relation already exists
openfluid::base::FrameworkException | if ParentUnit or ChildUnit doesn't exist |
void openfluid::fluidx::AdvancedDomainDescriptor::addUnit | ( | openfluid::fluidx::SpatialUnitDescriptor * | UnitDesc | ) |
Add this UnitDesc ID to the descriptor for all attributes of this UnitDesc class, with a default value of "-"
openfluid::base::FrameworkException | if Unit already exists or if Unit has a relation with a non-existent Unit |
UnitDesc |
std::string& openfluid::fluidx::AdvancedDomainDescriptor::attribute | ( | const std::string & | ClassName, |
int | ID, | ||
const std::string & | AttrName | ||
) |
openfluid::base::FrameworkException | if Unit or DataName doesn't exist |
ClassName | |
ID | |
AttrName |
void openfluid::fluidx::AdvancedDomainDescriptor::clearDomain | ( | ) |
void openfluid::fluidx::AdvancedDomainDescriptor::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.
openfluid::base::FrameworkException | if Unit doesn't exist |
void openfluid::fluidx::AdvancedDomainDescriptor::deleteAttribute | ( | const std::string & | ClassName, |
const std::string & | AttrName | ||
) |
openfluid::base::FrameworkException | if ClassName doesn't exist or if AttrName doesn't exist for class ClassName |
ClassName | |
AttrName |
void openfluid::fluidx::AdvancedDomainDescriptor::deleteEvent | ( | const openfluid::core::UnitsClass_t & | UnitsClass, |
const openfluid::core::UnitID_t & | UnitID, | ||
const openfluid::fluidx::EventID_t & | EventID | ||
) |
Deletes an event
[in] | UnitsClass | The units class of the event |
[in] | UnitID | The unit ID of the event |
[in] | EventID | The ID of the event to delete |
void openfluid::fluidx::AdvancedDomainDescriptor::deleteUnit | ( | const std::string & | ClassName, |
int | ID | ||
) |
Does nothing if Unit doesn't exist
ClassName | |
ID |
openfluid::fluidx::EventDescriptor* openfluid::fluidx::AdvancedDomainDescriptor::eventDescriptor | ( | const openfluid::fluidx::EventID_t & | ID | ) |
Returns a pointer to the event descriptor corresponding to the event ID
[in] | ID | The ID of the event to delete |
std::set<std::string> openfluid::fluidx::AdvancedDomainDescriptor::getAttributesNames | ( | const std::string & | ClassName | ) | const |
ClassName |
std::list<openfluid::core::UnitClassID_t> openfluid::fluidx::AdvancedDomainDescriptor::getChildSpatialUnits | ( | const openfluid::core::UnitClassID_t | Unit | ) | const |
std::set<std::string> openfluid::fluidx::AdvancedDomainDescriptor::getClassNames | ( | ) | const |
std::list<openfluid::core::UnitClassID_t> openfluid::fluidx::AdvancedDomainDescriptor::getFromSpatialUnits | ( | const openfluid::core::UnitClassID_t | Unit | ) | const |
std::set<int> openfluid::fluidx::AdvancedDomainDescriptor::getIDsOfClass | ( | const std::string & | ClassName | ) | const |
ClassName |
unsigned int openfluid::fluidx::AdvancedDomainDescriptor::getUnitsCount | ( | ) | const |
bool openfluid::fluidx::AdvancedDomainDescriptor::isClassNameExists | ( | const std::string & | ClassName | ) | const |
bool openfluid::fluidx::AdvancedDomainDescriptor::isSpatialUnitExist | ( | const std::string & | ClassName, |
int | ID | ||
) | const |
void openfluid::fluidx::AdvancedDomainDescriptor::modifyEvent | ( | const openfluid::fluidx::EventID_t & | EventID, |
const openfluid::core::Event & | Event | ||
) |
Modify an event
[in] | EventID | The ID of the event to modify |
[in] | Event | The new content of the event |
const std::list<openfluid::core::UnitClassID_t>& openfluid::fluidx::AdvancedDomainDescriptor::parentSpatialUnits | ( | const openfluid::core::UnitClassID_t | Unit | ) | const |
void openfluid::fluidx::AdvancedDomainDescriptor::removeFromToRelation | ( | const openfluid::core::UnitClassID_t | FromUnit, |
const openfluid::core::UnitClassID_t | ToUnit | ||
) |
Remove ToUnit from the list of "Tos" of FromUnit.
openfluid::base::FrameworkException | if FromUnit or ToUnit doesn't exist or if the relation doesn't exists |
void openfluid::fluidx::AdvancedDomainDescriptor::removeParentChildRelation | ( | const openfluid::core::UnitClassID_t | ParentUnit, |
const openfluid::core::UnitClassID_t | ChildUnit | ||
) |
Remove ChildUnit from the list of "Children" of ParentUnit.
openfluid::base::FrameworkException | if 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
openfluid::base::FrameworkException | if ClassName doesn't exist or if OldDataName doesn't exist for the class ClassName |
ClassName | |
OldAttrName | |
NewAttrName |
const AdvancedUnitDescriptor& openfluid::fluidx::AdvancedDomainDescriptor::spatialUnit | ( | const std::string & | ClassName, |
int | ID | ||
) | const |
const openfluid::fluidx::SpatialUnitDescriptor& openfluid::fluidx::AdvancedDomainDescriptor::spatialUnitDescriptor | ( | const std::string & | ClassName, |
int | ID | ||
) | const |
const std::map<std::string, std::map<int, AdvancedUnitDescriptor> >& openfluid::fluidx::AdvancedDomainDescriptor::spatialUnitsByIdByClass | ( | ) | const |
const std::list<openfluid::core::UnitClassID_t>& openfluid::fluidx::AdvancedDomainDescriptor::toSpatialUnits | ( | const openfluid::core::UnitClassID_t | Unit | ) | const |