GenApi  3.5.1
NodeMapRef.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006 by Basler Vision Technologies
3 // Author: Fritz Dierks
4 //
5 // License: This file is published under the license of the EMVA GenICam Standard Group.
6 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
7 // If for some reason you are missing this file please contact the EMVA or visit the website
8 // (http://www.genicam.org) for a full copy.
9 //
10 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
11 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
12 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
14 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
15 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
16 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
17 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
18 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20 // POSSIBILITY OF SUCH DAMAGE.
21 //
22 //-----------------------------------------------------------------------------
29 #ifndef GENAPI_NODEMAPREF_H
30 #define GENAPI_NODEMAPREF_H
31 
32 #include <GenICamVersion.h>
33 #include <Base/GCString.h>
34 #include <Base/GCException.h>
35 
36 #include <GenApi/Pointer.h>
37 #include <GenApi/INodeMap.h>
38 #include <GenApi/IDestroy.h>
39 #include <GenApi/NodeMapFactory.h>
40 
41 #include <cstdlib>
42 
43 namespace GENAPI_NAMESPACE
44 {
45 
46 # ifdef _WIN32
47 
48  // see below in the Linux branch
49  inline IDestroy *CastToIDestroy(INodeMap *pNodeMap)
50  {
51  return dynamic_cast<IDestroy *>(pNodeMap);
52  }
53 
54 # else
55  GENAPI_DECL IDestroy *CastToIDestroy(INodeMap *pNodeMap);
57 # endif
58 
64  template<class TCameraParams>
65  class CNodeMapRefT : public TCameraParams
66  {
67  public:
69  CNodeMapRefT(const GENICAM_NAMESPACE::gcstring &DeviceName = "Device");
70 
72  CNodeMapRefT(INodeMap* pNodeMap, const GENICAM_NAMESPACE::gcstring &DeviceName = "Device");
73 
75  CNodeMapRefT(const CNodeMapRefT& Them);
76 
78  CNodeMapRefT& operator=(const CNodeMapRefT& Them);
79 
81  CNodeMapRefT& operator=(INodeMap* pNodeMap);
82 
84  virtual ~CNodeMapRefT();
85 
87  void _Destroy();
88 
90  void _LoadXMLFromFile(const GENICAM_NAMESPACE::gcstring &FileName);
91 
93  void _LoadXMLFromZIPFile(const GENICAM_NAMESPACE::gcstring &ZipFileName);
94 
96  void _LoadXMLFromZIPData(const void* zipData, size_t zipSize);
97 
99  void _LoadXMLFromFileInject(const GENICAM_NAMESPACE::gcstring &TargetFileName, const GENICAM_NAMESPACE::gcstring &InjectFileName);
100 
102  void _LoadXMLFromString(const GENICAM_NAMESPACE::gcstring& XMLData);
103 
105  void _LoadXMLFromStringInject(const GENICAM_NAMESPACE::gcstring& TargetXMLDataconst, const GENICAM_NAMESPACE::gcstring& InjectXMLData);
106 
108 
112  virtual void _GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const;
113 
116 
118  virtual void _Poll(int64_t ElapsedTime);
119 
121  static bool _ClearXMLCache();
122 
123  //----------------------------------------------------------------
124  // INodeMap
125  //----------------------------------------------------------------
126 
128  virtual void _GetNodes(NodeList_t &Nodes) const;
129 
131  virtual INode* _GetNode(const GENICAM_NAMESPACE::gcstring& key) const;
132 
135 
137  virtual CNodeWriteConcatenator *_NewNodeWriteConcatenator() const;
138 
140  virtual bool _ConcatenatedWrite(CNodeWriteConcatenator*, bool featureStreaming = true, GENICAM_NAMESPACE::gcstring_vector* pErrorList = NULL);
141 
143  virtual void _InvalidateNodes() const;
144 
146  virtual bool _Connect(IPort* pPort, const GENICAM_NAMESPACE::gcstring& PortName) const;
147 
149  virtual bool _Connect(IPort* pPort) const;
150 
152  virtual bool _ParseSwissKnifes( GENICAM_NAMESPACE::gcstring_vector *pErrorList = NULL ) const;
154  virtual bool _Connect(IPortStacked* pPort, const GENICAM_NAMESPACE::gcstring& PortName) const;
155 
157  virtual bool _Connect(IPortStacked* pPort) const;
158 
161 
162  private:
164  GENICAM_NAMESPACE::gcstring _DeviceName;
165 
166  //ATTENTION: not thread safe
167  int* _pRefCount;
168  void Release();
169  void Attach(INodeMap *pNodeMap, const GENICAM_NAMESPACE::gcstring &DeviceName, int* pRefCount);
170  };
171 
172 
173 
174  template<class TCameraParams>
176  : _Ptr(NULL)
177  , _DeviceName(DeviceName)
178  , _pRefCount(NULL)
179  {
180  }
181 
182  template<class TCameraParams>
184  : _Ptr(NULL)
185  , _DeviceName(DeviceName)
186  , _pRefCount(NULL)
187  {
188  assert(pNodeMap);
189  Attach(pNodeMap, DeviceName, pNodeMap ? new int(0) : NULL);
190  }
191 
192  template<class TCameraParams>
194  : TCameraParams()
195  , _Ptr(NULL)
196  , _DeviceName()
197  , _pRefCount(NULL)
198  {
199  Attach(Them._Ptr, Them._DeviceName, Them._pRefCount);
200  }
201 
202  //ATTENTION: not thread safe
203  template<class TCameraParams>
204  void GENAPI_NAMESPACE::CNodeMapRefT<TCameraParams>::Attach(INodeMap *pNodeMap, const GENICAM_NAMESPACE::gcstring &DeviceName, int* pRefCount)
205  {
206  // Must be empty
207  assert(_Ptr == NULL);
208  assert(_pRefCount == NULL);
209 
210  //always copy device name
211  if (&_DeviceName != &DeviceName) //if not assigning member itself
212  {
213  _DeviceName = DeviceName;
214  }
215 
216  // Attach
217  if (pNodeMap)
218  {
219  assert(pRefCount);
220  if (pRefCount)
221  {
222  ++*pRefCount;
223 
224  //assign new node map data
225  _Ptr = pNodeMap;
226  _pRefCount = pRefCount;
227 
228  // Initialize the references
229  TCameraParams::_Initialize(_Ptr);
230  }
231  }
232  }
233 
234  //ATTENTION: not thread safe
235  template<class TCameraParams>
237  {
238  if (_Ptr)
239  {
240  // Copy node map data for eventual later destruction
241  INodeMap* pToDel = _Ptr;
242  int* pRefCount = _pRefCount;
243 
244  // Clear
245  _pRefCount = NULL;
246  _Ptr = NULL;
247  _DeviceName = "Device";
248 
249  assert(pRefCount);
250  // Check if destruction is required
251  if (pRefCount)
252  {
253  assert(*pRefCount > 0);
254  --*pRefCount;
255  if (*pRefCount == 0)
256  {
257  // We do not need this anymore, all references are gone
258  delete pRefCount;
259  pRefCount = NULL;
260 
261  // Destroy the node map finally
262  GENAPI_NAMESPACE::IDestroy *pDestroy = CastToIDestroy(pToDel);
263  assert(pDestroy);
264  pDestroy->Destroy(); //must not throw
265  }
266  }
267  }
268  else
269  {
270  // Must not have a refcount when no node map is there.
271  assert(_pRefCount == NULL);
272  }
273  }
274 
275  template<class TCameraParams>
277  {
278  Release();
279  assert(pNodeMap);
280  if (pNodeMap)
281  {
282  Attach(pNodeMap, pNodeMap->GetDeviceName(), new int(0));
283  }
284 
285  return *this;
286  }
287 
288  template<class TCameraParams>
290  {
291  Release();
292  Attach(Them._Ptr, Them._DeviceName, Them._pRefCount);
293  return *this;
294  }
295 
296  template<class TCameraParams>
298  {
299  Release();
300  }
301 
302  template<class TCameraParams>
304  {
305  Release();
306  }
307 
308 
309  template<class TCameraParams>
311  {
312  // FileName environment is replaced in CNodeMapFactory ctor
313 
314  // Load the DLL
315  if(_Ptr)
316  throw RUNTIME_EXCEPTION("Node map already created");
317 
318  // Load the XML file
319  CNodeMapFactory nodeMapData(ContentType_Xml, FileName);
320 
321  // First create node map then the reference counter. This prevents a leak in case of bad node map
322  INodeMap* pNodeMap = nodeMapData.CreateNodeMap( _DeviceName );
323  Attach( pNodeMap, _DeviceName, new int( 0 ) );
324  }
325 
326  template<class TCameraParams>
328  {
329  // FileName environment is replaced in CNodeMapFactory ctor
330 
331  // Load the DLL
332  if(_Ptr)
333  throw RUNTIME_EXCEPTION("Node map already created");
334 
335  // Load the XML file
336  CNodeMapFactory nodeMapData(ContentType_ZippedXml, ZipFileName);
337 
338  // First create node map then the reference counter. This prevents a leak in case of bad node map
339  INodeMap* pNodeMap = nodeMapData.CreateNodeMap();
340  Attach( pNodeMap, _DeviceName, new int(0));
341  }
342 
343  template<class TCameraParams>
345  {
346  // xxxFileName environment is replaced in CNodeMapFactory ctor
347 
348  // Load the DLL
349  if(_Ptr)
350  throw RUNTIME_EXCEPTION("Node map already created");
351 
352  // Load the XML file
353  CNodeMapFactory nodeMapData(ContentType_Xml, TargetFileName);
354  CNodeMapFactory injectNodeMapData(ContentType_Xml, InjectFileName);
355  nodeMapData.AddInjectionData(injectNodeMapData);
356 
357  // First create node map then the reference counter. This prevents a leak in case of bad node map
358  INodeMap* pNodeMap = nodeMapData.CreateNodeMap(_DeviceName);
359  Attach( pNodeMap, _DeviceName, new int( 0 ) );
360  }
361 
362  template<class TCameraParams>
364  {
365  // Load the DLL
366  if(_Ptr)
367  throw RUNTIME_EXCEPTION("Node map already created");
368 
369  // Load the XML file
370  CNodeMapFactory nodeMapData(ContentType_Xml, XMLData.c_str(), XMLData.size()); //avoid string copy
371 
372  // First create node map then the reference counter. This prevents a leak in case of bad node map
373  INodeMap* pNodeMap = nodeMapData.CreateNodeMap(_DeviceName);
374  Attach( pNodeMap, _DeviceName, new int( 0 ) );
375  }
376 
377 
378  template<class TCameraParams>
379  inline void CNodeMapRefT<TCameraParams>::_LoadXMLFromZIPData(const void* zipData, size_t zipSize)
380  {
381  // Load the DLL
382  if(_Ptr)
383  throw RUNTIME_EXCEPTION("Node map already created");
384 
385  // Load the XML file
386  CNodeMapFactory nodeMapData(ContentType_ZippedXml, zipData, zipSize);
387 
388  // First create node map then the reference counter. This prevents a leak in case of bad node map
389  INodeMap* pNodeMap = nodeMapData.CreateNodeMap();
390  Attach( pNodeMap, _DeviceName, new int( 0 ) );
391  }
392 
393  template<class TCameraParams>
395  {
396  // Load the DLL
397  if(_Ptr)
398  throw RUNTIME_EXCEPTION("Node map already created");
399 
400  // Load the XML file
401  CNodeMapFactory nodeMapData(ContentType_Xml, TargetXMLData.c_str(), TargetXMLData.size()); //avoid string copy
402  CNodeMapFactory injectNodeMapData(ContentType_Xml, InjectXMLData.c_str(), InjectXMLData.size()); //avoid string copy
403  nodeMapData.AddInjectionData(injectNodeMapData);
404 
405  // First create node map then the reference counter. This prevents a leak in case of bad node map
406  INodeMap* pNodeMap = nodeMapData.CreateNodeMap();
407  Attach( pNodeMap, _DeviceName, new int( 0 ) );
408  }
409 
410  template<class TCameraParams>
411  inline void CNodeMapRefT<TCameraParams>::_GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const
412  {
414  }
415 
416  template<class TCameraParams>
418  {
419  if(_Ptr)
420  return _Ptr->GetDeviceName();
421  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
422  }
423 
424  template<class TCameraParams>
425  inline void CNodeMapRefT<TCameraParams>::_Poll(int64_t ElapsedTime)
426  {
427  if(_Ptr)
428  return _Ptr->Poll(ElapsedTime);
429  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
430  }
431 
432  template<class TCameraParams>
434  {
435  if(_Ptr)
436  return _Ptr->GetNodes(Nodes);
437  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
438  }
439 
440 
441  template<class TCameraParams>
443  {
444  if (_Ptr)
445  return _Ptr->SetSuppressCallbackMode(mode);
446  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
447  }
448 
449 
450  template<class TCameraParams>
451  inline CNodeWriteConcatenator *CNodeMapRefT<TCameraParams>::_NewNodeWriteConcatenator() const
452  {
453  if (_Ptr)
454  return _Ptr->NewNodeWriteConcatenator();
455  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
456  }
457 
458  template<class TCameraParams>
459  inline bool CNodeMapRefT<TCameraParams>::_ConcatenatedWrite(CNodeWriteConcatenator* pConcatenatedWrite, bool featureStreaming, GENICAM_NAMESPACE::gcstring_vector* pErrorList)
460  {
461  if (_Ptr)
462  return _Ptr->ConcatenatedWrite(pConcatenatedWrite, featureStreaming, pErrorList);
463  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
464  }
465 
466  template<class TCameraParams>
468  {
469  if(_Ptr)
470  return _Ptr->GetNode(key);
471  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
472  }
473 
474  template<class TCameraParams>
476  {
477  if(_Ptr)
478  return _Ptr->InvalidateNodes();
479  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
480  }
481 
482  template<class TCameraParams>
483  inline bool CNodeMapRefT<TCameraParams>::_ParseSwissKnifes( GENICAM_NAMESPACE::gcstring_vector *pErrorList ) const
484  {
485  if (_Ptr)
486  return _Ptr->ParseSwissKnifes(pErrorList);
487  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
488  }
489 
490  template<class TCameraParams>
492  {
493  if(_Ptr)
494  return _Ptr->Connect(pPort, PortName);
495  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
496  }
497 
498  template<class TCameraParams>
500  {
501  if(_Ptr)
502  return _Ptr->Connect(pPort);
503  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
504  }
505 
506  template<class TCameraParams>
508  {
509  if (_Ptr)
510  return _Ptr->Connect(pPort, PortName);
511  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
512  }
513 
514  template<class TCameraParams>
516  {
517  if (_Ptr)
518  return _Ptr->Connect(pPort);
519  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
520  }
521 
522  template<class TCameraParams>
524  {
525  return CNodeMapFactory::ClearCache();
526  }
527 
533  {
534  protected:
535  virtual void _Initialize(GENAPI_NAMESPACE::INodeMap*) {}
536  virtual ~CGeneric_XMLLoaderParams()
537  {
538  // ensure to release all ressources
539  }
540  };
541 
542 
549  class CNodeMapRef : public CNodeMapRefT<GENAPI_NAMESPACE::CGeneric_XMLLoaderParams>
550  {
551  public:
553  CNodeMapRef(const GENICAM_NAMESPACE::gcstring &DeviceName = "Device")
555  {
556  }
557 
559  CNodeMapRef(INodeMap* pNodeMap, const GENICAM_NAMESPACE::gcstring &DeviceName = "Device")
560  : CNodeMapRefT<GENAPI_NAMESPACE::CGeneric_XMLLoaderParams>(pNodeMap, DeviceName)
561  {
562  }
563 
567  {
568  }
569 
572  {
574  return *this;
575  }
576 
579  {
581  return *this;
582  }
583  };
584 
585 }
586 
587 #endif // ifndef GENAPI_NODEMAPPTR_H
The node map factory is used for creating node maps from camera description files.
Definition: NodeMapFactory.h:135
void _LoadXMLFromFileInject(const GENICAM_NAMESPACE::gcstring &TargetFileName, const GENICAM_NAMESPACE::gcstring &InjectFileName)
Creates the object from a XML target and an inject file with given file name.
Definition: NodeMapRef.h:344
virtual ~CNodeMapRefT()
Destructor.
Definition: NodeMapRef.h:297
Zipped XML camera description file text.
Definition: NodeMapFactory.h:65
virtual CNodeWriteConcatenator * _NewNodeWriteConcatenator() const
Create a new write concatenator object.
Definition: NodeMapRef.h:451
void _LoadXMLFromStringInject(const GENICAM_NAMESPACE::gcstring &TargetXMLDataconst, const GENICAM_NAMESPACE::gcstring &InjectXMLData)
Creates the object from XML data given in a string with injection.
Definition: NodeMapRef.h:394
Empty base class used by class CNodeMapRef as generic template argument.
Definition: NodeMapRef.h:532
CNodeMapRefT & operator=(const CNodeMapRefT &Them)
Assignment.
Definition: NodeMapRef.h:289
virtual bool _ConcatenatedWrite(CNodeWriteConcatenator *, bool featureStreaming=true, GENICAM_NAMESPACE::gcstring_vector *pErrorList=NULL)
Execute the transaction.
Definition: NodeMapRef.h:459
void AddInjectionData(CNodeMapFactory &injectionData)
Adds a node map factory representing a camera description file to inject.
virtual void _InvalidateNodes() const
Invalidates all nodes.
Definition: NodeMapRef.h:475
void _LoadXMLFromZIPFile(const GENICAM_NAMESPACE::gcstring &ZipFileName)
Creates the object from a ZIP&#39;d XML file with given file name.
Definition: NodeMapRef.h:327
CNodeMapRef & operator=(INodeMap *pNodeMap)
Assignment of an INodeMap*.
Definition: NodeMapRef.h:578
GENICAM_INTERFACE INode
Interface common to all nodes.
Definition: ICategory.h:49
void _LoadXMLFromFile(const GENICAM_NAMESPACE::gcstring &FileName)
Creates the object from a XML file with given file name.
Definition: NodeMapRef.h:310
virtual bool _Connect(IPort *pPort, const GENICAM_NAMESPACE::gcstring &PortName) const
Connects a port to a port node with given name.
Definition: NodeMapRef.h:491
node_vector NodeList_t
a list of node references
Definition: INode.h:53
#define RUNTIME_EXCEPTION
Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
Definition: GCException.h:246
XML camera description file text.
Definition: NodeMapFactory.h:64
virtual INode * _GetNode(const GENICAM_NAMESPACE::gcstring &key) const
Retrieves the node from the central map by name.
Definition: NodeMapRef.h:467
INodeMap * CreateNodeMap(const GENICAM_NAMESPACE::gcstring &DeviceName="Device", bool DoReleaseCameraDescriptionFileData=true)
Creates a node map from the preprocessed memory internal representation of the camera description fil...
virtual bool _ParseSwissKnifes(GENICAM_NAMESPACE::gcstring_vector *pErrorList=NULL) const
Parse all Swissknife equations.
Definition: NodeMapRef.h:483
GENAPI_DECL IDestroy * CastToIDestroy(INodeMap *pNodeMap)
makes sure the dynamic_cast operator is implemented in the DLL (due to a Linux bug) ...
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition: GCException.h:252
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPort
Interface for ports.
Definition: IPort.h:55
CNodeMapRef(INodeMap *pNodeMap, const GENICAM_NAMESPACE::gcstring &DeviceName="Device")
Constructor.
Definition: NodeMapRef.h:559
virtual GENICAM_NAMESPACE::gcstring _GetDeviceName() const
Get device name.
Definition: NodeMapRef.h:417
Smartpointer template for NodeMaps with create function.
Definition: NodeMapRef.h:65
Definition of interface INodeMap.
Definition of the node map factory.
void _Destroy()
Destroys the node map.
Definition: NodeMapRef.h:303
CNodeMapRef(const CNodeMapRef &Them)
Copy constructor.
Definition: NodeMapRef.h:565
void _LoadXMLFromString(const GENICAM_NAMESPACE::gcstring &XMLData)
Creates the object from XML data given in a string.
Definition: NodeMapRef.h:363
GENICAM_INTERFACE INodeMap
Interface to access the node map.
Definition: INode.h:50
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPortStacked
Interface for ports.
Definition: IPortStacked.h:62
virtual void _GetNodes(NodeList_t &Nodes) const
Retrieves all nodes in the node map.
Definition: NodeMapRef.h:433
CNodeMapRef & operator=(const CNodeMapRef &Them)
Assignment.
Definition: NodeMapRef.h:571
void _LoadXMLFromZIPData(const void *zipData, size_t zipSize)
Creates the object from a ZIP&#39;d XML file given in a string.
Definition: NodeMapRef.h:379
Standard GenICam Exceptions.
Definition of template CPointer.
A string class which is a clone of std::string.
Definition: GCString.h:50
CNodeMapRefT(const GENICAM_NAMESPACE::gcstring &DeviceName="Device")
Constructor.
Definition: NodeMapRef.h:175
void GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const
Portable string implementation.
INodeMap * _Ptr
Pointer to the NodeMap.
Definition: NodeMapRef.h:160
static bool _ClearXMLCache()
Clears the cache of the camera description files.
Definition: NodeMapRef.h:523
virtual void _GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const
Gets a list of supported schema versions.
Definition: NodeMapRef.h:411
virtual void _SetSuppressCallbackMode(ECallbackSuppressMode) const
Set suppress callback mode.
Definition: NodeMapRef.h:442
virtual void _Poll(int64_t ElapsedTime)
Fires nodes which have a polling time.
Definition: NodeMapRef.h:425
Definition: ChunkAdapter.h:37
Smartpointer for NodeMaps with create function.
Definition: NodeMapRef.h:549
enum GENAPI_NAMESPACE::_ECallbackSuppressMode ECallbackSuppressMode
CNodeMapRef(const GENICAM_NAMESPACE::gcstring &DeviceName="Device")
Constructor.
Definition: NodeMapRef.h:553