Salome HOME
fix test on stream linear interpolation
[modules/hydro.git] / src / HYDROData / HYDROData_InterpolatorsFactory.h
index 865faea658aa50217caa085171063214d2165fa1..134d35d46515a9d6a6da00cef7918105ae5b0b23 100644 (file)
@@ -1,8 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
 
 #include <HYDROData.h>
 
+#include <TCollection_AsciiString.hxx>
+#include <NCollection_Sequence.hxx>
+
 #include <string>
-#include <vector>
 #include <map>
 
 class HYDROData_IProfilesInterpolator;
 
-/**\class HYDROData_InterpolatorsFactory
+/**
+ * \class HYDROData_InterpolatorsFactory
  *
  * \brief Profile interpolators factory.
  *
@@ -43,16 +42,23 @@ class HYDROData_InterpolatorsFactory
 {
 public:
 
+  /**
+   * Public constructor.
+   */
   HYDROData_InterpolatorsFactory();
+
+  /**
+   * Public virtual destructor.
+   */
   virtual ~HYDROData_InterpolatorsFactory();
 
   /**
    * Registers the interpolator of a certain type with the given name.
    * \param theName the interpolator name used as identifier
    */
-  template <class T> HYDRODATA_EXPORT void Register( const std::string& theName )
+  template <class T> /*HYDRODATA_EXPORT */void Register( const TCollection_AsciiString& theName )
   {
-    myInterpolators[theName] = new T();
+    myInterpolators[theName.ToCString()] = new T();
   }
 
   /**
@@ -60,13 +66,13 @@ public:
    * \param theName name of the interpolator
    * \returns the appropriate interpolator or NULL if interpolator with such name is not registered
    */
-  HYDRODATA_EXPORT HYDROData_IProfilesInterpolator* GetInterpolator( const std::string& theName ) const;
+  HYDRODATA_EXPORT HYDROData_IProfilesInterpolator* GetInterpolator( const TCollection_AsciiString& theName ) const;
 
   /**
    * Get list of registered interpolator names.
    * \return the list of unique names
    */
-  std::vector<std::string> GetInterpolatorNames() const;
+  HYDRODATA_EXPORT NCollection_Sequence<TCollection_AsciiString> GetInterpolatorNames() const;
   
 private:
   //! Map that stores all interpolators, identified by interpolator name (string)