FSMSADF::ScenarioGraph Class Reference

#include <graph.h>

Inheritance diagram for FSMSADF::ScenarioGraph:
Collaboration diagram for FSMSADF::ScenarioGraph:

List of all members.

Public Member Functions

 ScenarioGraph (GraphComponent c)
 ~ScenarioGraph ()
ScenarioGraphcreate (GraphComponent c) const
ScenarioGraphcreateCopy (GraphComponent c) const
ScenarioGraphclone (GraphComponent c) const
void constructFromXML (const CNodePtr scenarioGraphNode)
void constructPropertiesFromXML (Scenario *s, const CNodePtr scenarioNode)
void convertToXML (const CNodePtr scenarioGraphNode)
void convertPropertiesToXML (Scenario *s, const CNodePtr scenarioNode)
TimedSDFgraphextractSDFgraph (Scenario *s) const
void isolateScenario (Scenario *s)
CString getType () const
void setType (const CString &t)
ActorsgetActors ()
ActorgetActor (const CId id)
ActorgetActor (const CString &name)
bool hasActor (const CString &name)
void addActor (Actor *a)
void removeActor (const CString &name)
ActorcreateActor ()
ActorcreateActor (GraphComponent c)
ChannelsgetChannels ()
ChannelgetChannel (const CId id)
ChannelgetChannel (const CString &name)
bool hasChannel (const CString &name)
void addChannel (Channel *c)
void removeChannel (const CString &name)
ChannelcreateChannel (GraphComponent c)
ChannelcreateChannel (Actor *src, Actor *dst)
const PersistentTokenMap getPersistentTokenMap ()
const map< Scenario
*, StorageDistributions > & 
getStorageDistributions () const
void setStorageDistributions (const map< Scenario *, StorageDistributions > &d)
StorageDistributionsgetStorageDistributionsOfScenario (Scenario *s)
void setStorageDistributionsOfScenario (Scenario *s, const StorageDistributions d)
bool hasStorageDistributionsInScenario (Scenario *s) const
GraphgetGraph () const
ostream & print (ostream &out)

Private Member Functions

ScenariogetDefaultScenario () const

Private Attributes

CString type
Actors actors
Channels channels
PersistentTokenMap persistentTokenMap
map< Scenario
*, StorageDistributions
storageDistributions

Friends

ostream & operator<< (ostream &out, ScenarioGraph &g)

Detailed Description

ScenarioGraph Container for FSM-based SADF scenario graph.


Constructor & Destructor Documentation

FSMSADF::ScenarioGraph::ScenarioGraph ( GraphComponent  c  ) 

ScenarioGraph () Constructor.

Referenced by create().

FSMSADF::ScenarioGraph::~ScenarioGraph (  ) 

~ScenarioGraph () Destructor.

References a, actors, c, and channels.


Member Function Documentation

void FSMSADF::ScenarioGraph::addActor ( Actor a  ) 

addActor () Add an actor to a graph.

References actors.

Referenced by clone(), and createActor().

void FSMSADF::ScenarioGraph::addChannel ( Channel c  ) 

addChannel () Add a channel to a graph.

References channels.

Referenced by clone(), and createChannel().

ScenarioGraph * FSMSADF::ScenarioGraph::clone ( GraphComponent  c  )  const

clone () The function returns a pointer to a newly allocated graph object. All properties, actors and channels of the graph are cloned.

References a, actors, addActor(), addChannel(), channels, component, createCopy(), g, getGraph(), FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::GraphComponent(), persistentTokenMap, setStorageDistributionsOfScenario(), and storageDistributions.

Referenced by FSMSADF::Graph::isolateScenarios().

Here is the call graph for this function:

void FSMSADF::ScenarioGraph::constructFromXML ( const CNodePtr  scenarioGraphNode  ) 
void FSMSADF::ScenarioGraph::constructPropertiesFromXML ( Scenario s,
const CNodePtr  scenarioNode 
)
void FSMSADF::ScenarioGraph::convertPropertiesToXML ( Scenario s,
const CNodePtr  scenarioNode 
)

convertPropertiesToXML () The function converts the graph properties to XML data.

References actors, CAddNode(), channels, FSMSADF::StorageDistributions::convertToXML(), getStorageDistributionsOfScenario(), and hasStorageDistributionsInScenario().

Referenced by FSMSADF::Scenario::convertToXML().

Here is the call graph for this function:

void FSMSADF::ScenarioGraph::convertToXML ( const CNodePtr  scenarioGraphNode  ) 

convertToXML () The function converts the graph to XML data.

References actors, CAddAttribute(), CAddNode(), channels, FSMSADF::GraphComponent::getName(), and getType().

Referenced by FSMSADF::Graph::convertToXML().

Here is the call graph for this function:

ScenarioGraph * FSMSADF::ScenarioGraph::create ( GraphComponent  c  )  const

create () The function returns a pointer to a newly allocated graph object.

References ScenarioGraph().

Referenced by createCopy().

Here is the call graph for this function:

Actor * FSMSADF::ScenarioGraph::createActor ( GraphComponent  c  ) 

createActor () Create a new actor on the graph.

References a, and addActor().

Here is the call graph for this function:

Channel * FSMSADF::ScenarioGraph::createChannel ( Actor src,
Actor dst 
)

