ALBA
mmuIdFactory.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: mmuIdFactory
5 Authors: Marco Petrone
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __mmuIdFactory_h
18#define __mmuIdFactory_h
19
20#include "albaUtility.h"
21#include "albaDefines.h"
22
23//------------------------------------------------------------------------------
24// Forward declarations
25//------------------------------------------------------------------------------
26 // used for grouping Ids with doxygen // used for grouping Ids with doxygen
29
35class ALBA_EXPORT mmuIdFactory : public albaUtility
36{
37public:
39 static albaID GetNextId(const char *evtname);
40
42 //not used
43 //static albaID AllocIdGroup(const char *evtname,int num);
44
46 static albaID GetId(const char *evtname);
47
49 static const char *GetIdName(albaID id);
50protected:
52
54 friend class mmuIdFactoryTest;
55};
56
57#endif /* __mmuIdFactory_h */
long albaID
type for IDs inside ALBA
Definition: albaDefines.h:58
albaUtility - the pourpose of this class is just to groups utilities classes
Definition: albaUtility.h:27
Factory for Ids used to generate unique Ids at runtime.
Definition: mmuIdFactory.h:36
static albaID GetNextId(const char *evtname)
Internally used to keep a unique ID for the events.
static albaID m_IdCounter
Definition: mmuIdFactory.h:51
static const char * GetIdName(albaID id)
this function can be used to obtain an event Name, given its ID
static albaID GetId(const char *evtname)
Alloc a number of IDs assigning a name to the group.