Changeset 69 in pacpusframework for trunk/include/Pacpus/PacpusTools/ShMemBase.h


Ignore:
Timestamp:
01/10/13 00:04:42 (11 years ago)
Author:
Marek Kurdej
Message:

Added: more documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Pacpus/PacpusTools/ShMemBase.h

    r66 r69  
    1414#define DEF_PACPUS_SHMEMBASE_H
    1515
     16/// Base class for shared memory objects.
    1617class ShMemBase
    1718{
    1819public:
    19   ShMemBase()
    20   {
    21       /*printf("ShMemBase::ShMemBase() not implemented !\n");*/
    22   }
     20    /// Ctor
     21    ShMemBase()
     22    {
     23    }
    2324
    24   virtual ~ShMemBase()
    25   {
    26       /*printf("ShMemBase::~ShMemBase() not implemented !\n");*/
    27   }
     25    /// Dtor
     26    virtual ~ShMemBase()
     27    {
     28    }
    2829
    29   // Use this method to get the data of the shared memory
    30   virtual void *read() = 0;
     30    /// Use this method to get the data of the shared memory
     31    virtual void *read() = 0;
    3132
    32   // Use this method to write data in shared memory
    33   virtual void write(void *data, int size, unsigned long offset = 0) = 0;
     33    /// Use this method to write data in shared memory
     34    virtual void write(void *data, int size, unsigned long offset = 0) = 0;
    3435
    35   // Use this method to wait the incoming of new data
    36   // you can specify a timeout in ms to avoid infinite blocking or 0 (infinite)
    37   // return true if new data available before the timeout or else false
    38   virtual bool wait(unsigned long timeout = 0) = 0;
     36    /// Use this method to wait the incoming of new data
     37    /// you can specify a timeout in ms to avoid infinite blocking or 0 (infinite)
     38    /// @returns @b true if new data available before the timeout, @b false otherwise
     39    virtual bool wait(unsigned long timeout = 0) = 0;
    3940
    40   // To lock the access to the memory
    41   virtual void lockMemory() = 0;
     41    /// To lock the access to the memory
     42    virtual void lockMemory() = 0;
    4243
    43   // To unlock the access to the memory
    44   virtual void unlockMemory() = 0;
     44    /// To unlock the access to the memory
     45    virtual void unlockMemory() = 0;
    4546
    4647#ifdef WIN32
    47   // Return the event handle under Windows
    48   // ... under Linux ?
    49   virtual void * getEventIdentifier() = 0;
     48    /// Return the event handle under Windows
     49    /// @todo ... under Linux ?
     50    virtual void * getEventIdentifier() = 0;
    5051#endif
    5152 
    5253protected:
    53   void * shMem_;
    54        
     54    /// @todo Documentation
     55    void * shMem_;
     56
    5557private:
    5658};
Note: See TracChangeset for help on using the changeset viewer.