#include <TColStd_SequenceOfExtendedString.hxx>
+#define _STUDYID_ 1
+
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Application,TDocStd_Application)
static HYDROData_Application* TheApplication = new HYDROData_Application;
//function : GetDocument
//purpose :
//=======================================================================
-bool HYDROData_Application::GetDocumentId(const Handle(HYDROData_Document)& theDocument,
- int& theDocId) const
-{
- DataMapOfStudyIDDocument::Iterator aMapit( myDocuments );
- for ( ; aMapit.More(); aMapit.Next() )
- {
- if ( aMapit.Value() != theDocument )
- continue;
-
- theDocId = aMapit.Key();
- return true;
- }
-
- return false;
-}
-
-//=======================================================================
-//function : GetDocument
-//purpose :
-//=======================================================================
-Handle(HYDROData_Document) HYDROData_Application::GetDocument(int theStudyID) const
+Handle(HYDROData_Document) HYDROData_Application::GetDocument() const
{
- if (myDocuments.IsBound(theStudyID)) {
- return myDocuments.Find(theStudyID);
+ if (myDocuments.IsBound(_STUDYID_)) {
+ return myDocuments.Find(_STUDYID_);
}
// document not found => create the new one
return Handle(HYDROData_Document)();
//function : addDocument
//purpose :
//=======================================================================
-void HYDROData_Application::AddDocument(int theStudyID, const Handle(HYDROData_Document)& theDocument)
+void HYDROData_Application::AddDocument(const Handle(HYDROData_Document)& theDocument)
{
- myDocuments.Bind(theStudyID, theDocument);
+ myDocuments.Bind(_STUDYID_, theDocument);
}
//=======================================================================