Go to the documentation of this file.
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>
44 class FactoryMessenger;
45 namespace Metric {
class Generic; }
46 namespace Astrobj {
class Generic; }
47 namespace Spectrum {
class Generic ; }
170 std::string* content,
171 std::string* unit=NULL);
396 void setParameter(std::string name, std::vector<double>
const &val,
398 void setParameter(std::string name, std::vector<unsigned long>
const &val,
473 static size_t parseArray(std::string src,
double dst[],
size_t max_tokens);
void setParameter(std::string name, unsigned long value)
Output parameter.
XMLSize_t curNodeIndex_
Current child.
Definition: GyotoFactoryMessenger.h:102
void setSelfAttribute(std::string attrname, unsigned long value)
Set attribute in FactoryMessenger::element_.
void setSelfAttribute(std::string attrname, std::string value)
Set attribute in FactoryMessenger::element_.
Reference-counting pointers.
void setSelfAttribute(std::string attrname, unsigned int value)
Set attribute in FactoryMessenger::element_.
xercesc::DOMNodeList * children_
The children of the XML element concerned by this transaction.
Definition: GyotoFactoryMessenger.h:98
static size_t parseArray(std::string src, double dst[], size_t max_tokens)
Parse string into array.
std::string getSelfAttribute(std::string attrname) const
Get attribute of FactoryMessenger::element_.
FactoryMessenger(const FactoryMessenger &parent, std::string)
Constructor called before fillElement.
FactoryMessenger(Gyoto::Factory *, xercesc::DOMElement *)
Constructor called before subcontracting.
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
FactoryMessenger * makeChild(std::string name)
Create child FactoryMessenger.
int getNextParameter(std::string *name, std::string *content, std::string *unit=NULL)
Get name and value of next parameter.
void setParameter(std::string name, unsigned int value)
Output parameter.
void setParameter(std::string name)
Output parameter.
void astrobj(SmartPointer< Astrobj::Generic >)
Set the Astrobj.
SmartPointer< Photon > photon()
Build and get the Photon described in this XML file.
Gyoto ubiquitous macros and typedefs.
void setParameter(std::string name, std::vector< unsigned long > const &val, FactoryMessenger **child=NULL)
Output a vector of parameters.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
SmartPointer< Metric::Generic > metric()
Build and get the Metric described in this XML file.
Gyoto::Factory * employer_
The Factory that sent this messenger.
Definition: GyotoFactoryMessenger.h:94
void setSelfAttribute(std::string attrname, double value)
Set attribute in FactoryMessenger::element_.
std::string getAttribute(std::string attrname) const
Get attribute of a last retrieved parameter.
void setFullContent(std::string value)
Low level, prefer setParameter()
static std::vector< unsigned long > parseArrayULong(std::string src)
Parse string into array.
void setParameter(std::string name, std::string value)
Output parameter.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
std::string getFullContent() const
Get full content of element_.
SmartPointer< Screen > screen()
Build and get the Screen described in this XML file.
SmartPointer< Astrobj::Generic > astrobj()
Build and get the Astrobj described in this XML file.
std::string fullPath(std::string relpath)
Transform path into full path specification.
void setParameter(std::string name, double value)
Output parameter.
void reset()
Get back to first parameter.
void setParameter(std::string name, double val[], size_t n, FactoryMessenger **child=NULL)
Output an array of parameters.
xercesc::DOMElement * element_
The XML element concerned by this transaction.
Definition: GyotoFactoryMessenger.h:96
XML input/output.
Definition: GyotoFactory.h:115
FactoryMessenger * getChild() const
Get another FactoryMessenger instance initialized to current child.
void setParameter(std::string name, long int value)
Output parameter.
static std::vector< double > parseArray(std::string src)
Parse string into array.
void screen(SmartPointer< Screen >)
Set the Screen.
XMLSize_t nodeCount_
The number of children of the XML element concerned by this transaction.
Definition: GyotoFactoryMessenger.h:100
void metric(SmartPointer< Metric::Generic >)
Set the Metric.
void setParameter(std::string name, int value)
Output parameter.