/[escript]/trunk/escript/src/DataTagged.h
ViewVC logotype

Diff of /trunk/escript/src/DataTagged.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1796 by jfenwick, Wed Sep 17 01:45:46 2008 UTC revision 2005 by jfenwick, Mon Nov 10 01:21:39 2008 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #if !defined escript_DataTagged_20040615_H  #if !defined escript_DataTagged_20040615_H
16  #define escript_DataTagged_20040615_H  #define escript_DataTagged_20040615_H
17  #include "system_dep.h"  #include "system_dep.h"
18    
19  #include "DataAbstract.h"  #include "DataReady.h"
20  #include "DataTypes.h"  #include "DataTypes.h"
21    
22  #include <vector>  #include <vector>
# Line 38  class DataConstant; Line 37  class DataConstant;
37     dataPointNo values.     dataPointNo values.
38  */  */
39    
40  class DataTagged : public DataAbstract {  class DataTagged : public DataReady {
41    typedef DataReady parent;
42   public:   public:
43    
44    //    //
# Line 66  class DataTagged : public DataAbstract { Line 65  class DataTagged : public DataAbstract {
65    ESCRIPT_DLL_API    ESCRIPT_DLL_API
66    DataTagged();    DataTagged();
67    
 //  /**  
 //      \brief  
 //      Constructor for DataTagged.  
 //  
 //      Description:  
 //      Constructor for DataTagged.  
 //      \param tagKeys - Input - A vector of integer tags.  
 //      \param values - Input - A vector of DataArrayViews. If this is empty  
 //                      all tag values will be assigned a scalar data-point of value  
 //                      0. If it contains one value all tag values will be assigned  
 //           this value. Otherwise consecutive tags will be assigned  
 //                      consecutive values.  If there is a mismatch between  the  
 //           number of keys and the number of values an exception  
 //           will be generated.  
 //      \param defaultValue - Input - Value returned if a requested tag doesn't exist.  
 //      \param what - Input - A description of what this data represents.  
 //     T  
 //  */  
 //   ESCRIPT_DLL_API  
 //   DataTagged(const TagListType& tagKeys,  
 //              const ValueListType& values,  
 //       const DataArrayView& defaultValue,  
 //       const FunctionSpace& what);  
   
68    /**    /**
69       \brief       \brief
70       Alternative Constructor for DataTagged.       Alternative Constructor for DataTagged.
# Line 169  TODO Make sure to document the relations Line 144  TODO Make sure to document the relations
144    inline virtual    inline virtual
145    ~DataTagged() {};    ~DataTagged() {};
146    
147      ESCRIPT_DLL_API
148      bool
149      isTagged() const
150      {
151        return true;
152      };
153    
154    
155      /**
156         \brief Return a deep copy of the current object.
157      */
158      ESCRIPT_DLL_API
159      virtual
160      DataAbstract*
161      deepCopy();
162    
163    
164    /**    /**
165       \brief       \brief
166       getSampleDataByTag       getSampleDataByTag
# Line 244  TODO Make sure to document the relations Line 236  TODO Make sure to document the relations
236    getPointOffset(int sampleNo,    getPointOffset(int sampleNo,
237                   int dataPointNo) const;                   int dataPointNo) const;
238    
239      ESCRIPT_DLL_API
240      virtual
241  //  /**    ValueType::size_type
242  //      \brief    getPointOffset(int sampleNo,
243  //      addTaggedValues                   int dataPointNo);
 //  
 //      Description:  
 //      Add the given tags and values to this DataTagged object.  
 //      \param tagKeys - Input - A vector of integer tags.  
 //      \param values - Input - A vector of DataArrayViews. If this is empty  
 //                      all tag values will be assigned a scalar data-point of value  
 //                      0. If it contains one value all tag values will be assigned  
 //           this value. Otherwise consecutive tags will be assigned  
 //                      consecutive values.  If there is a mismatch between  the  
 //           number of keys and the number of values an exception  
 //           will be generated.  
 //     T  
 //  */  
 //   ESCRIPT_DLL_API  
 //   void  
 //   addTaggedValues(const TagListType& tagKeys,  
 //                   const ValueListType& values);    
   
 //  /**  
 //      \brief  
 //      addTaggedValue  
 //  
 //      Description:  
 //      Add a single tag and value to this DataTagged object. If this tag already has  
 //      a value associated with it, setTaggedValue will be used to update this value.  
 //      \param tagKey - Input - Integer tag.  
 //      \param value - Input - Single DataArrayView value to be assigned to the tag.  
 //     T  
  // */  
 //   ESCRIPT_DLL_API  
 //   void  
 //   addTaggedValue(int tagKey,  
 //                  const DataArrayView& value);  
   
   
244    
245   /**   /**
246       \brief       \brief
# Line 367  TODO Make sure to document the relations Line 324  TODO Make sure to document the relations
324    void    void
325    addTag(int tagKey);    addTag(int tagKey);
326    
   
 //  /**  
 //      \brief  
 //      setTaggedValues  
 //  
 //      Description:  
 //      Set the given tags to the given values in this DataTagged object.  
 //      \param tagKeys - Input - A vector of integer tag.  
 //      \param values - Input - A vector of DataArrayViews. If this is empty  
 //                      all tag values will be assigned a scalar data-point of value  
 //                      0. If it contains one value all tag values will be assigned  
 //           this value. Otherwise consecutive tags will be assigned  
 //                      consecutive values.  If there is a mismatch between  the  
 //           number of keys and the number of values an exception  
 //           will be generated.  
 //     T  
 //  */  
 //   ESCRIPT_DLL_API  
 //   void  
 //   setTaggedValues(const TagListType& tagKeys,  
 //                   const ValueListType& values);  
   
 //  /**  
 //      \brief  
 //      setTaggedValue  
 //  
 //      Description:  
 //      Assign the given value to the given tag.  
 //      \param tagKey - Input - Integer tag.  
 //      \param value - Input - Single DataArrayView value to be assigned to the tag.  
 //     T  
 //  */  
 //   ESCRIPT_DLL_API  
 //   virtual  
 //   void  
 //   setTaggedValue(int tagKey,  
 //                  const DataArrayView& value);  
   
327    /**    /**
328       \brief       \brief
329       setTaggedValue       setTaggedValue
# Line 424  TODO Make sure to document the relations Line 343  TODO Make sure to document the relations
343                   const ValueType& value,                   const ValueType& value,
344           int dataOffset=0);           int dataOffset=0);
345    
   
 //  /**  
 //      \brief  
 //      getDataPointByTag  
 //  
 //      Description:  
 //      Return data-point associated with the given tag as a DataArrayView.  
 //      \param tag - Input - Integer key.  
 //     T  
 //  */  
 //   ESCRIPT_DLL_API  
 //   DataArrayView  
 //   getDataPointByTag(int tag) const;  
   
346    /**    /**
347       \brief       \brief
348       getDataByTag       getDataByTag
# Line 470  TODO Make sure to document the relations Line 375  TODO Make sure to document the relations
375    DataTypes::ValueType::size_type    DataTypes::ValueType::size_type
376    getOffsetForTag(int tag) const;    getOffsetForTag(int tag) const;
377    
 //  /**  
 //      \brief  
 //      getDataPoint  
 //  
 //      Description:  
 //      Return the data-point specified by the given sample and data-point  
 //      numbers as a DataArrayView.  
 //      \param sampleNo - Input.  
 //      \param dataPointNo - Input.  
 //     T  
 //  */  
 //   ESCRIPT_DLL_API  
 //   virtual  
 //   DataArrayView  
 //   getDataPoint(int sampleNo,  
 //                int dataPointNo);  
   
378    
379    /**    /**
380       \brief       \brief
# Line 542  TODO Make sure to document the relations Line 430  TODO Make sure to document the relations
430    bool    bool
431    isCurrentTag(int tag) const;    isCurrentTag(int tag) const;
432    
 // /**  
 //      \brief  
 //      getDefaultValue  
 //  
 //      Description:  
 //      Return the default value. This value is associated with any tag which  
 //      is not explicitly recorded in this DataTagged object's tag map.  
 //     T  
 //  */  
 //   ESCRIPT_DLL_API  
 //   DataArrayView&  
 //   getDefaultValue();  
 //  
 //   ESCRIPT_DLL_API  
 //   const DataArrayView&  
 //   getDefaultValue() const;  
   
433    /**    /**
434       \brief       \brief
435       getDefaultValue       getDefaultValue

Legend:
Removed from v.1796  
changed lines
  Added in v.2005

  ViewVC Help
Powered by ViewVC 1.1.26