1 #ifdef GYOTO_USE_XERCES 29 #ifndef __GyotoFactory_H_ 30 #define __GyotoFactory_H_ 41 #ifndef XERCES_INCLUDE_WCHAR_H 42 #define XERCES_INCLUDE_WCHAR_H 0 45 #include <xercesc/sax/ErrorHandler.hpp> 46 #include <xercesc/dom/DOM.hpp> 47 #include <xercesc/parsers/XercesDOMParser.hpp> 56 class FactoryMessenger;
57 namespace Spectrometer {
193 void setReporter(xercesc::ErrorHandler*);
195 xercesc::DOMElement * getRoot();
197 xercesc::DOMDocument* getDoc();
201 const std::string kind();
254 void write(
const char*
const fname=0);
257 std::string format();
285 void setContent(std::string content, xercesc::DOMElement *el);
296 void setParameter(std::string name, xercesc::DOMElement *pel);
309 xercesc::DOMElement *pel);
322 xercesc::DOMElement *pel);
335 xercesc::DOMElement *pel);
348 xercesc::DOMElement *pel);
360 void setParameter(std::string name,
unsigned long value,
361 xercesc::DOMElement *pel);
377 xercesc::DOMElement*pel);
392 void setParameter(std::string name,
double val[],
size_t nelem,
393 xercesc::DOMElement* pel,
396 void setParameter(std::string name, std::vector<double>
const &val,
397 xercesc::DOMElement* pel,
400 void setParameter(std::string name, std::vector<unsigned long>
const &val,
401 xercesc::DOMElement* pel,
422 std::string
fullPath(std::string relpath);
xercesc::DOMImplementation * impl_
Xerces implementation.
Definition: GyotoFactory.h:131
std::string filename_
XML file name, if actually reading from or writting to file.
Definition: GyotoFactory.h:158
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.
SmartPointer< Screen > screen_
The Screen read from or written to Factory::doc_.
Definition: GyotoFactory.h:148
SmartPointer< Photon > photon_
The Photon read from or written to Factory::doc_.
Definition: GyotoFactory.h:152
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
SmartPointer< Screen > screen()
Build and get the Screen described in this XML file.
xercesc::DOMXPathNSResolver * resolver_
Xerces resolver.
Definition: GyotoFactory.h:129
std::string kind_
Kind of root element (Scenery, Metric etc.)
Definition: GyotoFactory.h:160
xercesc::XercesDOMParser * parser_
Xerces parser.
Definition: GyotoFactory.h:127
xercesc::DOMDocument * doc_
The document being read or written.
Definition: GyotoFactory.h:123
Compile-time configuration.
xercesc::DOMElement * obj_el_
XML element representing the Astrobj.
Definition: GyotoFactory.h:138
xercesc::DOMElement * ph_el_
XML element representing the Photon.
Definition: GyotoFactory.h:140
Spectrum of a simple object (e.g. Star)
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
SmartPointer< Photon > photon()
Build and get the Photon described in this XML file.
xercesc::DOMElement * root_
Root element in Factory::doc_.
Definition: GyotoFactory.h:125
SmartPointer< Metric::Generic > gg_
The Metric read from or written to Factory::doc_.
Definition: GyotoFactory.h:146
Pointers performing reference counting.
Definition: GyotoProperty.h:45
SmartPointer< Astrobj::Generic > obj_
The Astrobj read from or written to Factory::doc_.
Definition: GyotoFactory.h:150
void setParameter(std::string name)
Output parameter.
xercesc::ErrorHandler * reporter_
Xerces error handler.
Definition: GyotoFactory.h:121
SmartPointer< Metric::Generic > metric()
Build and get the Metric described in this XML file.
SmartPointer< Spectrometer::Generic > spectro_
The Spectrometer read from or written to Factory::doc_.
Definition: GyotoFactory.h:154
XML input/output.
Definition: GyotoFactory.h:114
SmartPointer< Scenery > scenery_
The Scenery read from or written to Factory::doc_.
Definition: GyotoFactory.h:144
xercesc::DOMElement * gg_el_
XML element representing the Metric.
Definition: GyotoFactory.h:136