ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/GenericData.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/GenericData.hpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2054 by tim, Mon Feb 21 15:21:54 2005 UTC

# Line 181 | Line 181 | namespace oopse{
181      * @template ContainerType
182      * @template ElemDataType
183      */
184 <    template <template<typename ELEM, typename = std::allocator<ELEM> > class ContainerType,
185 <                     typename ElemDataType >
186 <    class STLContainerTypeData : public GenericData, public ContainerType<ElemDataType>{
184 >    template <typename ElemDataType >
185 >    class VectorTypeData : public GenericData, public std::vector<ElemDataType>{
186          public:
187 <            typedef STLContainerTypeData<ContainerType, ElemDataType> SelfType;
189 <            typedef ContainerType<ElemDataType> STLContainerType;
187 >            typedef VectorTypeData<ElemDataType> SelfType;
188  
189 <            STLContainerTypeData(const std::string& id)
190 <                : GenericData(id),  ContainerType<ElemDataType> () {}
189 >            VectorTypeData(const std::string& id)
190 >                : GenericData(id), std::vector() {}
191              
192 <            STLContainerTypeData(const SelfType& s) : SelfType(s){}
192 >            VectorTypeData(const SelfType& s) : SelfType(s){}
193  
194              SelfType& operator =(const SelfType& s){
195                  if (this == &s)
196                      return *this;
197  
198 <                STLContainerType::operator=(s);
198 >                VectorTypeData::operator=(s);
199                  return *this;
200              }
201      };
# Line 206 | Line 204 | namespace oopse{
204       * @typedef IntVectorGenericData
205       * A generic data type contains a  std::vector<int> variable.
206       */  
207 <    typedef STLContainerTypeData<std::vector, int> IntVectorGenericData;
207 >    typedef VectorTypeData<int> IntVectorGenericData;
208  
209      /**
210       * @typedef IntVectorGenericData
211       * A generic data type contains a  std::vector<float> variable.
212       */  
213 <    typedef STLContainerTypeData<std::vector, float> FloatVectorGenericData;
213 >    typedef VectorTypeData<float> FloatVectorGenericData;
214  
215      /**
216       * @typedef IntVectorGenericData
217       * A generic data type contains a  std::vector<double> variable.
218       */  
219 <    typedef STLContainerTypeData<std::vector, double> DoubleVectorGenericData;
219 >    typedef VectorTypeData<double> DoubleVectorGenericData;
220  
221      /**
222       * @typedef StringVectorGenericData
# Line 248 | Line 246 | namespace oopse{
246       *  }
247       * @endcode
248       */  
249 <    typedef STLContainerTypeData<std::vector, std::string> StringVectorGenericData;
252 <
253 <    /**
254 <     * @typedef IntVectorGenericData
255 <     * A generic data type contains a   std::list<vector<string> >  variable.
256 <     */  
257 <    typedef STLContainerTypeData<std::list, std::vector<int> > IntVectorListGenericData;
249 >    typedef VectorTypeData<std::string> StringVectorGenericData;
250    
259 #define CHIVALUE_ID "CHIVALUE"
260 #define INTEGRALOFCHIDT_ID "INTEGRALOFCHIDT"
261 #define ETAVALUE_ID "ETAVALUE"
251  
252   } // namespace oopse
253   #endif //UTIL _GENERICDATA_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines