5 #ifdef GYOTO_USE_XERCES
25 #ifndef __GyotoFactoryMessenger_H_
26 #define __GyotoFactoryMessenger_H_
33 #ifndef XERCES_INCLUDE_WCHAR_H
34 #define XERCES_INCLUDE_WCHAR_H 0
36 #include <xercesc/dom/DOMElement.hpp>
43 class FactoryMessenger;
44 namespace Metric {
class Generic; }
45 namespace Astrobj {
class Generic; }
46 namespace Spectrum {
class Generic ; }
91 class Gyoto::FactoryMessenger {
93 Gyoto::Factory* employer_;
95 xercesc::DOMElement *element_;
97 xercesc::DOMNodeList* children_;
101 XMLSize_t curNodeIndex_;
104 FactoryMessenger(Gyoto::Factory*, xercesc::DOMElement*);
106 FactoryMessenger(
const FactoryMessenger& parent, std::string) ;
121 SmartPointer<Metric::Generic> metric () ;
131 SmartPointer<Screen> screen () ;
141 SmartPointer<Photon> getPhoton () ;
151 SmartPointer<Astrobj::Generic> astrobj () ;
168 int getNextParameter(std::string* name,
169 std::string* content,
170 std::string* unit=NULL);
184 std::string getSelfAttribute(std::string attrname)
const ;
196 std::string getAttribute(std::string attrname)
const ;
212 std::string getFullContent()
const ;
233 FactoryMessenger * getChild()
const ;
249 std::string fullPath(std::string relpath) ;
280 void metric(SmartPointer<Metric::Generic>);
286 void astrobj(SmartPointer<Astrobj::Generic>);
292 void screen(SmartPointer<Screen>);
306 void setParameter(std::string name);
316 void setParameter(std::string name,
double value);
326 void setParameter(std::string name,
long int value);
336 void setParameter(std::string name,
unsigned int value);
346 void setParameter(std::string name,
unsigned long value);
356 void setParameter(std::string name,
int value);
365 void setParameter(std::string name, std::string value);
391 void setParameter(std::string name,
double val[],
size_t n,
392 FactoryMessenger** child= NULL);
407 void setSelfAttribute(std::string attrname, std::string value) ;
413 void setSelfAttribute(std::string attrname,
unsigned long value) ;
419 void setSelfAttribute(std::string attrname,
unsigned int value) ;
425 void setSelfAttribute(std::string attrname,
double value) ;
435 void setFullContent(std::string value) ;
456 FactoryMessenger* makeChild(std::string name);
Reference-counting pointers.
Gyoto ubiquitous macros and typedefs.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:42