Changeset 2805 in Sophya for trunk/SophyaLib/BaseTools/swsegdb.h


Ignore:
Timestamp:
Jun 9, 2005, 6:20:00 PM (20 years ago)
Author:
ansari
Message:

MAJ commentaires pour documentation doxygen - Reza 9 Juin 2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/swsegdb.h

    r2698 r2805  
    1212#include <typeinfo>
    1313
    14 namespace SOPHYA {
    15 
    16 ////////////////////////////////////////////////////////////////
    17 //// ------------- Class DataSwapperInterface --------------- //
    18 //// ---------------- Class SwSegDataBlock ------------------ //
    19 ////////////////////////////////////////////////////////////////
    20 
    2114/*!
    2215  \class SOPHYA::DataSwapperInterface
     
    2518  with SOPHYA::SwSegDataBlock classes.
    2619*/
    27 template <class T>
    28 class DataSwapperInterface {
    29 public:
    30   virtual ~DataSwapperInterface() { }
    31   //! Swap out the data array pointed by \b d with size \b sz
    32   virtual int_8 WriteToSwap(const T * d, size_t sz, int_8 idx, int_8 oswp=0, bool osw=false) = 0;
    33   //! Swap in the data array pointed by \b d with size \b sz
    34   virtual void  ReadFromSwap(int_8 idx, int_8 swp, T* d, size_t sz) = 0;
    35 };
    36 
    37 //! Segmented data structure with swap management
    3820/*!
    3921  \class SOPHYA::SwSegDataBlock
     
    4123  Segmented data structure with swap space management.
    4224*/
     25
     26namespace SOPHYA {
     27
     28////////////////////////////////////////////////////////////////
     29//// ------------- Class DataSwapperInterface --------------- //
     30//// ---------------- Class SwSegDataBlock ------------------ //
     31////////////////////////////////////////////////////////////////
     32
     33template <class T>
     34class DataSwapperInterface {
     35public:
     36  virtual ~DataSwapperInterface() { }
     37  /*! Swap out the data array pointed by \b d with size \b sz
     38    Return the swap position which might be used later to retrieve the data from swap
     39    \param d : Pointer to the memory segment
     40    \param sz : Number of elements (type T)
     41    \param idx : An integer which might be used to identify the data (optional)
     42    \param oswp : Old swap position, if the data has already been swapped
     43    \param osw : true -> data has already been swapped
     44  */
     45  virtual int_8 WriteToSwap(const T * d, size_t sz, int_8 idx, int_8 oswp=0, bool osw=false) = 0;
     46  /*! Swap in the data array pointed by \b d with size \b sz
     47    Retrieves the data from swap space and copies it to \b d
     48    \param idx : optional data identifier
     49    \param swp : swap position (obtained from a previous call to WriteToSwap()
     50    \param d : pointer to T , where the data will be copied from swap space
     51    \param sz : Number of data elements (type T)
     52   */
     53  virtual void  ReadFromSwap(int_8 idx, int_8 swp, T* d, size_t sz) = 0;
     54};
     55
    4356template <class T>
    4457class SwSegDataBlock : public SegDBInterface<T> {
     
    172185  }
    173186
     187  //! \cond
    174188  typedef struct {
    175189    size_t nref;      // Number of references to the data structure 
     
    183197    DataSwapperInterface<T> * swapper;   // Data swapper
    184198  } SWSDREF;
    185 
     199  //! \endcond
    186200  SWSDREF *  mSRef;    // SWSDREF structure for reference sharing
    187201};
Note: See TracChangeset for help on using the changeset viewer.