libglom-1.32 1.31.6

- Main Page
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
GlomBakery::Document_XML Class Reference
Inheritance diagram for GlomBakery::Document_XML:
[legend]
Collaboration diagram for GlomBakery::Document_XML:
[legend]

## Public Member Functions
| Document_XML ()
| ~Document_XML () override
bool | load_after (int& failure_code) override
| Allow app to update icons/title bar. More...
bool | save_before () override
| overrideable. More...
void | set_dtd_name (const std::string& strVal)
std::string | get_dtd_name () const
void | set_dtd_root_node_name (const Glib::ustring& strVal, const Glib::ustring& xmlns=Glib::ustring())
| Set the root node name and (optionally) the xmlns ID to be written when writing the document. More...
Glib::ustring | get_dtd_root_node_name () const
Glib::ustring | get_xml () const
Public Member Functions inherited from GlomBakery::Document
| Document ()
virtual | ~Document ()
bool | save ()
bool | load (int& failure_code)
bool | load_from_data (const guchar* data, std::size_t length, int& failure_code)
bool | get_modified () const
virtual void | set_modified (bool value=true)
bool | get_is_new () const
| Whether this just a default document. More...
void | set_is_new (bool value)
| Called by AppWindow_WithDoc::init_create_document(). More...
Glib::ustring | get_contents () const
Glib::ustring | get_file_uri_with_extension (const Glib::ustring& uri)
Glib::ustring | get_file_uri () const
virtual void | set_file_uri (const Glib::ustring& file_uri, bool bEnforceFileExtension=false)
virtual Glib::ustring | get_name () const
| Gets filename part of file_uri, or 'untitled'. More...
bool | get_read_only () const
void | set_read_only (bool value)
void | set_view (ViewBase* pView)
| If you don't want to use a View, then don't use set_view(). More...
ViewBase* | get_view ()
void | set_file_extension (const Glib::ustring& strVal)
Glib::ustring | get_file_extension () const
type_signal_modified& | signal_modified ()
| This signal is emitted when the document has been modified. More...

## Protected Types
typedef GlomBakery::Document | type_base

## Protected Member Functions
const xmlpp::Element* | get_node_document () const
xmlpp::Element* | get_node_document ()
void | Util_DOM_Write (Glib::ustring& refstrXML) const
void | add_indenting_white_space_to_node (xmlpp::Node* node=0, const Glib::ustring& start_indent=Glib::ustring())
| Put each node on its own line and add white space for indenting, even if there are child text nodes. More...
Protected Member Functions inherited from GlomBakery::Document
bool | read_from_disk (int& failure_code)
bool | write_to_disk ()

## Protected Attributes
xmlpp::DomParser | m_dom_parser
xmlpp::Document* | m_dom_document
std::string | m_dtd_name
Glib::ustring | m_root_node_name
Glib::ustring | m_root_xmlns
bool | m_write_formatted
Protected Attributes inherited from GlomBakery::Document
Glib::ustring | m_strContents
Glib::ustring | m_file_uri
Glib::ustring | m_file_extension
ViewBase* | m_view
type_signal_modified | signal_modified_
bool | m_modified
bool | m_is_new
bool | m_read_only

## Additional Inherited Members
Public Types inherited from GlomBakery::Document
enum | LoadFailureCodes { LoadFailureCodes::NONE = 0, LoadFailureCodes::NOT_FOUND = 1, LoadFailureCodes::LAST = 20 }
typedef sigc::signal< void(bool)> | type_signal_modified
| For instance, void on_document_modified(bool modified);. More...
Static Public Member Functions inherited from GlomBakery::Document
static Glib::ustring | util_file_uri_get_name (const Glib::ustring& file_uri, const Glib::ustring& file_extension)

## Member Typedef Documentation

typedef GlomBakery::Document GlomBakery::Document_XML::type_base
| protected

## Constructor & Destructor Documentation

GlomBakery::Document_XML::Document_XML | ( |  | ) |

GlomBakery::Document_XML::~Document_XML | ( |  | ) |
| override

## Member Function Documentation

void GlomBakery::Document_XML::add_indenting_white_space_to_node | ( | xmlpp::Node * | node = `0`,
|  | const Glib::ustring & | start_indent = `Glib::ustring()`
| ) |  |
| protected

Put each node on its own line and add white space for indenting, even if there are child text nodes.

set_write_formatted() does not cause nodes to be indented if there are child text nodes, because it assumes that the white space is then significant.

std::string GlomBakery::Document_XML::get_dtd_name | ( |  | ) | const

Glib::ustring GlomBakery::Document_XML::get_dtd_root_node_name | ( |  | ) | const

const xmlpp::Element* GlomBakery::Document_XML::get_node_document | ( |  | ) | const
| protected

xmlpp::Element* GlomBakery::Document_XML::get_node_document | ( |  | ) |
| protected

Glib::ustring GlomBakery::Document_XML::get_xml | ( |  | ) | const

bool GlomBakery::Document_XML::load_after | ( | int & | failure_code | ) |
| override virtual

Allow app to update icons/title bar.

overrideable. Does anything which should be done after the data has been loaded from disk, but before updating the View.

Parameters

  failure_code | Used to return a custom error code that is understood by your application. This must be greater than zero.

Reimplemented from GlomBakery::Document.

bool GlomBakery::Document_XML::save_before | ( |  | ) |
| override virtual

overrideable.

Does anything which should be done before the view has saved its data, before writing to disk..

Reimplemented from GlomBakery::Document.

void GlomBakery::Document_XML::set_dtd_name | ( | const std::string & | strVal | ) |

void GlomBakery::Document_XML::set_dtd_root_node_name | ( | const Glib::ustring & | strVal,
|  | const Glib::ustring & | xmlns = `Glib::ustring()`
| ) |  |

Set the root node name and (optionally) the xmlns ID to be written when writing the document.

The root node name is also used when reading documents.

void GlomBakery::Document_XML::Util_DOM_Write | ( | Glib::ustring & | refstrXML | ) | const
| protected

## Member Data Documentation

xmlpp::Document* GlomBakery::Document_XML::m_dom_document
| protected

xmlpp::DomParser GlomBakery::Document_XML::m_dom_parser
| protected

std::string GlomBakery::Document_XML::m_dtd_name
| protected

Glib::ustring GlomBakery::Document_XML::m_root_node_name
| protected

Glib::ustring GlomBakery::Document_XML::m_root_xmlns
| protected

bool GlomBakery::Document_XML::m_write_formatted
| protected

The documentation for this class was generated from the following file:

- libglom/document/bakery/document_xml.h