createChannel () The function creates a channel between the source and destination actor. Ports with the supplied rates are added to these actors.

References c, FSMSADF::Channel::connectDst(), FSMSADF::Channel::connectSrc(), createChannel(), FSMSADF::Actor::createPort(), getChannels(), FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::GraphComponent(), FSMSADF::Port::In, FSMSADF::Port::Out, and FSMSADF::GraphComponent::setName().

Here is the call graph for this function:

ScenarioGraph * FSMSADF::ScenarioGraph::createCopy ( GraphComponent  c  )  const

createCopy () The function returns a pointer to a newly allocated graph object. All properties of the graph are copied.

References create(), g, FSMSADF::GraphComponent::getName(), getType(), FSMSADF::GraphComponent::setName(), and setType().

Referenced by clone().

Here is the call graph for this function:

Actor * FSMSADF::ScenarioGraph::getActor ( const CString name  ) 

getActor () The function returns a reference to an actor with the given name.

References a, actors, and FSMSADF::GraphComponent::getName().

Here is the call graph for this function:

Channel * FSMSADF::ScenarioGraph::getChannel ( const CString name  ) 

getChannel () The function returns a reference to a channel with the given name.

References c, channels, and FSMSADF::GraphComponent::getName().

Here is the call graph for this function:

Scenario * FSMSADF::ScenarioGraph::getDefaultScenario (  )  const [private]

getDefaultScenario () The function returns a pointer to the default scenario.

References FSMSADF::Graph::getDefaultScenario(), and getGraph().

Referenced by getStorageDistributionsOfScenario(), and hasStorageDistributionsInScenario().

Here is the call graph for this function:

const PersistentTokenMap FSMSADF::ScenarioGraph::getPersistentTokenMap (  )  [inline]

References persistentTokenMap.

const map<Scenario*, StorageDistributions>& FSMSADF::ScenarioGraph::getStorageDistributions (  )  const [inline]

References storageDistributions.

StorageDistributions & FSMSADF::ScenarioGraph::getStorageDistributionsOfScenario ( Scenario s  ) 

getStorageDistributionsOfScenario () The function returns the storage distributions of this scenario graph in scenario s, or when scenario s is not specified it returns the storage distributions in the default scenario. When also no default scenario exists, an exception is thrown.

References getDefaultScenario(), FSMSADF::GraphComponent::getName(), and storageDistributions.

Referenced by FSMSADF::MemoryDimAlgo::computeStorageDist(), convertPropertiesToXML(), FSMSADF::MemoryDimAlgo::estimateStorageDist(), isolateScenario(), and FSMSADF::MemoryDimAlgo::selectStorageDist().

Here is the call graph for this function:

CString FSMSADF::ScenarioGraph::getType (  )  const [inline]

References type.

Referenced by convertToXML(), createCopy(), extractSDFgraph(), and print().

bool FSMSADF::ScenarioGraph::hasActor ( const CString name  ) 

hasActor () The function returns a true when an actor with the given name exists. Otherwise the function returns false.

References a, actors, and FSMSADF::GraphComponent::getName().

Referenced by constructPropertiesFromXML().

Here is the call graph for this function:

bool FSMSADF::ScenarioGraph::hasChannel ( const CString name  ) 

hasChannel () The function returns a true when a channel with the given name exists. Otherwise the function returns false.

References c, channels, and FSMSADF::GraphComponent::getName().

Referenced by constructPropertiesFromXML().

Here is the call graph for this function:

bool FSMSADF::ScenarioGraph::hasStorageDistributionsInScenario ( Scenario s  )  const

hasStorageDistributionsInScenario () The function returns true when storage distributions have been specified for scenario s or through a default scenario. Otherwise the function returns false.

References getDefaultScenario(), and storageDistributions.

Referenced by convertPropertiesToXML(), and isolateScenario().

Here is the call graph for this function:

void FSMSADF::ScenarioGraph::isolateScenario ( Scenario s  ) 
ostream & FSMSADF::ScenarioGraph::print ( ostream &  out  ) 

print () Print the graph to the supplied output stream.

References a, actors, c, channels, FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::getName(), getType(), FSMSADF::Channel::print(), and FSMSADF::Actor::print().

Here is the call graph for this function:

void FSMSADF::ScenarioGraph::removeActor ( const CString name  ) 

removeActor () Remove an actor from a graph.

References a, actors, and FSMSADF::GraphComponent::getName().

Here is the call graph for this function:

void FSMSADF::ScenarioGraph::removeChannel ( const CString name  ) 

removeChannel () Remove a channel from a graph.

References c, channels, and FSMSADF::GraphComponent::getName().

Here is the call graph for this function:

void FSMSADF::ScenarioGraph::setStorageDistributions ( const map< Scenario *, StorageDistributions > &  d  )  [inline]

References storageDistributions.

void FSMSADF::ScenarioGraph::setStorageDistributionsOfScenario ( Scenario s,
const StorageDistributions  d 
)

setStorageDistributionsOfScenario () Set the storage distributions of this scenario graph in scenario s.

References storageDistributions.

Referenced by clone(), FSMSADF::MemoryDimAlgo::computeStorageDist(), constructPropertiesFromXML(), and isolateScenario().

void FSMSADF::ScenarioGraph::setType ( const CString t  )  [inline]

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
ScenarioGraph g 
) [friend]

Member Data Documentation


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