openETCS
case study for the European Train Control System developed for the authors dissertation
Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Private Attributes | List of all members
DSM::CGOPPRRTransformer Class Reference

XML syntax tree transformer for the GOPPRR meta meta model. More...

#include <GOPPRRTransformer.h>

Inheritance diagram for DSM::CGOPPRRTransformer:
Inheritance graph
Collaboration diagram for DSM::CGOPPRRTransformer:
Collaboration graph

Public Member Functions

 CGOPPRRTransformer () throw ()
void CreateSyntax (::std::fstream &ModelFileStream, GOPPRR::CGraph *&pRootGraph) throw (DSM::Error::CException)
 creates a GOPRR syntax tree
void CreateSyntax (const ::std::string &Model, GOPPRR::CGraph *&pRootGraph) throw (DSM::Error::CException)
 creates a GOPRR syntax tree
void CreateSyntaxFromFile (const ::std::string &ModelFileName, GOPPRR::CGraph *&pRootGraph) throw (DSM::Error::CException)
 creates a GOPRR syntax tree
void CreateSyntaxIterative (const ::std::string &Model, GOPPRR::CGraph *&pRootGraph) throw (DSM::Error::CException)
 creates a GOPRR syntax tree
::DSM::CGOPPRRSyntaxTreeGetGOPRRTree () const throw ()
 gets GOPRR syntax tree
::DSM::CSyntaxTreeGetTree () const throw ()
 gets pointer to generated syntax tree
virtual ~CGOPPRRTransformer () throw ()
 destructor

Static Protected Member Functions

static void CreateExplosion (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships, std::map< ::std::string,::GOPPRR::CGraph * > &Explosions) throw (DSM::Error::CException)
 internal helper method
static void CreateExplosionIterative (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships, std::map< ::std::string,::GOPPRR::CGraph * > &Explosions) throw (DSM::Error::CException)
 internal helper method
static void CreateGraph (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships, bool &bRoot) throw (DSM::Error::CException)
 internal helper method
static void CreateGraph (const ::std::string &OID,::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships, bool &bRoot) throw (DSM::Error::CException)
 internal helper method
static void CreateGraphIterative (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships, bool &bRoot) throw (DSM::Error::CException)
 internal helper method
