FREE::ComponentMediaLink Class Reference
[Setup]

Class providing the possibility to store and retrieve a media link for a component. More...

#include <freComponentMediaLink.h>

Inheritance diagram for FREE::ComponentMediaLink:

Inheritance graph
FREE::XMLStreamObject
[legend]
Collaboration diagram for FREE::ComponentMediaLink:

Collaboration graph
FREE::XMLStreamObjectFREE::IDPath
[legend]

List of all members.

Public Types

typedef
ComponentMediaLink 
Self
typedef itk::LightObject Superclass
typedef
itk::SmartPointer
< Self
Pointer
typedef
itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetNameOfClass () const
virtual
::itk::LightObject::Pointer 
CreateAnother (void) const
void SetMediaID (const std::string &sMediaID)
std::string GetMediaID () const
void SetTemplateID (const std::string &sTemplateID)
const std::string & GetTemplateID () const
bool IsTemplateBased () const
void SetSourceIDPath (const IDPath &sourcePath)
IDPath GetSourceIDPath () const
virtual void Reset ()
virtual
ComponentMediaLink
operator= (const ComponentMediaLink &rLink)

Static Public Member Functions

static Pointer New (void)

Protected Member Functions

 ComponentMediaLink ()
virtual ~ComponentMediaLink ()
virtual void AttributesLoadProcessing (const AttributesType &rAttributes)
virtual void SaveAttributes (AttributesSaveListType &rAttributes) const
virtual void SubElementLoadProcessing (const std::string &rsXMLSubTag, const std::string &rsXMLSubElement, const std::string &rsXMLSubData)
virtual std::string SaveData (const unsigned int &iDepth, bool &bHasSubElements) const

Protected Attributes

std::string m_sMediaID
std::string m_sTemplateID
IDPath m_SourcePath

Private Member Functions

 ComponentMediaLink (const ComponentMediaLink &rLink)


Detailed Description

Class providing the possibility to store and retrieve a media link for a component.

Definition at line 40 of file freComponentMediaLink.h.


Member Typedef Documentation

typedef ComponentMediaLink FREE::ComponentMediaLink::Self

Definition at line 43 of file freComponentMediaLink.h.

typedef itk::LightObject FREE::ComponentMediaLink::Superclass

Definition at line 44 of file freComponentMediaLink.h.

typedef itk::SmartPointer<Self> FREE::ComponentMediaLink::Pointer

Definition at line 45 of file freComponentMediaLink.h.

typedef itk::SmartPointer<const Self> FREE::ComponentMediaLink::ConstPointer

Definition at line 46 of file freComponentMediaLink.h.


Constructor & Destructor Documentation

FREE::ComponentMediaLink::ComponentMediaLink (  )  [protected]

Definition at line 30 of file freComponentMediaLink.cxx.

References Reset().

Here is the call graph for this function:

FREE::ComponentMediaLink::ResetFREE::IDPath::ResetFREE::XMLStreamObject::Reset

FREE::ComponentMediaLink::~ComponentMediaLink (  )  [protected, virtual]

Definition at line 49 of file freComponentMediaLink.cxx.

FREE::ComponentMediaLink::ComponentMediaLink ( const ComponentMediaLink rLink  )  [private]


Member Function Documentation

virtual const char* FREE::ComponentMediaLink::GetNameOfClass (  )  const [inline, virtual]

Reimplemented from FREE::XMLStreamObject.

Definition at line 48 of file freComponentMediaLink.h.

static Pointer FREE::ComponentMediaLink::New ( void   )  [inline, static]

Definition at line 49 of file freComponentMediaLink.h.

Referenced by FREE::ComponentMediaLinks::SubElementLoadProcessing().

virtual ::itk::LightObject::Pointer FREE::ComponentMediaLink::CreateAnother ( void   )  const [inline, virtual]

Definition at line 49 of file freComponentMediaLink.h.

void FREE::ComponentMediaLink::SetMediaID ( const std::string &  sMediaID  )  [inline]

Definition at line 51 of file freComponentMediaLink.h.

References m_sMediaID.

Referenced by operator=().

std::string FREE::ComponentMediaLink::GetMediaID (  )  const [inline]

Definition at line 52 of file freComponentMediaLink.h.

References m_sMediaID.

Referenced by FREE::GenericSetupToImageAdaptor::AdaptComponent(), FREE::GenericSetupToImageAdaptor::ExtendComponent(), FREE::ComponentControllerBase< TControlledComponent >::GenerateProfileTemplateRealization(), FREE::ComponentMediaLinkIdentifier::KeyMatches(), and operator=().

