Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Document Class Reference

The Document class manages all node data. More...

List of all members.

Public Member Functions

 Document (const QString &s)
 Creates a new instance of this class.

 ~Document ()
 Deletes all node data and the instance.

void setData (List *newData, NodeIdMap *m)
 Initializes the document with the data built by the parser.

ReentNodefindReentrancy (int ref)
 Returns the ReentNode with the given reference ID.

GenericNodefindNodeById (char *id)
 Returns a node given its ID.

unsigned int maxID (void)
 Returns the highest node ID in the document.

QString getName ()
 Returns the name of the document.

void write (FILE *file)
 Writes the document to a file.


Public Attributes

QList< GenericNode > * data
 A list that contains a ll structure nodes (that is all nodes except trees, relations and reentrancies).

.


QList< ReentNode > * Reent
 A list of all ReentNodes in the data.

TreeNodetree
 Pointer to the root node of the tree structure, or NULL, if no tree exists.

QList< RelationNode > * rel
 A list of all RelationNodes in the data.

NodeIdMapmap
 A NodeIdMap that maps node IDs to the corresponding nodes.

int showDefault
 Determines how this document should be displayed when a view window is opened, one of the DRAW_xxxx constants.


Private Attributes

QString name
 The name of this document.


Detailed Description

The Document class manages all node data.

It provides several accessor methods to different parts of the data (main feature structure, tree structure, etc.). Furthermore, it maintains a mapping between node IDs and corresponding nodes.

Author:
Holger Wunsch


Constructor & Destructor Documentation

Document::Document const QString &  s  ) 
 

Creates a new instance of this class.

Parameters:
s the name of this document. Appears on the titlebar of a view window that displays this document.

Document::~Document  ) 
 

Deletes all node data and the instance.


Member Function Documentation

GenericNode * Document::findNodeById char *  id  ) 
 

Returns a node given its ID.

Parameters:
id the node ID.
Returns:
the node, or NULL if no node with this ID was found.

ReentNode * Document::findReentrancy int  ref  ) 
 

Returns the ReentNode with the given reference ID.

Returns:
the corresponding ReentNode or NULL if no ReentNode was found.

QString Document::getName  ) 
 

Returns the name of the document.

The name appears on the titlebar of a view window that displays this document.

Returns:
the document's name.

unsigned int Document::maxID void   ) 
 

Returns the highest node ID in the document.

Returns:
the highest node ID.

void Document::setData List newData,
NodeIdMap m
 

Initializes the document with the data built by the parser.

Parameters:
newData a List of all nodes. Nodes are automatically sorted into the data, Reent, tree and rel data members.
m the NodeIdMap that maps node IDs to the corresponding nodes.

void Document::write FILE *  file  ) 
 

Writes the document to a file.

Only the node data as it is sent by the backend is written to the file, not any modifications users applied (that is, DisplayableNode properties are not saved).

Parameters:
file a file handle of a file opened with write access.


Member Data Documentation

QList<GenericNode>* Document::data
 

A list that contains a ll structure nodes (that is all nodes except trees, relations and reentrancies).

.

Note:The first element on this list must be the root node of the main feature structure.

NodeIdMap* Document::map
 

A NodeIdMap that maps node IDs to the corresponding nodes.

QString Document::name [private]
 

The name of this document.

This name appears on the titlebar in a view window that displays this document.

QList<ReentNode>* Document::Reent
 

A list of all ReentNodes in the data.

This list may be empty.

QList<RelationNode>* Document::rel
 

A list of all RelationNodes in the data.

This list may be empty.

int Document::showDefault
 

Determines how this document should be displayed when a view window is opened, one of the DRAW_xxxx constants.

TreeNode* Document::tree
 

Pointer to the root node of the tree structure, or NULL, if no tree exists.


Generated on Sun Apr 27 18:26:57 2003 for Grisu by doxygen1.3