static void CreateObject (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateObject (const ::std::string &OID,::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateObjectIterative (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreatePort (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreatePort (const ::std::string &OID,::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreatePortIterative (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateProperty (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateProperty (const ::std::string &OID,::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreatePropertyIterative (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateRelationship (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateRelationship (const ::std::string &OID,::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateRelationshipIterative (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateRole (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateRole (const ::std::string &OID,::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
static void CreateRoleIterative (::xmlpp::Element *pXMLElement, std::map< ::std::string,::GOPPRR::CGraph > &Graphs, std::map< ::std::string,::GOPPRR::CObject > &Objects, std::map< ::std::string,::GOPPRR::CProperty > &Properties, std::map< ::std::string,::GOPPRR::CPort > &Ports, std::map< ::std::string,::GOPPRR::CRole > &Roles, std::map< ::std::string,::GOPPRR::CRelationship > &Relationships) throw (DSM::Error::CException)
 internal helper method
::xmlpp::Element * FindElementByXPath (const ::xmlpp::Element *pXMLElement, const ::std::string &XPath, const ::std::string &OID) throw ()
 internal helper method

Protected Attributes

::DSM::CSyntaxTreem_pTree
 pointer to syntax tree
::xmlpp::DomParser m_XMLParser
 parser object

Static Private Attributes

::std::string m_Schema = reinterpret_cast< const char* const >(pGOPPRRXMLSchema)
 XML schema for validation of GOPPRR model files.

Detailed Description

XML syntax tree transformer for the GOPPRR meta meta model.

Definition at line 60 of file GOPPRRTransformer.h.

Constructor & Destructor Documentation

DSM::CGOPPRRTransformer::CGOPPRRTransformer ( ) throw ()

default constructor

Definition at line 33 of file GOPPRRTransformer.cpp.

DSM::CGOPPRRTransformer::~CGOPPRRTransformer ( ) throw ()
virtual

destructor

Definition at line 44 of file GOPPRRTransformer.cpp.

Member Function Documentation

void DSM::CGOPPRRTransformer::CreateExplosion ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships,
std::map< ::std::string,::GOPPRR::CGraph * > &  Explosions 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a map of GOPRR::CGraph pointers as explosions from a XML element node.

Parameters
[in]pXMLElement,:pointer to current XML element <gopprr explosions>=""> object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project
[out]Explosionsset of graph reference as current exlosions

Definition at line 3101 of file GOPPRRTransformer.cpp.

References CreateGraph().

Referenced by CreateObject(), CreateRelationship(), and CreateRole().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateExplosionIterative ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships,
std::map< ::std::string,::GOPPRR::CGraph * > &  Explosions 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a map of GOPRR::CGraph pointers as explosions from a XML element node.

Parameters
[in]pXMLElement,:pointer to current XML element <gopprr explosions>=""> object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project
[out]Explosionsset of graph reference as current exlosions

Definition at line 1144 of file GOPPRRTransformer.cpp.

Referenced by CreateObjectIterative(), CreateRelationshipIterative(), and CreateRoleIterative().

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateGraph ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships,
bool &  bRoot 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CGraph object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object/graph
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project
[out]bRootflag, if graph is root graph

Definition at line 1868 of file GOPPRRTransformer.cpp.

References CreateObject(), CreatePort(), CreateProperty(), CreateRelationship(), and CreateRole().

Referenced by CreateExplosion(), CreateGraph(), CreateObject(), CreateProperty(), and CreateSyntax().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateGraph ( const ::std::string &  OID,
::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships,
bool &  bRoot 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CGraph object from a XML element node, if it does not exist yet.

Parameters
[in]OIDobject identifier of object
[in]pXMLElementpointer current XML element
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project
[out]bRootflag, if graph is root graph

Definition at line 2258 of file GOPPRRTransformer.cpp.

References CreateGraph(), and FindElementByXPath().

Here is the call graph for this function:

void DSM::CGOPPRRTransformer::CreateGraphIterative ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships,
bool &  bRoot 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CGraph object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object/graph
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project
[out]bRootflag, if graph is root graph

Definition at line 1508 of file GOPPRRTransformer.cpp.

Referenced by CreateSyntaxIterative().

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateObject ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CObject object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Objects: set of objects in current project
inout]Properties set of properties in current project

Definition at line 2297 of file GOPPRRTransformer.cpp.

References CreateExplosion(), CreateGraph(), and CreateProperty().

Referenced by CreateGraph(), CreateObject(), CreateProperty(), and CreateSyntax().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateObject ( const ::std::string &  OID,
::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CObject object from a XML element node, if it does not exist yet.

Parameters
[in]OIDobject identifier of object
[in]pXMLElementpointer current XML element
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2467 of file GOPPRRTransformer.cpp.

References CreateObject(), and FindElementByXPath().

Here is the call graph for this function:

void DSM::CGOPPRRTransformer::CreateObjectIterative ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CObject object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Objects: set of objects in current project
inout]Properties set of properties in current project

Definition at line 965 of file GOPPRRTransformer.cpp.

References CreateExplosionIterative().

Referenced by CreateSyntaxIterative().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreatePort ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CPort object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2507 of file GOPPRRTransformer.cpp.

References CreateProperty().

Referenced by CreateGraph(), CreatePort(), CreateProperty(), and CreateSyntax().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreatePort ( const ::std::string &  OID,
::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CPort object from a XML element node, if it does not exist yet.

Parameters
[in]OIDobject identifier of object
[in]pXMLElementpointer current XML element
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2599 of file GOPPRRTransformer.cpp.

References CreatePort(), and FindElementByXPath().

Here is the call graph for this function:

void DSM::CGOPPRRTransformer::CreatePortIterative ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CPort object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 1213 of file GOPPRRTransformer.cpp.

Referenced by CreateSyntaxIterative().

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateProperty ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CProperty object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2638 of file GOPPRRTransformer.cpp.

References CreateGraph(), CreateObject(), CreatePort(), CreateRelationship(), and CreateRole().

Referenced by CreateGraph(), CreateObject(), CreatePort(), CreateProperty(), CreateRelationship(), CreateRole(), and CreateSyntax().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateProperty ( const ::std::string &  OID,
::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CProperty object from a XML element node, if it does not exist yet.

Parameters
[in]OIDobject identifier of object
[in]pXMLElementpointer current XML element
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2777 of file GOPPRRTransformer.cpp.

References CreateProperty(), and FindElementByXPath().

Here is the call graph for this function:

void DSM::CGOPPRRTransformer::CreatePropertyIterative ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CProperty object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 845 of file GOPPRRTransformer.cpp.

Referenced by CreateSyntaxIterative().

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateRelationship ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CRelationship object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2959 of file GOPPRRTransformer.cpp.

References CreateExplosion(), and CreateProperty().

Referenced by CreateGraph(), CreateProperty(), CreateRelationship(), and CreateSyntax().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateRelationship ( const ::std::string &  OID,
::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CRelationship object from a XML element node, if it does not exist yet.

Parameters
[in]OIDobject identifier of object
[in]pXMLElementpointer current XML element
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 3062 of file GOPPRRTransformer.cpp.

References CreateRelationship(), and FindElementByXPath().

Here is the call graph for this function:

void DSM::CGOPPRRTransformer::CreateRelationshipIterative ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CRelationship object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 1404 of file GOPPRRTransformer.cpp.

References CreateExplosionIterative().

Referenced by CreateSyntaxIterative().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateRole ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CRole object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2816 of file GOPPRRTransformer.cpp.

References CreateExplosion(), and CreateProperty().

Referenced by CreateGraph(), CreateProperty(), CreateRole(), and CreateSyntax().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateRole ( const ::std::string &  OID,
::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CRole object from a XML element node, if it does not exist yet.

Parameters
[in]OIDobject identifier of object
[in]pXMLElementpointer current XML element
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 2920 of file GOPPRRTransformer.cpp.

References CreateRole(), and FindElementByXPath().

Here is the call graph for this function:

void DSM::CGOPPRRTransformer::CreateRoleIterative ( ::xmlpp::Element *  pXMLElement,
std::map< ::std::string,::GOPPRR::CGraph > &  Graphs,
std::map< ::std::string,::GOPPRR::CObject > &  Objects,
std::map< ::std::string,::GOPPRR::CProperty > &  Properties,
std::map< ::std::string,::GOPPRR::CPort > &  Ports,
std::map< ::std::string,::GOPPRR::CRole > &  Roles,
std::map< ::std::string,::GOPPRR::CRelationship > &  Relationships 
) throw (DSM::Error::CException)
staticprotected

internal helper method

Internal helper method for creating a GOPRR::CRole object from a XML element node.

Parameters
[in]pXMLElementpointer to current XML element object
inout]Graphs set of graphs in current project
inout]Objects: set of objects in current project
inout]Properties set of properties in current project
inout]Ports set of ports in current project
inout]Roles set of roles in current project
inout]Relationships set of relationships in current project

Definition at line 1299 of file GOPPRRTransformer.cpp.

References CreateExplosionIterative().

Referenced by CreateSyntaxIterative().

Here is the call graph for this function:

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateSyntax ( ::std::fstream &  ModelFileStream,
GOPPRR::CGraph *&  pRootGraph 
) throw (DSM::Error::CException)

creates a GOPRR syntax tree

Creates a GOPPRR syntax tree from a XML model file while using an internalyl stored Schema file for validation. The create syntax tree is stored in m_pTree.

Parameters
[in]ModelFileNamefile stream of the XML model file
[out]pRootGraphpointer to root graph, if one exists, else 0

Definition at line 112 of file GOPPRRTransformer.cpp.

void DSM::CGOPPRRTransformer::CreateSyntax ( const ::std::string &  Model,
GOPPRR::CGraph *&  pRootGraph 
) throw (DSM::Error::CException)

creates a GOPRR syntax tree

Creates a GOPPRR syntax tree from a XML model file while using an internalyl stored Schema file for validation. The create syntax tree is stored in m_pTree.

Parameters
[in]ModelXML model as string
[out]pRootGraphpointer to root graph, if one exists, else 0

Definition at line 129 of file GOPPRRTransformer.cpp.

References CreateGraph(), CreateObject(), CreatePort(), CreateProperty(), CreateRelationship(), CreateRole(), GOPPRR::CProject::m_GraphSet, GOPPRR::CProject::m_ObjectSet, GOPPRR::CProject::m_PortSet, GOPPRR::CProject::m_PropertySet, GOPPRR::CProject::m_RelationshipSet, and GOPPRR::CProject::m_RoleSet.

Here is the call graph for this function:

void DSM::CGOPPRRTransformer::CreateSyntaxFromFile ( const ::std::string &  ModelFileName,
GOPPRR::CGraph *&  pRootGraph 
) throw (DSM::Error::CException)

creates a GOPRR syntax tree

Creates a GOPPRR syntax tree from a XML model file while using an internalyl stored Schema file for validation. The create syntax tree is stored in m_pTree.

Parameters
[in]ModelFileNamefile name of the XML model file
[out]pRootGraphpointer to root graph, if one exists, else 0

Definition at line 67 of file GOPPRRTransformer.cpp.

Referenced by oETCS::GEN::CMain::Execute(), oETCS::UT::CGOPPRRTransformer::TestCreateSyntax(), oETCS::UT::CGenerator::TestGenerateCpp(), and oETCS::UT::CGOPPRRTransformer::TestStaticSemantics().

Here is the caller graph for this function:

void DSM::CGOPPRRTransformer::CreateSyntaxIterative ( const ::std::string &  Model,
GOPPRR::CGraph *&  pRootGraph 
) throw (DSM::Error::CException)

creates a GOPRR syntax tree

Creates a GOPPRR syntax tree from a XML model file while using an internalyl stored Schema file for validation. The create syntax tree is stored in m_pTree.

Remarks
this methods works itereative and not recursive
Parameters
[in]ModelXML model as string
[out]pRootGraphpointer to root graph, if one exists, else 0

Definition at line 348 of file GOPPRRTransformer.cpp.

References CreateGraphIterative(), CreateObjectIterative(), CreatePortIterative(), CreatePropertyIterative(), CreateRelationshipIterative(), CreateRoleIterative(), GOPPRR::CObject::m_Explosions, GOPPRR::CProject::m_GraphSet, GOPPRR::CProperty::m_NonProperties, GOPPRR::CProject::m_ObjectSet, GOPPRR::CProject::m_PortSet, GOPPRR::CProject::m_PropertySet, GOPPRR::CProject::m_RelationshipSet, and GOPPRR::CProject::m_RoleSet.

Here is the call graph for this function:

xmlpp::Element * DSM::CGOPPRRTransformer::FindElementByXPath ( const ::xmlpp::Element *  pXMLElement,
const ::std::string &  XPath,
const ::std::string &  OID 
) throw ()
staticprotected

internal helper method

Internal helper method for finding a XML element by an XPath expression and its OID.

Parameters
[in]pXMLElementpointer to any XML element of docuement
[in]XPathXPath expression
[in]OIDGOPPRR oid of element

Definition at line 3175 of file GOPPRRTransformer.cpp.

Referenced by CreateGraph(), CreateObject(), CreatePort(), CreateProperty(), CreateRelationship(), and CreateRole().

Here is the caller graph for this function:

DSM::CGOPPRRSyntaxTree * DSM::CGOPPRRTransformer::GetGOPRRTree ( ) const throw ()

gets GOPRR syntax tree

Gets pointer to internal GOPRR syntax tree

Returns
pointer to tree

Definition at line 55 of file GOPPRRTransformer.cpp.

References DSM::CSyntaxTransformer::m_pTree.

Referenced by oETCS::GEN::CMain::Execute(), oETCS::UT::CGOPPRRTransformer::TestCreateSyntax(), and oETCS::UT::CGOPPRRTransformer::TestStaticSemantics().

Here is the caller graph for this function:

DSM::CSyntaxTree * DSM::CSyntaxTransformer::GetTree ( ) const throw ()
inherited

gets pointer to generated syntax tree

Definition at line 56 of file SyntaxTransformer.cpp.

References DSM::CSyntaxTransformer::m_pTree.

Referenced by oETCS::UT::CGenerator::TestGenerateCpp().

Here is the caller graph for this function:

Member Data Documentation

::DSM::CSyntaxTree* DSM::CSyntaxTransformer::m_pTree
protectedinherited

pointer to syntax tree

Pointer to last created syntax tree. Otherwise 0.

Definition at line 76 of file SyntaxTransformer.h.

Referenced by GetGOPRRTree(), DSM::CSyntaxTransformer::GetTree(), and DSM::CSyntaxTransformer::~CSyntaxTransformer().

std::string DSM::CGOPPRRTransformer::m_Schema = reinterpret_cast< const char* const >(pGOPPRRXMLSchema)
staticprivate

XML schema for validation of GOPPRR model files.

Definition at line 540 of file GOPPRRTransformer.h.

::xmlpp::DomParser DSM::CSyntaxTransformer::m_XMLParser
protectedinherited

parser object

libXML++ DOM parser object for parsing model files.

Definition at line 85 of file SyntaxTransformer.h.


The documentation for this class 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/.