Back to index

salome-kernel  6.5.0
Public Member Functions | Private Attributes | Friends
DF_Document Class Reference

#include <DF_Document.hxx>

Collaboration diagram for DF_Document:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Standard_EXPORT DF_Document (const std::string &theDocumentType)
Standard_EXPORT ~DF_Document ()
Standard_EXPORT DF_ApplicationGetApplication ()
Standard_EXPORT DF_Label Main ()
Standard_EXPORT DF_Label Root ()
Standard_EXPORT int GetDocumentID () const
Standard_EXPORT std::string GetDocumentType ()
Standard_EXPORT void Clear ()
Standard_EXPORT bool IsEmpty ()
Standard_EXPORT bool IsModified ()
Standard_EXPORT void SetModified (bool isModified)
virtual Standard_EXPORT void Load (const std::string &theData)
virtual Standard_EXPORT std::string Save ()

Private Attributes

DF_Label _main
DF_Label _root
std::string _type
int _id
bool _modified
DF_Application_appli

Friends

class DF_Application

Detailed Description

Definition at line 32 of file DF_Document.hxx.


Constructor & Destructor Documentation

DF_Document::DF_Document ( const std::string &  theDocumentType)

Definition at line 28 of file DF_Document.cxx.

{
  _id = -1;
  _type = theDocumentType;
  _modified = true;
}

Definition at line 35 of file DF_Document.cxx.

{
  Clear();
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 87 of file DF_Document.cxx.

{
  if(_root.IsNull()) return;

  std::vector<DF_LabelNode*> vn;
  DF_ChildIterator CI(_root, true);
  for(; CI.More(); CI.Next()) {
    DF_LabelNode* node =  CI.Value()._node; 
    if(node) vn.push_back(node);
  }

  for(int i = 0, len = vn.size(); i<len; i++)
    delete vn[i];

  _root._node->Reset();
  _root.Nullify();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 40 of file DF_Document.cxx.

{
   return _appli;
}

Definition at line 75 of file DF_Document.cxx.

{
  return _id;
}

Here is the caller graph for this function:

Definition at line 81 of file DF_Document.cxx.

{
  return _type;
}

Definition at line 106 of file DF_Document.cxx.

{
  if(_root.IsNull()) return true;

  DF_ChildIterator CI(_root, true);
  for(; CI.More(); CI.Next()) {
    DF_LabelNode* node =  CI.Value()._node; 
    if(node->_attributes.size()) return false;
  }

  return true;
}

Here is the call graph for this function:

Definition at line 120 of file DF_Document.cxx.

{
  return _modified;
}
void DF_Document::Load ( const std::string &  theData) [virtual]

Definition at line 133 of file DF_Document.cxx.

{
   //Not implemented
}

Here is the caller graph for this function:

Definition at line 46 of file DF_Document.cxx.

{
  if(!_main.IsNull()) return _main;

  if(_root.IsNull()) {
    _root = DF_Label(new DF_LabelNode());
    _root._node->_document = this;
  }

  _main = _root.FindChild(1, true);

  return _main;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 61 of file DF_Document.cxx.

{
  if(!_root.IsNull()) return _root;
  
  if(_root.IsNull()) {
    _root = DF_Label(new DF_LabelNode());
    _root._node->_document = this;
  }

  return _root;
}

Here is the call graph for this function:

std::string DF_Document::Save ( ) [virtual]

Definition at line 139 of file DF_Document.cxx.

{
   //Not implemented
   return "";
}

Here is the caller graph for this function:

void DF_Document::SetModified ( bool  isModified)

Definition at line 126 of file DF_Document.cxx.

{
  _modified = isModified;
}

Friends And Related Function Documentation

friend class DF_Application [friend]

Definition at line 73 of file DF_Document.hxx.


Member Data Documentation

Definition at line 81 of file DF_Document.hxx.

int DF_Document::_id [private]

Definition at line 79 of file DF_Document.hxx.

Definition at line 76 of file DF_Document.hxx.

Definition at line 80 of file DF_Document.hxx.

Definition at line 77 of file DF_Document.hxx.

std::string DF_Document::_type [private]

Definition at line 78 of file DF_Document.hxx.


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