Version: 8.3.0
YACS::HMI::YACSGuiLoader Class Reference

#include <YACSGuiLoader.hxx>

Inheritance diagram for YACS::HMI::YACSGuiLoader:
Collaboration diagram for YACS::HMI::YACSGuiLoader:

Public Member Functions

 YACSGuiLoader ()
 
virtual ~YACSGuiLoader ()
 
virtual void reset ()
 
virtual YACS::ENGINE::Procload (const char *filename)
 
std::map< YACS::ENGINE::Node
*, PrsData
getPrsData (YACS::ENGINE::Proc *proc)
 
void process (std::string element, bool newLink=false)
 
- Public Member Functions inherited from YACS::YACSLoader
 YACSLoader ()
 
virtual ~YACSLoader ()
 
void registerProcCataLoader ()
 

Private Attributes

std::map< YACS::ENGINE::Node
*, PrsData
_prsMap
 
std::map< std::string, PrsData_inputMap
 

Additional Inherited Members

- Protected Attributes inherited from YACS::YACSLoader
std::map< std::string, parser * > _defaultParsersMap
 

Detailed Description

Class that extends engine XML loader. It can process the presentation data not hanled by the base class.

Definition at line 87 of file YACSGuiLoader.hxx.

Constructor & Destructor Documentation

YACSGuiLoader::YACSGuiLoader ( )

Definition at line 33 of file YACSGuiLoader.cxx.

References YACS::YACSLoader::_defaultParsersMap, _inputMap, _prsMap, YACS::HMI::presentationtype_parser::collector_, and presentation_parser.

34  : YACSLoader()
35 {
37  _defaultParsersMap.insert(make_pair("presentation", &presentation_parser));
38  _inputMap.clear();
39  _prsMap.clear();
40 }
YACSGuiLoader::~YACSGuiLoader ( )
virtual

Definition at line 42 of file YACSGuiLoader.cxx.

43 {
44 }

Member Function Documentation

std::map< YACS::ENGINE::Node *, PrsData > YACSGuiLoader::getPrsData ( YACS::ENGINE::Proc proc)

Definition at line 57 of file YACSGuiLoader.cxx.

References YACS::YACSLoader::_defaultParsersMap, _inputMap, _prsMap, and YACS::ENGINE::ComposedNode::getChildByName().

58 {
59  _prsMap.clear();
60 
61  if (_defaultParsersMap.empty()) return _prsMap;
62 
63  for (map<string, PrsData>::iterator it = _inputMap.begin(); it != _inputMap.end(); ++it)
64  {
65  Node* node = 0;
66  string name = (*it).first;
67 
68  if (name == "__ROOT__")
69  node = proc;
70  else
71  {
72  try
73  {
74  node = proc->getChildByName(name);
75  }
76  catch(Exception& ex)
77  {
78  continue;
79  }
80  }
81  _prsMap[node] = (*it).second;
82  }
83  return _prsMap;
84 }
YACS::ENGINE::Proc * YACSGuiLoader::load ( const char *  filename)
virtual

Reimplemented from YACS::YACSLoader.

Definition at line 51 of file YACSGuiLoader.cxx.

References _inputMap, and YACS::YACSLoader::load().

Referenced by YACS::HMI::BatchJobsListDialog::userOK().

52 {
53  _inputMap.clear();
54  return YACS::YACSLoader::load(filename);
55 }
void YACSGuiLoader::process ( std::string  element,
bool  newLink = false 
)
void YACSGuiLoader::reset ( )
virtual

Definition at line 46 of file YACSGuiLoader.cxx.

References _inputMap.

Referenced by gui.graph.grid::findPath().

47 {
48  _inputMap.clear();
49 }

Member Data Documentation

std::map<std::string, PrsData> YACS::HMI::YACSGuiLoader::_inputMap
private

Definition at line 101 of file YACSGuiLoader.hxx.

Referenced by getPrsData(), load(), process(), reset(), and YACSGuiLoader().

std::map<YACS::ENGINE::Node*, PrsData> YACS::HMI::YACSGuiLoader::_prsMap
private

Definition at line 100 of file YACSGuiLoader.hxx.

Referenced by getPrsData(), and YACSGuiLoader().


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