openETCS
case study for the European Train Control System developed for the authors dissertation
Public Member Functions | Public Attributes | List of all members
GOPPRR::CGraph Struct Reference

graph class More...

#include <Graph.h>

Inheritance diagram for GOPPRR::CGraph:
Inheritance graph
Collaboration diagram for GOPPRR::CGraph:
Collaboration graph

Public Member Functions

 CGraph (const ::std::string &OID="", const ::std::string &Type="", const ::std::string &ID="", const std::map< ::std::string,::GOPPRR::CProperty * > &Properties=std::map< ::std::string,::GOPPRR::CProperty * >(), const std::vector< ::GOPPRR::CBinding > &BindingSet=std::vector< ::GOPPRR::CBinding >(), const std::vector< ::GOPPRR::CGraphicalContainer > &Containers=std::vector< ::GOPPRR::CGraphicalContainer >(), const std::map< std::string,::GOPPRR::CObject * > &ObjectSet=std::map< std::string,::GOPPRR::CObject * >(), const std::map< std::string,::GOPPRR::CPort * > &PortSet=std::map< std::string,::GOPPRR::CPort * >(), const std::map< std::string,::GOPPRR::CRelationship * > &RelationshipSet=std::map< std::string,::GOPPRR::CRelationship * >(), const std::map< std::string,::GOPPRR::CRole * > &RoleSet=std::map< std::string,::GOPPRR::CRole * >()) throw ()
 general constructor
 CGraph (const CGraph &Source) throw ()
 copy constructor
