tibia-client/src/framework/otml/otmldocument.h

30 lines
749 B
C++

#ifndef OTMLDOCUMENT_H
#define OTMLDOCUMENT_H
#include "otmlnode.h"
class OTMLDocument : public OTMLNode
{
public:
OTMLDocument() { }
virtual ~OTMLDocument() { }
/// Create a new OTML document for filling it with nodes
static OTMLDocumentPtr create();
/// Parse OTML from a file
static OTMLDocumentPtr parse(const std::string& fileName);
/// Parse OTML from input stream
/// @param source is the file name that will be used to show errors messages
static OTMLDocumentPtr parse(std::istream& in, const std::string& source);
/// Emits this document and all it's children to a std::string
std::string emit();
/// Save this document to a file
bool save(const std::string& fileName);
};
#endif