VR-Exchange 2.1 API Documentation
tenaBroker/globalIdMapper.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 2003 MaK Technologies, Inc.
3  ** All rights reserved.
4  *********************************************************************/
5 /*********************************************************************
6  ** $RCSfile: globalIdMapper.h,v $ $Revision: 1.10 $ $State: Exp $
7  *********************************************************************/
8 #ifndef globalIdMapper_H_
9 #define globalIdMapper_H_
10 
11 #include <vlutil/vlString.h>
12 #include <vlpi/entityIdentifier.h>
13 #include <vlutil/vlHashlist.h>
14 #include <vlutil/vlHashKeys.h>
15 #include <namespace.h>
16 
17 namespace MAKVrExchange
18 {
19  namespace DtTenaBroker
20  {
38  {
39  public:
40  typedef DtEntityIdentifier TenaId;
41  typedef DtString PortalId;
42 
45  enum { NoSystemId = -1};
46  enum { NoBeamId = -1};
47 
48  typedef enum {
49  NoType = -1,
50  EntityType = 0,
51  EmitterSystemType = 1,
52  RadioTransmitterType = 2,
53  RadioReceiverType = 3,
54  EmitterBeamType = 4,
55  EnvironmentProcess = 5,
56  GridData = 6
57  } ObjectType;
58 
61 
63  virtual ~DtGlobalIdMapper();
64 
67  virtual bool add(const PortalId &portal_name,
68  const TenaId &tena_name,
69  ObjectType oType = EntityType,
70  int systemId = NoSystemId,
71  int beamId = NoBeamId);
72 
75  virtual void remove(const PortalId &portal_name);
76  virtual void remove(const TenaId &tena_name,
77  ObjectType otype = EntityType,
78  int systemId = NoSystemId,
79  int beamId = NoBeamId);
80 
81 
84  virtual void remove(const PortalId &portal_name,
85  const TenaId &tena_name,
86  ObjectType otype = EntityType,
87  int systemId = NoSystemId,
88  int beamId = NoBeamId);
89 
93  virtual const PortalId &convertTenaGidToPortalGid(
94  const TenaId &tena_name,
95  ObjectType = EntityType,
96  int systemId = NoSystemId,
97  int beamId = NoBeamId);
98 
101  virtual const TenaId &convertPortalGidToTenaGid(
102  const PortalId &portal_name,
103  ObjectType* otype = 0,
104  int* systemId = 0,
105  int* beamId = 0);
106 
107  virtual bool unique(const PortalId &portal_name) const;
108  virtual bool unique(const TenaId &tena_name,
109  ObjectType oType = EntityType,
110  int systemId = NoSystemId,
111  int beamId = NoBeamId) const;
112 
113  virtual void setDebug( bool debugOn);
114  virtual bool debug () const;
115 
116  virtual void setParseUnknownIds(bool parseOn);
117  virtual bool parseUnknownIds() const;
118 
119  protected:
121  const PortalId& parseAndCreatePortalId(
122  const TenaId& tenaName, const DtStringHashKey& tenaKey,
123  ObjectType oType = EntityType, int systemId = NoSystemId, int beamId = NoBeamId);
124 
126  const TenaId& parseAndCreateTenaId(
127  const PortalId& portalName, const DtStringHashKey& portalKey,
128  ObjectType* oType = 0, int* systemId = 0, int* beamId = 0);
129 
130  virtual bool addUnknownIds(const PortalId &portal_name,
131  const TenaId &tena_name,
132  ObjectType oType = EntityType,
133  int systemId = NoSystemId,
134  int beamId = NoBeamId);
135 
136  DtStringHashKey createTenaKey(const TenaId& tena_name,
137  ObjectType oType, int systemId, int beamId) const;
138 
141 
143  DtHashlist *myPortalIdHashList;
144 
146  DtHashlist *myTenaIdHashList;
147 
151 
154 
155  };
156 
159  {
160  public:
161 
164  int sysId= DtGlobalIdMapper::NoSystemId,
165  int beamId = DtGlobalIdMapper::NoBeamId);
166 
168  int systemId() const;
169  int beamId() const;
170 
171  DtGlobalIdMapper::ObjectType objectType() const;
172  const DtGlobalIdMapper::TenaId *gid() const ;
173 
174  protected:
176  int myBeamId;
179 
180  };
181 
182  }
183 }
184 #endif

Document ID: Generated on Tue Aug 7 22:07:13 EDT 2012 from SVN revision 117874
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)