Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsnOutputOffsetTable.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software
00003  * 
00004  * The Software has been developped within the Siames Project. 
00005  * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights
00006  * 
00007  * The Software has been registered with the Agence pour la Protection des
00008  * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200
00009  *
00010  * This file may be distributed under the terms of the Q Public License
00011  * version 1.0 as defined by Trolltech AS of Norway and appearing in the file
00012  * LICENSE.QPL included in the packaging of this file.
00013  *
00014  * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 
00015  * for the software may use this file in accordance with that specific license 
00016  *
00017  */
00018 #ifndef PsnOutputOffsetTableHEADER
00019 #define PsnOutputOffsetTableHEADER
00020 
00021 #include <PsName.h>
00022 #include <hash_map>
00023 #include <mySharedAllocator.h>
00024 #include <MomeDsm.h>
00025 
00026 typedef mySharedAllocatorT<pair<const PsName::idType,unsigned long> > _internalAllocator ; 
00027 
00028 typedef hash_map <PsName::idType, unsigned long,hash<PsName::idType>,equal_to<PsName::idType>,_internalAllocator > __localHash ;
00029 
00030 typedef mySharedAllocatorT<pair< const PsName::idType,__localHash> > _externalAllocator;
00031 
00034 class PsnOutputOffsetTable : public hash_map <PsName::idType, 
00035                              __localHash,
00036                              hash<PsName::idType>,
00037                              equal_to<PsName::idType>,
00038                              _externalAllocator > {
00039 public:
00040    typedef __localHash internalHash_map;
00041    typedef internalHash_map::iterator internalHash_mapIterator;
00043    PsnOutputOffsetTable();
00045    void * operator new(size_t size);
00047    void operator delete(void * ptr, size_t size);
00049    virtual void declareOutput(const PsName & object, const PsName & name, unsigned long offset);
00051    virtual void invalidateOutput(const PsName & object, const PsName & name);
00053    virtual pair<bool,unsigned int> getOutputOffset(const PsName & object, const PsName & name);
00054    virtual void lock();
00055    virtual void unlock();
00056 protected:
00057    MomeTpLock _myLockNumber;
00058    bool _locked;
00059    MomeTpProcessor _lockedBy;
00060 };
00061 
00062 #endif
00063 
00064 

logo OpenMask

Documentation generated on Mon Nov 25 15:25:01 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001