Home You are here: Home > Support > Reference v1.0

Change language: German

XmDocument Class Reference

Inheritance diagram for XmDocument:

XmObject List of all members.

Detailed Description

Class is used as a document, when using the exom application/document model.

A document is the container of exactly one document base. The documents themselves are controlled by the superior XmApplication. The main features of a document are create, open, close and save the content of its document base. So the document base itself has no need to to this standard actions. There are two possibilities to contstruct an instance of a document:

  • Create an instance of XmDocument directy and supply a document base.
  • Derive from this class and implement DocBase() with your own document base.

More information in section Application / Document Model.


Public Member Functions

bool IsDocPathSet () const
 Return true, if filepath of document is set.
const XmStringGetFilePath () const
 Return the path of the document.
bool GetModified () const
 Return true, if document was modified.
XmObjectGetDocBase ()
 Supply the document base.
 XmDocument ()
 Construct a document without a document base.
 XmDocument (XmObject *ownDocBase)
 Construct a document with a given document base.
bool GetFilename (XmString &filename) const
 Get the filename (without directory path) of the document.
void SetDocModified (bool iModified)
 Set a flag to indicate that document was modified or not.
bool SaveChanges ()
 Save the content of the document base.
bool CloseDocument ()
 Close the document.
XmDocumentGetNextDoc () const
 Return the next document in the application/document model.
void DocPath (XmPath &path) const
 Return the path to the document.
void DocBasePath (XmPath &path) const
 Return the path to the document base.

Static Public Member Functions

static XmDocumentGetFirstDoc ()
 Return the first document in the application/document model.

Protected Member Functions

Overridables
virtual XmObjectDocBase ()
 Return the document base object of this document.
Overridables - XmObject
XMOBJ ObjectID () const
 Return the ID of an object.
void ObjSet (XmObjSetCx &os) const
 Enable various exom features by setting the corresponding MAN_MODE bits.
void manage (XmMan &m)
 Provide the possibility to connect member data and sub objects.
void manageFcn (XmManFcn &m)
 Defines the object functions usable in user interface.
ARESULT OnAction (XmActionCx &ac)
 Is called, when processing user action.


Constructor & Destructor Documentation

XmDocument  ) 
 

Construct a document without a document base.

DocBase() have to be implemented, in the derivation of XmDocument.

XmDocument XmObject ownDocBase  ) 
 

Construct a document with a given document base.

Document will delete document base, when itself will be deleted.


Member Function Documentation

bool IsDocPathSet  )  const [inline]
 

Return true, if filepath of document is set.

Flag is true after loading or saving a document. It is false when creating a document with "New..." in user interface.

XMOBJ ObjectID  )  const [inline, protected, virtual]
 

Return the ID of an object.

The ID give the exom framework the possibility to identify a class derived from XmObject. So all classes derived from XmObject should have their own ID.

Implements XmObject.

void ObjSet XmObjSetCx os  )  const [inline, protected, virtual]
 

Enable various exom features by setting the corresponding MAN_MODE bits.

By default XmObjSetCx::Enbl is set to MAN_ITEM, which enable all standard exom features, described in description of XmObject. For example, if an object should not support serialization, mask out the serialization bits MAN_SERIALIZE.

Reimplemented from XmObject.

void manage XmMan m  )  [protected, virtual]
 

Provide the possibility to connect member data and sub objects.

Member data and sub objects can be connected, by calling the corresponding manXxx functions of XmMan.

Implements XmObject.

void manageFcn XmManFcn m  )  [protected, virtual]
 

Defines the object functions usable in user interface.

All functions included manageFcn() are visible in user interface. The availibility is controlled by MemberState().

Reimplemented from XmObject.

ARESULT OnAction XmActionCx ac  )  [protected, virtual]
 

Is called, when processing user action.

OnAction give the application the possibility to handle user input via the user interface. For example: range checks or additional actions like closing a dialog. This function is called recursive in the member hierarchy.

Reimplemented from XmObject.


Copyright © 2006 Praetz Software Development - www.exomware.com