9 InitWorkingDirectory();
20 std::vector
<std::string
> path
;
22 Path(); // initializes path to getcwd();
23 Path ( const Path
& cwd
, const std::string
& filename
);
24 std::string
Fixup ( const std::string
& filename
, bool include_filename
) const;
26 std::string
RelativeFromWorkingDirectory ();
27 static std::string
RelativeFromWorkingDirectory ( const std::string
& path
);
29 static void Split ( std::vector
<std::string
>& out
,
30 const std::string
& path
,
39 std::string topIncludeFilename
;
42 XMLInclude ( XMLElement
* e_
, const Path
& path_
, const std::string topIncludeFilename_
)
43 : e ( e_
), path ( path_
), topIncludeFilename ( topIncludeFilename_
)
48 class XMLIncludes
: public std::vector
<XMLInclude
*>
56 friend class XMLElement
;
60 bool open(const std::string
& filename
);
64 bool get_token(std::string
& token
);
65 const std::string
& filename() { return _filename
; }
66 std::string
Location() const;
69 std::string _buf
, _filename
;
71 const char *_p
, *_end
;
82 XMLAttribute ( const std::string
& name_
, const std::string
& value_
);
83 XMLAttribute ( const XMLAttribute
& );
84 XMLAttribute
& operator = ( const XMLAttribute
& );
93 std::vector
<XMLAttribute
*> attributes
;
94 XMLElement
* parentElement
;
95 std::vector
<XMLElement
*> subElements
;
98 XMLElement ( const std::string
& location_
);
100 bool Parse(const std::string
& token
,
102 void AddSubElement ( XMLElement
* e
);
103 XMLAttribute
* GetAttribute ( const std::string
& attribute
,
105 const XMLAttribute
* GetAttribute ( const std::string
& attribute
,
106 bool required
) const;
110 XMLLoadFile ( const std::string
& filename
,
112 XMLIncludes
& includes
);