Back to index

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

#include <DF_Application.hxx>

Collaboration diagram for DF_Application:
Collaboration graph

List of all members.

Public Member Functions

Standard_EXPORT DF_Application ()
Standard_EXPORT ~DF_Application ()
Standard_EXPORT DF_DocumentNewDocument (const std::string &theDocumentType)
Standard_EXPORT void Close (const DF_Document *theDocument)
Standard_EXPORT DF_DocumentGetDocument (int theDocumentID)
Standard_EXPORT std::vector< int > GetDocumentIDs ()
Standard_EXPORT int NbDocuments ()
virtual Standard_EXPORT
Open (const std::string &theFileName)
virtual Standard_EXPORT void SaveAs (const DF_Document *theDocument, const std::string &theFileName)

Private Attributes

int _currentID
std::map< int, DF_Document * > _documents

Detailed Description

Definition at line 29 of file DF_Application.hxx.

Constructor & Destructor Documentation

Definition at line 24 of file DF_Application.cxx.

  _currentID = 0;

Definition at line 29 of file DF_Application.cxx.


Member Function Documentation

void DF_Application::Close ( const DF_Document theDocument)

Definition at line 46 of file DF_Application.cxx.

  int id = -1;
  if(theDocument) id = theDocument->GetDocumentID();

  if(_documents.find(id) != _documents.end()) {
    delete theDocument;

Here is the call graph for this function:

DF_Document * DF_Application::GetDocument ( int  theDocumentID)

Definition at line 59 of file DF_Application.cxx.

  if(_documents.find(theDocumentID) == _documents.end()) return NULL;

  return _documents[theDocumentID];
std::vector< int > DF_Application::GetDocumentIDs ( )

Definition at line 67 of file DF_Application.cxx.

  std::vector<int> ids;
  typedef std::map<int, DF_Document*>::const_iterator DI;
  for(DI p = _documents.begin(); p!=_documents.end(); p++)
  return ids;

Definition at line 77 of file DF_Application.cxx.

  return _documents.size();
DF_Document * DF_Application::NewDocument ( const std::string &  theDocumentType)

Definition at line 36 of file DF_Application.cxx.

  DF_Document* aDoc = new DF_Document(theDocumentType);
  aDoc->_id = ++_currentID;
  _documents[aDoc->_id] = aDoc;
  aDoc->_appli = this; 
  return aDoc;

Here is the caller graph for this function:

DF_Document * DF_Application::Open ( const std::string &  theFileName) [virtual]

Definition at line 85 of file DF_Application.cxx.

  //Not implemented
  return NULL;
void DF_Application::SaveAs ( const DF_Document theDocument,
const std::string &  theFileName 
) [virtual]

Definition at line 93 of file DF_Application.cxx.

  //Not implemented

Member Data Documentation

Definition at line 62 of file DF_Application.hxx.

std::map<int, DF_Document*> DF_Application::_documents [private]

Definition at line 63 of file DF_Application.hxx.

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