#include <HYDROData_Application.h>
#include <HYDROData_Iterator.h>
#include <HYDROData_Tool.h>
+#include <HYDROData_InterpolatorsFactory.h>
#include <TDataStd_Integer.hxx>
#include <TDataXtd_Position.hxx>
myTransactionsAfterSave = 0;
myLX = -1;
myLY = -1;
+
+ myInterpolatorsFactory = 0;
}
HYDROData_Document::HYDROData_Document(const Handle(TDocStd_Document)& theDoc)
myTransactionsAfterSave = 0;
myLX = -1;
myLY = -1;
+
+ myInterpolatorsFactory = 0;
}
HYDROData_Document::~HYDROData_Document()
Transform( X, Y, IsToLocalCS );
thePnt = gp_XY( X, Y );
}
+
+HYDROData_InterpolatorsFactory* HYDROData_Document::GetInterpolatorsFactory()
+{
+ if ( !myInterpolatorsFactory ) {
+ myInterpolatorsFactory = new HYDROData_InterpolatorsFactory();
+ }
+
+ return myInterpolatorsFactory;
+}
+
+HYDROData_IProfilesInterpolator* HYDROData_Document::GetInterpolator( const TCollection_AsciiString& theName ) const
+{
+ HYDROData_IProfilesInterpolator* anInterpolator = NULL;
+
+ HYDROData_Document* aThat = const_cast<HYDROData_Document*>( this );
+ HYDROData_InterpolatorsFactory* aFactory = aThat->GetInterpolatorsFactory();
+ if ( aFactory ) {
+ anInterpolator = aFactory->GetInterpolator( theName );
+ }
+
+ return anInterpolator;
+}
+
+NCollection_Sequence<TCollection_AsciiString> HYDROData_Document::GetInterpolatorNames() const
+{
+ NCollection_Sequence<TCollection_AsciiString> aNames;
+
+ HYDROData_Document* aThat = const_cast<HYDROData_Document*>( this );
+ HYDROData_InterpolatorsFactory* aFactory = aThat->GetInterpolatorsFactory();
+ if ( aFactory ) {
+ aNames = aFactory->GetInterpolatorNames();
+ }
+
+ return aNames;
+}
\ No newline at end of file