::std::map< ::std::string,
GOPPRR::CObject * > 
Contained (GOPPRR::CObject *const pObject, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CObject * > 
Container (GOPPRR::CObject *const pObject, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CObject * > 
Objects (GOPPRR::CPort *const pPort, GOPPRR::CRole *const pRole, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CObject * > 
Objects (GOPPRR::CRole *const pRole, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CObject * > 
Objects (GOPPRR::CRole *const pRole, const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CObject * > 
Objects (const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
CGraphoperator= (const CGraph &Source) throw ()
 assignment operator
::std::map< ::std::string,
GOPPRR::CPort * > 
Ports (GOPPRR::CRole *const pRole, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CPort * > 
Ports (GOPPRR::CObject *const pObject, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CPort * > 
Ports (GOPPRR::CObject *const pObject, const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CProperty * > 
Properties (const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRelationship * > 
Relationships (GOPPRR::CRole *const pRole, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRelationship * > 
Relationships (GOPPRR::CRole *const pRole, const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRole * > 
Roles (GOPPRR::CObject *const pObject, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRole * > 
Roles (GOPPRR::CObject *const pObject, const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRole * > 
Roles (GOPPRR::CObject *const pObject, GOPPRR::CPort *const pPort, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRole * > 
Roles (GOPPRR::CRelationship *const pRelationship, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRole * > 
Roles (GOPPRR::CObject *const pObject, GOPPRR::CPort *const pPort, const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRole * > 
Roles (GOPPRR::CRelationship *const pRelationship, const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
::std::map< ::std::string,
GOPPRR::CRole * > 
Roles (GOPPRR::CRole *const pRole, const ::std::string &Type, const bool &bSubString=false, const bool &bUseException=true) const throw (::GOPPRR::Error::CEmpty)
 abstraction method
virtual ~CGraph () throw ()
 destructor

Public Attributes

::std::vector< GOPPRR::CBindingm_BindingSet
 set of bindings in a graph
::std::vector
< GOPPRR::CGraphicalContainer
m_Containers
 graphical containments in a graph
::std::string m_ID
 (literal) identifier of element
::std::map< std::string,
GOPPRR::CObject * > 
m_ObjectSet
 set of objects in a graph
::std::string m_OID
 unique object identifier
::std::map< std::string,
GOPPRR::CPort * > 
m_PortSet
 set of ports
::std::map< std::string,
GOPPRR::CProperty * > 
m_Properties
 properties of non-properties
::std::map< std::string,
GOPPRR::CRelationship * > 
m_RelationshipSet
 set of relationships in a graph
::std::map< std::string,
GOPPRR::CRole * > 
m_RoleSet
 role set of a graph
::std::string m_Type
 name of a type

Detailed Description

graph class

Definition at line 52 of file Graph.h.

Constructor & Destructor Documentation

GOPPRR::CGraph::CGraph ( const ::std::string &  OID = "",
const ::std::string &  Type = "",
const ::std::string &  ID = "",
const std::map< ::std::string,::GOPPRR::CProperty * > &  Properties = std::map< ::std::string, ::GOPPRR::CProperty* >(),
const std::vector< ::GOPPRR::CBinding > &  BindingSet = std::vector< ::GOPPRR::CBinding >(),
const std::vector< ::GOPPRR::CGraphicalContainer > &  Containers = std::vector< ::GOPPRR::CGraphicalContainer >(),
const std::map< std::string,::GOPPRR::CObject * > &  ObjectSet = std::map< std::string, ::GOPPRR::CObject* >(),
const std::map< std::string,::GOPPRR::CPort * > &  PortSet = std::map< std::string, ::GOPPRR::CPort* >(),
const std::map< std::string,::GOPPRR::CRelationship * > &  RelationshipSet = std::map< std::string, ::GOPPRR::CRelationship* >(),
const std::map< std::string,::GOPPRR::CRole * > &  RoleSet = std::map< std::string, ::GOPPRR::CRole* >() 
) throw ()

general constructor

Parameters
[in]OIDobject identifier
[in]Typeliteral name of the type
[in]IDidentifier
[in]Propertiesset of property references
[in]BindingSetset of bindings
[in]Containersset of graphical containers
[in]ObjectSetset of objects
[in]PortSetset of ports
[in]RelationshipSetset of relationships
[in]RoleSetset of roles

Definition at line 37 of file Graph.cpp.

GOPPRR::CGraph::CGraph ( const CGraph Source) throw ()

copy constructor

Parameters
[in]Sourcesource object to copy

Definition at line 54 of file Graph.cpp.

GOPPRR::CGraph::~CGraph ( ) throw ()
virtual

destructor

Definition at line 71 of file Graph.cpp.

Member Function Documentation

std::map<::std::string, GOPPRR::CObject * > GOPPRR::CGraph::Contained ( GOPPRR::CObject *const  pObject,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all objects graphical contained by a another one in a certain graph.

Parameters
[in]pObjectpointer to the object
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to objects

Definition at line 1049 of file Graph.cpp.

std::map<::std::string, GOPPRR::CObject * > GOPPRR::CGraph::Container ( GOPPRR::CObject *const  pObject,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all objects which graphical contain another one in a certain graph.

Parameters
[in]pObjectpointer to the object
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to objects

Definition at line 992 of file Graph.cpp.

std::map<::std::string, GOPPRR::CObject * > GOPPRR::CGraph::Objects ( GOPPRR::CPort *const  pPort,
GOPPRR::CRole *const  pRole,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all objects connected to a certain port and role in a certain graph.

Parameters
[in]pPortpointer to the port
[in]pRolepointer to the role
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to objects

Definition at line 776 of file Graph.cpp.

Referenced by oETCS::GEN::CCPPGenerator::GenerateControlFlows(), oETCS::GEN::CCPPGenerator::GenerateLanguage(), and oETCS::GEN::CCPPGenerator::GenerateTransitions().

Here is the caller graph for this function:

std::map<::std::string, GOPPRR::CObject * > GOPPRR::CGraph::Objects ( GOPPRR::CRole *const  pRole,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all objects connected to a certain role in a certain graph.

Parameters
[in]pRolepointer to the role
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to objects

Definition at line 833 of file Graph.cpp.

std::map<::std::string, GOPPRR::CObject * > GOPPRR::CGraph::Objects ( GOPPRR::CRole *const  pRole,
const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets certain types of objects connected to a certain role in a certain graph.

Parameters
[in]pRolepointer to the role
[in]Typeobject type
[in]bSubStringif true, Type only must be a substring of object type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to objects

Definition at line 890 of file Graph.cpp.

std::map<::std::string, GOPPRR::CObject * > GOPPRR::CGraph::Objects ( const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets certain types of objects in a certain graph.

Parameters
[in]Typeobject type
[in]bSubStringif true, Type only must be a substring of object type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to objects

Definition at line 953 of file Graph.cpp.

References m_ObjectSet.

GOPPRR::CGraph & GOPPRR::CGraph::operator= ( const CGraph Source) throw ()

assignment operator

Parameters
[in]Sourceobject instance to assign from

Definition at line 1088 of file Graph.cpp.

References m_BindingSet.

std::map<::std::string, GOPPRR::CPort * > GOPPRR::CGraph::Ports ( GOPPRR::CRole *const  pRole,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all ports connected to a certain role in a certain graph.

Parameters
[in]pRolepointer to the role
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to ports

Definition at line 606 of file Graph.cpp.

std::map<::std::string, GOPPRR::CPort * > GOPPRR::CGraph::Ports ( GOPPRR::CObject *const  pObject,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all ports connected to a certain object in a certain graph.

Parameters
[in]pObjectpointer to the object
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to ports

Definition at line 663 of file Graph.cpp.

std::map<::std::string, GOPPRR::CPort * > GOPPRR::CGraph::Ports ( GOPPRR::CObject *const  pObject,
const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets certain types of ports connected to a certain object in a certain graph.

Parameters
[in]pObjectpointer to the object
[in]Typeport type
[in]bSubStringif true, Type only must be a substring of port type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to ports

Definition at line 720 of file Graph.cpp.

std::map<::std::string, GOPPRR::CProperty * > GOPPRR::CNonProperty::Properties ( const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)
inherited

abstraction method

Gets certain properties of a non-property object

Parameters
[in]Typeproperty type
[in]bSubStringif true, Type only must be a substring of property type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to properties

Definition at line 90 of file NonProperty.cpp.

Referenced by oETCS::GEN::CCPPGenerator::GenerateDataFlow(), oETCS::GEN::CCPPGenerator::GenerateEVCTransitions(), oETCS::GEN::CCPPGenerator::GenerateFunctionBlockElements(), oETCS::GEN::CCPPGenerator::GenerateLanguage(), and oETCS::GEN::CCPPGenerator::GenerateRootGraph().

Here is the caller graph for this function:

std::map<::std::string, GOPPRR::CRelationship * > GOPPRR::CGraph::Relationships ( GOPPRR::CRole *const  pRole,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all relationships connected to a certain role in a certain graph.

Parameters
[in]pRolepointer to the role
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to relationships

Definition at line 485 of file Graph.cpp.

std::map<::std::string, GOPPRR::CRelationship * > GOPPRR::CGraph::Relationships ( GOPPRR::CRole *const  pRole,
const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets certain types of relationships connected to a certain role in a certain graph.

Parameters
[in]pRolepointer to the role
[in]Typerelationship type
[in]bSubStringif true, Type only must be a substring of relationship type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to relationships

Definition at line 542 of file Graph.cpp.

std::map<::std::string, GOPPRR::CRole * > GOPPRR::CGraph::Roles ( GOPPRR::CObject *const  pObject,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all roles connected to a certain object in a certain graph.

Parameters
[in]pObjectpointer to the object
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to roles

Definition at line 81 of file Graph.cpp.

Referenced by oETCS::GEN::CCPPGenerator::GenerateControlFlows(), and oETCS::GEN::CCPPGenerator::GenerateLanguage().

Here is the caller graph for this function:

std::map<::std::string, GOPPRR::CRole * > GOPPRR::CGraph::Roles ( GOPPRR::CObject *const  pObject,
const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets certain roles connected to a certain object in a certain graph.

Parameters
[in]pObjectpointer to the object
[in]Typerole type
[in]bSubStringif true, Type only must be a substring of role type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to roles

Definition at line 138 of file Graph.cpp.

std::map<::std::string, GOPPRR::CRole * > GOPPRR::CGraph::Roles ( GOPPRR::CObject *const  pObject,
GOPPRR::CPort *const  pPort,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all roles connected to a certain port and object in a certain graph.

Parameters
[in]pPortpointer to the port
[in]pObjectpointer to the object
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to roles

Definition at line 201 of file Graph.cpp.

std::map<::std::string, GOPPRR::CRole * > GOPPRR::CGraph::Roles ( GOPPRR::CRelationship *const  pRelationship,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all roles connected to a certain relationship in a certain graph.

Parameters
[in]pRelationshippointer to the relationship
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to roles

Definition at line 258 of file Graph.cpp.

std::map<::std::string, GOPPRR::CRole * > GOPPRR::CGraph::Roles ( GOPPRR::CObject *const  pObject,
GOPPRR::CPort *const  pPort,
const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all certain types of roles connected to a certain port and object in a certain graph.

Parameters
[in]pPortpointer to the port
[in]pObjecttpointer to the object
[in]Typerole type
[in]bSubStringif true, Type only must be a substring of role type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to roles

Definition at line 308 of file Graph.cpp.

std::map<::std::string, GOPPRR::CRole * > GOPPRR::CGraph::Roles ( GOPPRR::CRelationship *const  pRelationship,
const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all certain types of roles connected to a certain relationship in a certain graph.

Parameters
[in]pRelationshippointer to the relationship
[in]Typerole type
[in]bSubStringif true, Type only must be a substring of role type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to roles

Definition at line 371 of file Graph.cpp.

std::map<::std::string, GOPPRR::CRole * > GOPPRR::CGraph::Roles ( GOPPRR::CRole *const  pRole,
const ::std::string &  Type,
const bool &  bSubString = false,
const bool &  bUseException = true 
) const throw (::GOPPRR::Error::CEmpty)

abstraction method

Gets all certain types of roles connected to a certain another role in a certain graph. This skips the navigation via the related relationship.

Parameters
[in]pRolepointer to the role
[in]Typerole type
[in]bSubStringif true, Type only must be a substring of role type
[in]bUseExceptionoptional boolean flag for throwing a exception in case of an empty map
Returns
map of pointers to roles

Definition at line 427 of file Graph.cpp.

Member Data Documentation

::std::vector< GOPPRR::CBinding > GOPPRR::CGraph::m_BindingSet

set of bindings in a graph

Set of bindings in a graph.

Definition at line 373 of file Graph.h.

Referenced by operator=().

::std::vector< GOPPRR::CGraphicalContainer > GOPPRR::CGraph::m_Containers

graphical containments in a graph

Definition at line 420 of file Graph.h.

::std::string GOPPRR::CNonProperty::m_ID
inherited
::std::map< std::string,GOPPRR::CObject* > GOPPRR::CGraph::m_ObjectSet
::std::string GOPPRR::CConcept::m_OID
inherited
::std::map< std::string,GOPPRR::CPort* > GOPPRR::CGraph::m_PortSet
::std::map< std::string,GOPPRR::CProperty* > GOPPRR::CNonProperty::m_Properties
inherited

properties of non-properties

Properties of non-properties indexed by their OID

Definition at line 113 of file NonProperty.h.

Referenced by oETCS::GEN::CCPPGenerator::GenerateLanguage().

::std::map< std::string,GOPPRR::CRelationship* > GOPPRR::CGraph::m_RelationshipSet
::std::map< std::string,GOPPRR::CRole* > GOPPRR::CGraph::m_RoleSet
::std::string GOPPRR::CConcept::m_Type
inherited

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

Copyright (C) 2010-2012 Johannes Feuser (feuser@uni-bremen.de)
The openETCS library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
The openETCS library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the openETCS library. If not, see "http://www.gnu.org/licenses/.