Salome HOME
Bug with FindClosestTupleIdAlg fixed (preventing the threshold to be null)
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingDefinitionTime.hxx
index 93ee443929c887267fae933209860184485d0226..d1bff789f9f8d418df972aa8a245cab977696319 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2020  CEA/DEN, 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
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #define __PARAMEDMEM_MEDCOUPLINGDEFINITIONTIME_HXX__
 
 #include "MEDCouplingRefCountObject.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
 
 #include "InterpKernelException.hxx"
 
 #include <vector>
 #include <sstream>
 
-namespace ParaMEDMEM
+namespace MEDCoupling
 {
   class MEDCouplingFieldDouble;
 
@@ -52,7 +52,7 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT virtual void getTinySerializationInformation(std::vector<int>& tiI, std::vector<double>& tiD) const = 0;
     MEDCOUPLING_EXPORT virtual TypeOfTimeDiscretization getTimeType() const = 0;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
+    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     MEDCOUPLING_EXPORT bool isFullyIncludedInMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
     MEDCOUPLING_EXPORT bool isOverllapingWithMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
     MEDCOUPLING_EXPORT bool isAfterMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
@@ -70,6 +70,7 @@ namespace ParaMEDMEM
   {
   public:
     static MEDCouplingDefinitionTimeSliceInst *New(const std::vector<int>& tiI, const std::vector<double>& tiD);
+    MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceInst"); }
     MEDCouplingDefinitionTimeSlice *copy() const;
     bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const;
     void getHotSpotsTime(std::vector<double>& ret) const;
@@ -93,6 +94,7 @@ namespace ParaMEDMEM
   {
   public:
     static MEDCouplingDefinitionTimeSliceCstOnTI *New(const std::vector<int>& tiI, const std::vector<double>& tiD);
+    MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceCstOnTI"); }
     MEDCouplingDefinitionTimeSlice *copy() const;
     bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const;
     void getHotSpotsTime(std::vector<double>& ret) const;
@@ -112,11 +114,12 @@ namespace ParaMEDMEM
     double _start;
     double _end;
   };
-  
+
   class MEDCouplingDefinitionTimeSliceLT : public MEDCouplingDefinitionTimeSlice
   {
   public:
     static MEDCouplingDefinitionTimeSliceLT *New(const std::vector<int>& tiI, const std::vector<double>& tiD);
+    std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceLT"); }
     MEDCouplingDefinitionTimeSlice *copy() const;
     bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const;
     void getHotSpotsTime(std::vector<double>& ret) const;
@@ -145,7 +148,7 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT MEDCouplingDefinitionTime();
     MEDCOUPLING_EXPORT MEDCouplingDefinitionTime(const std::vector<const MEDCouplingFieldDouble *>& fs, const std::vector<int>& meshRefs, const std::vector<std::vector<int> >& arrRefs);
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
+    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     MEDCOUPLING_EXPORT void assign(const MEDCouplingDefinitionTime& other);
     MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingDefinitionTime& other) const;
     MEDCOUPLING_EXPORT double getTimeResolution() const { return _eps; }
@@ -159,7 +162,7 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT void unserialize(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD);
   private:
     double _eps;
-    std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingDefinitionTimeSlice> > _slices;
+    std::vector< MCAuto<MEDCouplingDefinitionTimeSlice> > _slices;
     static const double EPS_DFT;
   };
 }