void FREE::ComponentMediaLink::SetTemplateID ( const std::string &  sTemplateID  )  [inline]

Sets the template ID (ID of the media link (in the profile) that was the template for this link

Definition at line 56 of file freComponentMediaLink.h.

References m_sTemplateID.

Referenced by operator=().

const std::string& FREE::ComponentMediaLink::GetTemplateID (  )  const [inline]

Gets the template id

Definition at line 58 of file freComponentMediaLink.h.

References m_sTemplateID.

Referenced by FREE::ComponentControllerBase< TControlledComponent >::GenerateProfileTemplateRealization(), and operator=().

bool FREE::ComponentMediaLink::IsTemplateBased (  )  const [inline]

Indicates if the link is based on a profile template or a concrete profile definition.

Definition at line 61 of file freComponentMediaLink.h.

References m_sTemplateID.

Referenced by FREE::ComponentControllerBase< TControlledComponent >::GenerateProfileTemplateRealization().

void FREE::ComponentMediaLink::SetSourceIDPath ( const IDPath sourcePath  )  [inline]

Definition at line 63 of file freComponentMediaLink.h.

References m_SourcePath.

Referenced by operator=().

IDPath FREE::ComponentMediaLink::GetSourceIDPath (  )  const [inline]

Definition at line 64 of file freComponentMediaLink.h.

References m_SourcePath.

Referenced by FREE::ComponentControllerBase< TControlledComponent >::GetMediaControllerID(), and operator=().

void FREE::ComponentMediaLink::Reset (  )  [virtual]

Resets the object to default/initial state

Reimplemented from FREE::XMLStreamObject.

Definition at line 55 of file freComponentMediaLink.cxx.

References m_sMediaID, m_SourcePath, m_sTemplateID, FREE::IDPath::Reset(), and FREE::XMLStreamObject::Reset().

Referenced by ComponentMediaLink().

Here is the call graph for this function:

FREE::IDPath::ResetFREE::XMLStreamObject::Reset

ComponentMediaLink & FREE::ComponentMediaLink::operator= ( const ComponentMediaLink rLink  )  [virtual]

Assignment operator.

Definition at line 37 of file freComponentMediaLink.cxx.

References GetMediaID(), GetSourceIDPath(), GetTemplateID(), SetMediaID(), SetSourceIDPath(), and SetTemplateID().

Here is the call graph for this function:

FREE::ComponentMediaLink::GetMediaIDFREE::ComponentMediaLink::GetSourceIDPathFREE::ComponentMediaLink::GetTemplateIDFREE::ComponentMediaLink::SetMediaIDFREE::ComponentMediaLink::SetSourceIDPathFREE::ComponentMediaLink::SetTemplateID

void FREE::ComponentMediaLink::AttributesLoadProcessing ( const AttributesType rAttributes  )  [protected, virtual]

Definition at line 66 of file freComponentMediaLink.cxx.

References FREE::cXML_MediaID, FREE::cXML_TemplateID, m_sMediaID, and m_sTemplateID.

void FREE::ComponentMediaLink::SaveAttributes ( AttributesSaveListType rAttributes  )  const [protected, virtual]

Definition at line 77 of file freComponentMediaLink.cxx.

References FREE::cXML_MediaID, FREE::cXML_TemplateID, m_sMediaID, and m_sTemplateID.

void FREE::ComponentMediaLink::SubElementLoadProcessing ( const std::string &  rsXMLSubTag,
const std::string &  rsXMLSubElement,
const std::string &  rsXMLSubData 
) [protected, virtual]

Function is called by after the parser has extracted a new sub element out of the xml data string. The tag of the sub element is passed, along with its data and a string containing the total element (needed to call subsequent LoadFromString). To change the loading behaviour, this class should be reimplemented. This function is also called for plain text data of the element. In this case rsXMLTag is cXML_Text (an empty string), if not there is a real sub element in the data. Depending on the structure the text case (rsXMLTag==cXML_Text) could occure more then once.

Example:

 <Element>aaaaaa<SubElement>bbbbbb</Subelement>cccccc</Element>\n
This string passed as rsXMLData in a call of LoadFromXMLString() would cause 3 calls of SubElementLoadProcessing() with following parameters:
1. rsXMLTag == cXML_Text; rsXMLSubElement == "aaaaaa"; rsXMLSubData == "aaaaaa"
2. rsXMLTag == "Subelement"; rsXMLSubElement == "<SubElement>bbbbbb</Subelement>"; rsXMLSubData == "bbbbbb"
1. rsXMLTag == cXML_Text; rsXMLSubElement == "cccccc"; rsXMLSubElement == "cccccc"
Parameters:
[in] rsXMLSubTag Reference to the tag of xml to be loaded with the function call.
[in] rsXMLSubElement Reference to the whole element string (with attributes, start and end tag).
[in] rsXMLSubData Reference to the whole data of the xml element (without start and end tag)

Reimplemented from FREE::XMLStreamObject.

Definition at line 86 of file freComponentMediaLink.cxx.

References FREE::cXML_IDPath, FREE::XMLStreamObject::LoadFromString(), and m_SourcePath.

Here is the call graph for this function:

FREE::XMLStreamObject::LoadFromStringFREE::XMLStreamObject::CB_Static_EndElementFREE::XMLStreamObject::CB_Static_StartElementFREE::XMLStreamObject::CheckValidLoadingFREE::XMLStreamObject::FinalizeLoadingFREE::XMLStreamObject::ResetFREE::XMLStreamObject::ResetLoadingHelpersFREE::XMLStreamObject::ResetRequirementsFREE::Convert::ToStrFREE::XMLStreamObject::CB_EndElementFREE::XMLStreamObject::CB_Static_CharacterDataHandlerFREE::XMLStreamObject::CommitSubElementFREE::XMLStreamObject::CB_CharacterDataHandlerFREE::XMLStreamObject::ExtractSubElementContentStringFREE::XMLStreamObject::ExtractSubElementXmlStringFREE::XMLStreamObject::NotifyFoundSubElementFREE::XMLStreamObject::SubElementLoadProcessingFREE::XMLStreamObject::CB_StartElementFREE::XMLStreamObject::AttributesLoadProcessingFREE::XMLStreamObject::ConvertExpatAttrToMapFREE::XMLStreamObject::GetXMLTagFREE::XMLStreamObject::SetNeededSubElements

std::string FREE::ComponentMediaLink::SaveData ( const unsigned int &  iDepth,
bool &  bHasSubElements 
) const [protected, virtual]

Function that returns the data of the object converted to a xml element. This function is called by SaveToString() to compose the whole xml string and should contain the data/value of the xml element couples.

Parameters:
[in] iDepth The depth of the data within the xml structure tree. Used to realize correct indentation of the formated data by AddIndentation().
[out] bHasSubElements Indicates whether the data string contains sub elements or just a plain value. By default bHasSubElements is true when the functon is called by SaveToString(). Reset the value to reset behavior of SaveToString. Example: <element attr1="1" attr2="a">aaaaaa<subElement>bbbbbb</subelement></element> For this xml string the function should return: "aaaaaa<subElement>bbbbbb</subElement>"
Returns:
Data of the xml as xml string.

Reimplemented from FREE::XMLStreamObject.

Definition at line 93 of file freComponentMediaLink.cxx.

References FREE::XMLStreamObject::AddSubElement(), FREE::IDPath::IsEmpty(), and m_SourcePath.

Here is the call graph for this function:

FREE::XMLStreamObject::AddSubElementFREE::IDPath::IsEmptyFREE::XMLStreamObject::AddIndentationFREE::XMLStreamObject::CreateSimpleElementFREE::Convert::ToStr


Member Data Documentation

std::string FREE::ComponentMediaLink::m_sMediaID [protected]

Definition at line 86 of file freComponentMediaLink.h.

Referenced by AttributesLoadProcessing(), GetMediaID(), Reset(), SaveAttributes(), and SetMediaID().

std::string FREE::ComponentMediaLink::m_sTemplateID [protected]

If this media link is based on a link template of the profile, the mediaID of the template will be stored as template ID to mark this fact. This is needed e.g. to allow the generation of proper component profiles. (see also ComponentControllerBase::GenerateProfileTemplateRealization()

Definition at line 93 of file freComponentMediaLink.h.

Referenced by AttributesLoadProcessing(), GetTemplateID(), IsTemplateBased(), Reset(), SaveAttributes(), and SetTemplateID().

IDPath FREE::ComponentMediaLink::m_SourcePath [protected]

Definition at line 95 of file freComponentMediaLink.h.

Referenced by GetSourceIDPath(), Reset(), SaveData(), SetSourceIDPath(), and SubElementLoadProcessing().


The documentation for this class was generated from the following files:
Generated at Sat Oct 13 18:29:30 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000