Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

id_generator.h

Go to the documentation of this file.
00001 /*  This file is part of OMCSNetCPP
00002 
00003     OMCSNetCPP is free software; you can redistribute it and/or modify
00004     it under the terms of the GNU Lesser General Public License as published by
00005     the Free Software Foundation; either version 2.1 of the License, or
00006     (at your option) any later version.
00007 
00008     OMCSNetCPP is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011     GNU Lesser General Public License for more details.
00012 
00013     You should have received a copy of the GNU Lesser General Public License
00014     along with OMCSNetCPP; if not, write to the Free Software
00015     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00016  */
00017 
00020 #ifndef _ID_GENERATOR
00021 
00022 #define _ID_GENERATOR
00023 
00024 #include "semantic_id.h"
00025 
00026 //TODO: Turn this into a singleton
00027 //TODO: Consider separating ID ranges for concepts/links
00028 
00030 class CSemanticIDGenerator
00031 {
00032         public:
00034                 SemanticID Get()
00035                 {
00036                         return m_currentID++;
00037                 }
00038 
00040                 CSemanticIDGenerator()
00041                 {
00042                         m_currentID = SEMANTIC_ID_START;
00043                 }
00044 
00046                 ~CSemanticIDGenerator() {}
00047 
00048         private:
00050                 SemanticID m_currentID;
00051 };
00052 
00053 
00054 #endif
00055 

Generated on Tue Sep 16 09:43:50 2003 for OMCSNetCPP by doxygen 1.3.3