+ template<class T>
+ void MEDCouplingTimeDiscretizationTemplate<T>::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
+ {
+ if(_array)
+ {
+ tinyInfo.push_back(_array->getNumberOfTuples());
+ tinyInfo.push_back(ToIdType(_array->getNumberOfComponents()));
+ }
+ else
+ {
+ tinyInfo.push_back(-1);
+ tinyInfo.push_back(-1);
+ }
+ }
+
+ template<class T>
+ void MEDCouplingTimeDiscretizationTemplate<T>::getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const
+ {
+ tinyInfo.push_back(_time_tolerance);
+ }
+
+ template<class T>
+ void MEDCouplingTimeDiscretizationTemplate<T>::getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const
+ {
+ std::size_t nbOfCompo(_array->getNumberOfComponents());
+ for(std::size_t i=0;i<nbOfCompo;i++)
+ tinyInfo.push_back(_array->getInfoOnComponent(i));
+ }
+
+ template<class T>
+ void MEDCouplingTimeDiscretizationTemplate<T>::resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<typename Traits<T>::ArrayType *>& arrays)
+ {
+ arrays.resize(1);
+ if(_array!=0)
+ _array->decrRef();
+ typename Traits<T>::ArrayType *arr=0;
+ if(tinyInfoI[0]!=-1 && tinyInfoI[1]!=-1)
+ {
+ arr=Traits<T>::ArrayType::New();
+ arr->alloc(tinyInfoI[0],tinyInfoI[1]);
+ }
+ _array=arr;
+ arrays[0]=arr;
+ }
+
+ template<class T>
+ void MEDCouplingTimeDiscretizationTemplate<T>::checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<typename Traits<T>::ArrayType *>& arrays)
+ {
+ static const char MSG[]="MEDCouplingTimeDiscretization::checkForUnserialization : arrays in input is expected to have size one !";
+ if(arrays.size()!=1)
+ throw INTERP_KERNEL::Exception(MSG);
+ if(_array!=0)
+ _array->decrRef();
+ _array=0;
+ if(tinyInfoI[0]!=-1 && tinyInfoI[1]!=-1)
+ {
+ if(!arrays[0])
+ throw INTERP_KERNEL::Exception(MSG);
+ arrays[0]->checkNbOfTuplesAndComp(tinyInfoI[0],tinyInfoI[1],MSG);
+ _array=arrays[0];
+ _array->incrRef();
+ }
+ }
+
+ template<class T>
+ void MEDCouplingTimeDiscretizationTemplate<T>::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
+ {
+ _time_tolerance=tinyInfoD[0];
+ std::size_t nbOfCompo=_array->getNumberOfComponents();
+ for(std::size_t i=0;i<nbOfCompo;i++)
+ _array->setInfoOnComponent(i,tinyInfoS[i]);
+ }
+
+ /////////////////////////
+