Changeset 2805 in Sophya for trunk


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

MAJ commentaires pour documentation doxygen - Reza 9 Juin 2005

Location:
trunk/SophyaLib/BaseTools
Files:
18 edited

Legend:

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

    r2477 r2805  
    7777  virtual void      Print(ostream& os)  const;
    7878
     79//!  \cond 
    7980// Chaque element dans un DVList est constitue desormais d'un MuTyV
    8081// et d'une chaine de caracteres (commentaire) regroupe dans la structure
    8182// dvlElement. Ces elements sont associes aux noms de variables dans un
    8283// map<...> ValList.            Reza 02/2000
    83 
    8484  struct dvlElement {MuTyV elval; string elcomm; } ;
    8585  typedef map<string, dvlElement, less<string> >  ValList;
     86//!  \endcond
    8687/*! Returns an iterator pointing on the first variable in the list */
    8788  inline ValList::const_iterator Begin() { return(mvlist.begin()); }
  • trunk/SophyaLib/BaseTools/fiondblock.cc

    r2615 r2805  
    1717//   Les objets delegues pour la gestion de persistance
    1818// -------------------------------------------------------------------------
     19/*!
     20   \class SOPHYA::FIO_NDataBlock
     21   \ingroup BaseTools
     22   Handler for PPF persistence of NDataBlock<T> classes.
     23*/
    1924
    2025/*
  • trunk/SophyaLib/BaseTools/fiosegdb.h

    r2687 r2805  
    1313#include <typeinfo>
    1414
    15 namespace SOPHYA {
    16 
    1715/*!
    1816   \class SOPHYA::FIO_SegDataBlock
     
    2018   Class implementing PPF persistence (PPersist handler) for segmented data structures
    2119   (class SegDataBlock).
     20   \sa PPersist
    2221*/
     22
     23namespace SOPHYA {
     24
    2325   
    2426template <class T>
  • trunk/SophyaLib/BaseTools/gnumd5.h

    r1416 r2805  
    66#endif
    77
     8/*! \cond */
    89typedef struct {
    910    uint_8 mem_align;     /* To force memory alignment on SunOS 22/02/2001 */
     
    1314    int  count;
    1415} MD5_CONTEXT;
    15 
     16/*! \endcond */
    1617
    1718void
  • trunk/SophyaLib/BaseTools/hashtable.h

    r552 r2805  
    1212namespace SOPHYA {
    1313
     14//! \cond
    1415template <class T, class K>
    1516struct HashtableEntry {
     
    1920  HashtableEntry<T,K> *next;
    2021};
    21 
     22//! \endcond
    2223
    2324template <class T, class K>
  • trunk/SophyaLib/BaseTools/objfio.h

    r2698 r2805  
    1111#include "anydataobj.h"
    1212#include "ppersist.h"
     13
     14/*!
     15   \class SOPHYA::ObjFileIO
     16   \ingroup BaseTools
     17   Template class to ease implementation of PPersist handlers for a
     18   class T , inheriting from AnyDataObj. The methodes ReadSelf() and
     19   WriteSelf() must be implemented.
     20   \sa PPersist
     21*/
    1322
    1423namespace SOPHYA {
  • trunk/SophyaLib/BaseTools/ppersist.cc

    r2698 r2805  
    2121
    2222
    23 #define MAXTAGLEN 255
     23
     24/*!
     25   \class SOPHYA::PIOPersist
     26   \ingroup BaseTools
     27   Handles (statically) the registration of PPF Sophya Persistence) handler classes.
     28   \sa PPersist
     29*/
     30
    2431
    2532//++
     
    3239//--
    3340
    34 //++
    35 // Links        See
    36 // PPersist
    37 // PInPersist
    38 // POutPersist
    39 //--
    40 
    41 
    4241MD5_CONTEXT PIOPersist::ctx;
    4342PIOPersist::ClassList * PIOPersist::ppclassList = NULL;   // $CHECK$ Reza 26/04/99
     
    5756}
    5857
    59 //++
     58/*!
     59  Register a new persistence handler (PPersist) class.
     60  The classId is usually a hash of the class< name, and
     61  ppclass_name is typeid(PPersistClass).name() .
     62  This method is called only through the PPersistRegistrar template
     63*/
    6064void
    6165PIOPersist::RegisterPPHandlerClass(uint_8 classId, string ppclass_name, ClassCreatorFunc f)
    62 //
    63 //      Register a new persistence handler (PPersist) class.
    64 //      The classId is usually a hash of the class< name, and
    65 //      ppclass_name is typeid(PPersistClass).name() .
    66 //      This method is called only through the PPersistRegistrar template
    67 //
    68 //--
    6966{
    7067  if (ppclassList->size() && (ppclassList->find(classId) != ppclassList->end()) ) {
     
    8380}
    8481
    85 //++
     82/*!
     83  Register a new DataObj class corresponding to a PPersist classId
     84  class_typename should be typeid(DataObject).name()
     85*/
    8686void
    8787PIOPersist::RegisterDataObjClass(uint_8 classId, string class_name)
    88 //      Register a new DataObj class corresponding to a PPersist classId
    89 //      class_typename should be typeid(DataObject).name()
    90 //--
    9188{
    9289  if (ppclassList->find(classId) == ppclassList->end() ) {
     
    132129}
    133130
     131//! Returns the PPersist class creator function for the specified classId
    134132PIOPersist::ClassCreatorFunc
    135133PIOPersist::FindCreatorFunc(uint_8 classId)
    136 // Returns the PPersist class creator function for the specified classId
    137134{
    138135  ClassList::iterator i = ppclassList->find(classId);
     
    141138}
    142139
     140//! Returns the PPersist class name for the specified classId
    143141string
    144142PIOPersist::getPPClassName(uint_8 classId)
    145 // Returns the PPersist class name for the specified classId
    146143{
    147144  map<string, uint_8>::iterator i;
     
    152149}
    153150
     151//! Returns the classId for the specified PPersist class type name
    154152uint_8
    155153PIOPersist::getPPClassId(string const & typ_name)
    156 // Returns the classId for the specified PPersist class type name
    157154{
    158155  map<string, uint_8>::iterator i = ppclassNameList->find(typ_name);
     
    162159}
    163160
     161//! Returns the classId for the specified PPersist class
    164162uint_8
    165163PIOPersist::getPPClassId(PPersist const & ppo)
    166 // Returns the classId for the specified PPersist class
    167164{
    168165  string typ_name = typeid(ppo).name() ;
     
    171168
    172169
     170//! Returns the PPersist class name for the specified classId
    173171string
    174172PIOPersist::getDataObjClassName(uint_8 classId)
    175 // Returns the PPersist class name for the specified classId
    176173{
    177174  map<string, uint_8>::iterator i;
     
    182179}
    183180
     181//! Returns the classId for the specified PPersist class type name
    184182uint_8
    185183PIOPersist::getDataObjClassId(string const & typ_name)
    186 // Returns the classId for the specified PPersist class type name
    187184{
    188185  map<string, uint_8>::iterator i = dobjclassNameList->find(typ_name);
     
    192189}
    193190
     191//! Returns the classId for the specified PPersist class
    194192uint_8
    195193PIOPersist::getDataObjClassId(AnyDataObj const & o)
    196 // Returns the classId for the specified PPersist class
    197194{
    198195  string typ_name = typeid(o).name() ;
     
    200197}
    201198
     199//! \cond
    202200static inline void bswap8_hash(void* p)
    203201{
     
    213211}
    214212
    215 
     213//! \endcond
    216214
    217215uint_8 PIOPersist::Hash(string const& typname) {
     
    238236//      persistant :
    239237//      - Hériter de PPersist.
    240 //      - Définir un numéro d'identification de la classe, unique dans Peida
    241 //      - Implémenter "ClassId()"
    242238//      - Implémenter "WriteSelf" et "ReadSelf", qui doivent écrire toutes les variables
    243239//        membres que l'on souhaite écrire, et les relire dans le même ordre.
     
    253249//--
    254250
    255 //++
    256 // Links        See
    257 // PInPersist
    258 // POutPersist
    259 // PIOPersist
    260 //--
    261  
    262 //++
     251/*!
     252   \class SOPHYA::PPersist
     253   \ingroup BaseTools
     254   Ancestor (base) class for SOPHYA persistence (PPF) handlers.
     255   In order to have provide a PPF handler for an object :
     256   - Inherit from PPersist
     257   - Implement WriteSelf() and ReadSelf()
     258
     259   \sa PInPersist POutPersist PIOPersist
     260*/
     261
     262//! Writes the object into a new PPF file named \b fn
    263263void
    264264PPersist::Write(string const& fn) const
    265 //
    266 //      Ecrit l'objet dans un nouveau fichier ppersist "fn".
    267 //--
    268265{
    269266  POutPersist of(fn);
     
    271268}
    272269
    273 //++
     270//! Reads the object from a PInPersist stream created from file \b fn
    274271void
    275272PPersist::Read(string const& fn)
    276 //
    277 //      Relit l'objet dans le fichier ppersist "fn". Il faut connaître a priori
    278 //      le type de l'objet. Pour une relecture avec création automatique du bon
    279 //      objet, utiliser PPersistMgr::ReadObject.
    280 //--
    281273{
    282274  PInPersist inf(fn);
     
    285277}
    286278
    287 //++
     279//! Writes the object to the output PPF stream \b s
    288280void
    289281PPersist::Write(POutPersist& s) const
    290 //
    291 //      Ecrit l'objet dans le fichier PPersist.
    292 //--
    293282{
    294283   s.PutPPObject(this);
     
    296285
    297286
    298 //++
     287//! Reads the object from the input PPF stream \b s
    299288void
    300289PPersist::Read(PInPersist& s)
     
    337326}
    338327
    339 //++
     328//! Writes a name tag (\b tag) and then the object to the output PPF stream \b s
    340329void
    341330PPersist::Write(POutPersist& s, string const& tag) const
    342 //
    343 //      Ecrit l'objet dans le fichier PPersist avec un tag
    344 //--
    345331{
    346332  s.WriteNameTag(tag);
     
    348334}
    349335
    350 //++
     336//! Try to position at the name tag \b tag and then reads the object from the input stream \b s
    351337void
    352338PPersist::ReadAtTag(PInPersist& s, string const& tag)
    353 //
    354 //      Lit l'objet à la position du tag numéro "tagid".
    355 //--
    356339{
    357340  if (!s.GotoNameTag(tag))
     
    361344
    362345// Renvoie l'identificateur de l'objet  - par defaut=0
    363 
     346/*! Return the object identifier (default: return 0)
     347  (used for handling of PPF I/O for objects with reference sharing).
     348*/
    364349uint_8
    365350PPersist::getMemOId() const
     
    370355// Ces deux methodes doivent etre redefinies si   getMemOId() renvoie non nul (>0)
    371356// ShareDataReference() et CloneSharedReference()
     357/*!
     358  This method should be re-implemented if getMemOId() non zero value.
     359  (used for handling of PPF I/O for objects with reference sharing).
     360*/
    372361void
    373362PPersist::ShareDataReference(PPersist & pcs)
     
    376365}
    377366
     367/*!
     368  This method should be re-implemented if getMemOId() non zero value.
     369  (used for handling of PPF I/O for objects with reference sharing).
     370*/
    378371PPersist *
    379372PPersist::CloneSharedReference()
     
    403396//--
    404397
     398/*!
     399   \class SOPHYA::PInPersist
     400   \ingroup BaseTools
     401   This class implements the I/O read services necessary for SOPHYA
     402   persistence (PPF) by extending the services provided by PPFBinaryInputStream.
     403   \sa PPersist
     404*/
     405
     406/*! Constructor from a RawInOutStream pointer
     407  \param is : pointer to RawInOutStream
     408  \param ad : if true, the RawInOutStream \b is is deleted by the destructor
     409  \param scan : if true, try to read the name-tags table from the end of the input stream
     410*/
    405411PInPersist::PInPersist(RawInOutStream * is, bool ad, bool scan)
    406412  : PPFBinaryInputStream(is, ad, scan)
     
    408414}
    409415
     416/*! Constructor
     417  \param  flnm : input file name
     418  \param scan : if true, try to read the name-tags table from the end of the input stream
     419*/ 
    410420PInPersist::PInPersist(string const& flnm, bool scan)
    411421  : PPFBinaryInputStream(flnm, scan)
     
    436446}
    437447
     448/*! Skip to next object in the streams, reads it and return
     449  the corresponding PPersist handler
     450*/
    438451PPersist*
    439452PInPersist::ReadObject()
     
    443456}
    444457
     458/*!
     459  Tries to read in from the stream into object \b o
     460*/
    445461void
    446462PInPersist::GetObject(AnyDataObj & o)
     
    450466}
    451467
     468/*!
     469  Tries to move to \b nametag and then read in from the stream into object \b o
     470*/
    452471void
    453472PInPersist::GetObject(AnyDataObj & o, string tagname)
     
    458477}
    459478
     479/*!
     480  Reading of objects - used by GetObject() and ReadObject()
     481*/
    460482PPersist*
    461483PInPersist::GetPPObject(AnyDataObj * po)
     
    575597
    576598
     599/*!
     600   \class SOPHYA::POutPersist
     601   \ingroup BaseTools
     602   This class implements the I/O write services necessary for SOPHYA
     603   persistence (PPF) by extending the services provided by PPFBinaryOutputStream.
     604   \sa PPersist
     605*/
     606
    577607//++
    578608//  POutPersist(string const& flnm, int endianness = PPersist::PPS_NATIVE)
     
    583613//      ou PPersist::PPS_BIG_ENDIAN.
    584614//--
     615
     616/*! Constructor from a RawInOutStream pointer
     617  \param os : pointer to RawInOutStream
     618  \param ad : if true, the RawInOutStream \b os is deleted by the destructor
     619  \param endianness : Endianness selector  PPS_NATIVE PPS_LITTLE_ENDIAN PPS_BIG_ENDIAN
     620*/
    585621POutPersist::POutPersist(RawInOutStream* os, bool ad, int endianness)
    586622  : PPFBinaryOutputStream(os, ad, endianness)
     
    590626}
    591627
     628/*! Constructor
     629  \param flnm : output file name
     630  \param endianness : Endianness selector  PPS_NATIVE PPS_LITTLE_ENDIAN PPS_BIG_ENDIAN
     631*/
    592632POutPersist::POutPersist(string const& flnm, int endianness)
    593633  : PPFBinaryOutputStream(flnm, endianness)
     
    603643
    604644
     645//! Writes the object \b o to the stream
    605646void
    606647POutPersist::PutObject(AnyDataObj & o)
     
    614655}
    615656
     657//! Writes the nametag \b tagname and then the object \b o to the stream
    616658void
    617659POutPersist::PutObject(AnyDataObj & o, string tagname)
  • trunk/SophyaLib/BaseTools/ppersist.h

    r2774 r2805  
    6868
    6969
    70 //! Ancestor for PInPersist and POutPersist object serialisation streams.
    7170// Handles (statically) the registration of classes.
    7271
     
    169168  };
    170169 
    171 
     170//! \cond
    172171// Le macro suivant permettent de simplifier la declaration
    173172// des operateurs >> << sur les POutPersist et  PInPersist
     
    215214
    216215#endif
    217  
     216
     217//! \endcond 
    218218
    219219// --- Cela risque d'etre dangereux --- On le laisse au niveau des DataObj
  • trunk/SophyaLib/BaseTools/ppfbinstream.cc

    r2664 r2805  
    5252//-------------------------------------------------------------------------
    5353
     54/*!
     55   \class SOPHYA::PPFBinaryIOStream
     56   \ingroup BaseTools
     57   Base class for SOPHYA PPF input / output stream
     58*/
     59
    5460
    5561PPFBinaryIOStream::PPFBinaryIOStream()
     
    6874}
    6975
     76//! Return the creation date/time of the associated stream as a string
    7077string
    7178PPFBinaryIOStream::CreationDateStr()
     
    7683}
    7784
     85//! Return a string with information about the stream (creation-date, version ...)
    7886string
    7987PPFBinaryIOStream::InfoString()
     
    95103
    96104
     105//! Return the name tag number \b itag
    97106string
    98107PPFBinaryIOStream::GetTagName(int itag)
     
    105114
    106115
     116//! Return a reference to a vector<string> containing all name-tags associated with the stream
    107117static vector<string> * ret_tag_names = NULL;
    108118vector<string> const &
     
    120130//-------------------------------------------------------------------------
    121131
     132/*!
     133   \class SOPHYA::PPFBinaryInputStream
     134   \ingroup BaseTools
     135   PPF Input stream implementing read operations
     136*/
     137
     138/*! Constructor from a RawInOutStream pointer
     139  \param is : pointer to RawInOutStream
     140  \param ad : if true, the RawInOutStream \b is is deleted by the destructor
     141  \param scan : if true, try to read the name-tags table from the end of the input stream
     142*/
    122143PPFBinaryInputStream::PPFBinaryInputStream(RawInOutStream * is, bool ad, bool scan)
    123144{
     
    127148}
    128149
    129 //++
     150/*! Constructor
     151  \param  flnm : input file name
     152  \param scan : if true, try to read the name-tags table from the end of the input stream
     153*/ 
    130154PPFBinaryInputStream::PPFBinaryInputStream(string const& flnm, bool scan)
    131155//
     
    9951019}
    9961020
    997 
     1021/*! Scans the streams and prints in text format to standard output (cout) the PPF
     1022   stream content.
     1023   \param lev : print level (level of details) = 0,1,2,3
     1024*/
    9981025void
    9991026PPFBinaryInputStream::AnalyseTags(int lev)
     
    12251252//--
    12261253
     1254/*!
     1255   \class SOPHYA::PPFBinaryInputStream
     1256   \ingroup BaseTools
     1257   PPF output stream implementing write operations. The byte-ordering (endianess)
     1258   of the output stream can be selected at creation. By default, the native endianness
     1259   of the machine is used. 
     1260*/
     1261
     1262/*! Constructor from a RawInOutStream pointer
     1263  \param os : pointer to RawInOutStream
     1264  \param ad : if true, the RawInOutStream \b os is deleted by the destructor
     1265  \param endianness : Endianness selector  PPS_NATIVE PPS_LITTLE_ENDIAN PPS_BIG_ENDIAN
     1266*/
    12271267PPFBinaryOutputStream::PPFBinaryOutputStream(RawInOutStream* os, bool ad, int endianness)
    12281268{
     
    12321272}
    12331273
     1274/*! Constructor
     1275  \param flnm : output file name
     1276  \param endianness : Endianness selector  PPS_NATIVE PPS_LITTLE_ENDIAN PPS_BIG_ENDIAN
     1277*/
    12341278PPFBinaryOutputStream::PPFBinaryOutputStream(string const& flnm, int endianness)
    12351279{
  • trunk/SophyaLib/BaseTools/ppfnametag.h

    r2484 r2805  
    77
    88#include "ppersist.h"
    9 
     9/*!
     10   \class SOPHYA::PPFNameTag
     11   \ingroup BaseTools
     12   A simple class which can be used in conjuction with << and >> operators
     13   to write nametags in POutPersist streams or position an input PInPersist
     14   stream at a given nametag.
     15   Nametags are strings which can be used to identify objects for further
     16   retrieval in PPF streams.
     17   Pushing a PPFNameTag(tname) to an output stream \b os corresponds to
     18   so.WriteNameTag(tname). Extracting a PPFNameTag(tname) from an input stream
     19   \b is corresponds to is.GotoNameTag(tname).
     20   
     21   \code
     22   {
     23   // Writing a name tag and an object to a stream
     24   NDataBlock<int_4> idb(16);
     25   idb = 16;
     26   POutPersist so("myfile.ppf");
     27   so << PPFNameTag("MyIDB") << idb ;
     28   }
     29   //...
     30   {
     31   // Positioning and Reading from a PPF stream
     32   PInPersist si("myfile.ppf");
     33   NDataBlock<int_4> idb;
     34   si >>  PPFNameTag("MyIDB") >> idb;
     35   }
     36   \endcode
     37*/
    1038//----------------------------------------------------------------------
    1139namespace SOPHYA {
  • trunk/SophyaLib/BaseTools/ppfswapper.h

    r2794 r2805  
    1212#include "ppftpointerio.h"
    1313
    14 namespace SOPHYA {
    1514/*!
    1615  \class SOPHYA::PPFDataSwapper
     
    1817  Implementation of SOPHYA::DataSwapperInterface interface on PPF streams
    1918  (POutPersist , PInPersist) to be used with SOPHYA::SwSegDataBlock classes.
     19  the identifier idx is not used in this implementation. In case of re-writing
     20  to swap, the previous position is ignored, the data is re-written to swap
     21  and a new swap position is returned.
    2022*/
     23
     24namespace SOPHYA {
    2125
    2226template <class T>
  • trunk/SophyaLib/BaseTools/ppftpointerio.cc

    r2704 r2805  
    1010//----------------------------------------------------------------------
    1111namespace SOPHYA {
    12 
     12//! \cond
    1313// Specific implementation using table I/O in PPFBinaryIOStreams
    1414/* DECL_TEMP_SPEC   equivalent a template <> , pour SGI-CC en particulier */
     
    7979  { is.Get(arr,n); }
    8080
     81//! \endcond
    8182
    8283}  // namespace SOPHYA
  • trunk/SophyaLib/BaseTools/ppftpointerio.h

    r2704 r2805  
    99
    1010//----------------------------------------------------------------------
    11 namespace SOPHYA {
    12 
    1311/*!
    1412  \class SOPHYA::PPF_TPointer_IO
     
    2119  new types and classes.
    2220*/
     21
     22namespace SOPHYA {
    2323
    2424template <class T>
     
    3737};
    3838
     39//! \cond
    3940// declaration specifique pour ecriture sous forme de tableaux PPF
    4041DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
     
    123124};
    124125
     126//! \endcond
    125127}  // namespace SOPHYA
    126128
  • trunk/SophyaLib/BaseTools/ppfwrapstlv.h

    r2665 r2805  
    1414#include <iostream>
    1515
    16 namespace SOPHYA {
    17 
    1816/*!
    1917   \class SOPHYA::PPFWrapperSTLVector
     
    2725   using the macro \b PPRegister(PPFWrapperSTLVector<T>)
    2826*/
     27
     28namespace SOPHYA {
     29
    2930   
    3031template <class T>
  • trunk/SophyaLib/BaseTools/rcptr.h

    r287 r2805  
    44#define RCPTR_H
    55
    6 // This implements a very simple "smart pointer" with reference counting.
    7 // Many refinements are possible
     6/*!
     7  \class RCPtr
     8  \ingroup BaseTools
     9  This implements a very simple "smart pointer" with reference counting.
     10  Many refinements are possible
     11  Eric Aubourg  1999   CEA/DAPNIA/SPP
    812
    9 // Principle :  use RCPtr<T> instead of T*
    10 // To use with type X, define
    11 //  typedef RCPtr<X> Xp;
    12 //  When creating a new object, use
    13 //    Xp xp = new X(...);
    14 // xp can be used like a X*   xp->field, xp->method(), *xp ...
    15 //    can be passed by reference, copied, etc
    16 // the object is destroyed when the last Xp is destroyed.
     13  \verbatim
     14  Principle :  use RCPtr<T> instead of T*
     15  To use with type X, define
     16  typedef RCPtr<X> Xp;
     17  When creating a new object, use
     18  Xp xp = new X(...);
     19  xp can be used like a X*   xp->field, xp->method(), *xp ...
     20  can be passed by reference, copied, etc
     21  the object is destroyed when the last Xp is destroyed.
    1722
    18 // The class RCCPtr<X> is a const smart pointer, to be used like
    19 // a X const *.
    20 
    21 // Eric Aubourg  1999   CEA/DAPNIA/SPP
    22 
     23  The class RCCPtr<X> is a const smart pointer, to be used like
     24  a X const *.
     25  \endverbatim
     26*/
    2327
    2428template <class T> class RCCPtr;
     
    6973
    7074
    71 // A const smart pointer
     75//! A const smart pointer class
    7276template <class T>
    7377class RCCPtr {
  • trunk/SophyaLib/BaseTools/segdatablock.h

    r2698 r2805  
    1414#include <typeinfo>
    1515
    16 namespace SOPHYA {
    17 
    18 ////////////////////////////////////////////////////////////////
    19 //// ---------------- Class SegDBInterface ------------------ //
    20 //// ----------------- Class SegDataBlock ------------------- //
    21 ////////////////////////////////////////////////////////////////
    22 
    2316/*!
    2417   \class SOPHYA::SegDBInterface
     
    2619   Interface definition for segmented data container (template class).
    2720*/
     21/*!
     22   \class SOPHYA::SegDataBlock
     23   \ingroup BaseTools
     24   Template class impementing segmented data container in memory with
     25   management of reference sharing.
     26*/
     27
     28namespace SOPHYA {
     29
     30////////////////////////////////////////////////////////////////
     31//// ---------------- Class SegDBInterface ------------------ //
     32//// ----------------- Class SegDataBlock ------------------- //
     33////////////////////////////////////////////////////////////////
     34
    2835template <class T>
    2936class SegDBInterface : public AnyDataObj {
     
    4956};
    5057
     58
    5159// classe de container avec partage de reference
    52 //! Segmented data container with reference sharing
    53 /*!
    54    \class SOPHYA::SegDataBlock
    55    \ingroup BaseTools
    56    Template class impementing segmented data container in memory with
    57    management of reference sharing.
    58 */
    5960template <class T>
    6061class SegDataBlock : public SegDBInterface<T> {
     
    242243    mSRef = NULL;
    243244  }
    244   //! SDREF structure for reference management - for internal use by SegDataBlock
     245  /*! \cond
     246    SDREF structure for reference management - for internal use by SegDataBlock
     247  */
    245248  typedef struct {
    246     size_t nref;      //!< Number of references to the data structure
    247     uint_8 dsid;      //!< Data structure Id - Used by FIO_SegDataBlock
     249    size_t nref;      // Number of references to the data structure
     250    uint_8 dsid;      // Data structure Id - Used by FIO_SegDataBlock
    248251    std::vector<T *> dseg;
    249252    size_t segsize;
    250253  } SDREF;
    251 
     254  /*! \endcond */
    252255  SDREF *  mSRef;    //!< SDREF structure for reference sharing
    253256};
  • 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};
  • trunk/SophyaLib/BaseTools/timestamp.cc

    r2666 r2805  
    99#include <iostream>
    1010
     11/*!
     12   \class SOPHYA::TimeStamp
     13   \ingroup BaseTools
     14   A simple class for representing date and time. Simple operations
     15   on date/time are also provided.
     16   
     17   \code
     18   // Create a object with the current date and time and prints it to cout
     19   TimeStamp ts;
     20   cout << ts << endl;
     21   // Create an object with a specified date and time
     22   TimeStamp ts2("01/01/1905","00:00:00");
     23   // Get the number of days since 0 Jan 1901
     24   cout << ts2.ToDays() << endl;
     25   \endcode
     26*/
     27
    1128#ifdef Linux
    1229// La fonction trunc non declaree ds math.h sous Linux
     
    1633//--------------------------  Classe TimeStamp   --------------------------
    1734//-------------------------------------------------------------------------
     35
    1836enum Jour {jour_Lundi=0, jour_Mardi, jour_Mercredi, jour_Jeudi, jour_Vendredi, jour_Samedi, jour_Dimanche};
    1937enum Mois {mois_Janvier=1, mois_Fevrier, mois_Mars, mois_Avril, mois_Mai, mois_Juin, mois_Juillet,
Note: See TracChangeset for help on using the changeset viewer.