improve the xml serializer

while here:
- do some refactoring in BaseExpression
This commit is contained in:
2023-02-26 22:19:46 +01:00
parent 0fbd988eda
commit cf377204a9
8 changed files with 324 additions and 199 deletions
+21 -1
View File
@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2022, Tomasz Sowa
* Copyright (c) 2022-2023, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -46,13 +46,33 @@ class XMLConnector : public FlatConnector
public:
XMLConnector();
virtual void set_putting_doctype(bool put_doctype);
virtual void set_putting_root_element(bool put_root_element);
virtual bool get_putting_doctype();
virtual bool get_putting_root_element();
virtual void set_root_element(const wchar_t * root_name);
virtual void set_root_element(const std::wstring & root_name);
virtual std::wstring & get_root_element();
void to_text(pt::TextStream & stream, Model & model);
protected:
bool put_doctype;
bool put_root_element;
std::wstring root_element_name;
void allocate_default_expression();
virtual void put_doctype_definition(pt::TextStream & stream);
virtual void put_opening_root_element(pt::TextStream & stream);
virtual void put_closing_root_element(pt::TextStream & stream);
virtual void put_root_element_name(pt::TextStream & stream);
};
}