29#ifndef GENAPI_NODEMAPREF_H
30#define GENAPI_NODEMAPREF_H
32#include <GenICamVersion.h>
38#include <GenApi/IDestroy.h>
43namespace GENAPI_NAMESPACE
51 return dynamic_cast<IDestroy *
>(pNodeMap);
64 template<
class TCameraParams>
118 virtual void _Poll(int64_t ElapsedTime);
140 virtual bool _ConcatenatedWrite(CNodeWriteConcatenator*,
bool featureStreaming =
true, GENICAM_NAMESPACE::gcstring_vector* pErrorList = NULL);
174 template<
class TCameraParams>
177 , _DeviceName(DeviceName)
182 template<
class TCameraParams>
185 , _DeviceName(DeviceName)
189 Attach(pNodeMap, DeviceName, pNodeMap ?
new int(0) : NULL);
192 template<
class TCameraParams>
199 Attach(Them.
_Ptr, Them._DeviceName, Them._pRefCount);
203 template<
class TCameraParams>
207 assert(_Ptr == NULL);
208 assert(_pRefCount == NULL);
211 if (&_DeviceName != &DeviceName)
213 _DeviceName = DeviceName;
226 _pRefCount = pRefCount;
229 TCameraParams::_Initialize(_Ptr);
235 template<
class TCameraParams>
242 int* pRefCount = _pRefCount;
247 _DeviceName =
"Device";
253 assert(*pRefCount > 0);
271 assert(_pRefCount == NULL);
275 template<
class TCameraParams>
282 Attach(pNodeMap, pNodeMap->GetDeviceName(),
new int(0));
288 template<
class TCameraParams>
292 Attach(Them.
_Ptr, Them._DeviceName, Them._pRefCount);
296 template<
class TCameraParams>
302 template<
class TCameraParams>
309 template<
class TCameraParams>
323 Attach( pNodeMap, _DeviceName,
new int( 0 ) );
326 template<
class TCameraParams>
340 Attach( pNodeMap, _DeviceName,
new int(0));
343 template<
class TCameraParams>
359 Attach( pNodeMap, _DeviceName,
new int( 0 ) );
362 template<
class TCameraParams>
374 Attach( pNodeMap, _DeviceName,
new int( 0 ) );
378 template<
class TCameraParams>
390 Attach( pNodeMap, _DeviceName,
new int( 0 ) );
393 template<
class TCameraParams>
407 Attach( pNodeMap, _DeviceName,
new int( 0 ) );
410 template<
class TCameraParams>
416 template<
class TCameraParams>
420 return _Ptr->GetDeviceName();
424 template<
class TCameraParams>
428 return _Ptr->Poll(ElapsedTime);
432 template<
class TCameraParams>
436 return _Ptr->GetNodes(Nodes);
441 template<
class TCameraParams>
445 return _Ptr->SetSuppressCallbackMode(mode);
450 template<
class TCameraParams>
454 return _Ptr->NewNodeWriteConcatenator();
458 template<
class TCameraParams>
462 return _Ptr->ConcatenatedWrite(pConcatenatedWrite, featureStreaming, pErrorList);
466 template<
class TCameraParams>
470 return _Ptr->GetNode(key);
474 template<
class TCameraParams>
478 return _Ptr->InvalidateNodes();
482 template<
class TCameraParams>
486 return _Ptr->ParseSwissKnifes(pErrorList);
490 template<
class TCameraParams>
494 return _Ptr->Connect(pPort, PortName);
498 template<
class TCameraParams>
502 return _Ptr->Connect(pPort);
506 template<
class TCameraParams>
510 return _Ptr->Connect(pPort, PortName);
514 template<
class TCameraParams>
518 return _Ptr->Connect(pPort);
522 template<
class TCameraParams>
525 return CNodeMapFactory::ClearCache();
Standard GenICam Exceptions.
Portable string implementation.
Definition of interface INodeMap.
node_vector NodeList_t
a list of node references
Definition INode.h:53
Definition of the node map factory.
GENAPI_DECL IDestroy * CastToIDestroy(INodeMap *pNodeMap)
makes sure the dynamic_cast operator is implemented in the DLL (due to a Linux bug)
Definition of template CPointer.
Empty base class used by class CNodeMapRef as generic template argument.
Definition NodeMapRef.h:533
The node map factory is used for creating node maps from camera description files.
Definition NodeMapFactory.h:136
void AddInjectionData(CNodeMapFactory &injectionData)
Adds a node map factory representing a camera description file to inject.
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...
void GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const
Smartpointer template for NodeMaps with create function.
Definition NodeMapRef.h:66
virtual bool _ConcatenatedWrite(CNodeWriteConcatenator *, bool featureStreaming=true, GENICAM_NAMESPACE::gcstring_vector *pErrorList=NULL)
Execute the transaction.
Definition NodeMapRef.h:459
virtual INode * _GetNode(const GENICAM_NAMESPACE::gcstring &key) const
Retrieves the node from the central map by name.
Definition NodeMapRef.h:467
CNodeMapRefT(const GENICAM_NAMESPACE::gcstring &DeviceName="Device")
Constructor.
Definition NodeMapRef.h:175
virtual bool _Connect(IPortStacked *pPort) const
Connects a port to the standard port "Device".
Definition NodeMapRef.h:515
virtual void _Poll(int64_t ElapsedTime)
Fires nodes which have a polling time.
Definition NodeMapRef.h:425
virtual bool _Connect(IPort *pPort) const
Connects a port to the standard port "Device".
Definition NodeMapRef.h:499
virtual void _GetNodes(NodeList_t &Nodes) const
Retrieves all nodes in the node map.
Definition NodeMapRef.h:433
CNodeMapRefT(INodeMap *pNodeMap, const GENICAM_NAMESPACE::gcstring &DeviceName="Device")
Constructor.
Definition NodeMapRef.h:183
void _LoadXMLFromString(const GENICAM_NAMESPACE::gcstring &XMLData)
Creates the object from XML data given in a string.
Definition NodeMapRef.h:363
virtual void _SetSuppressCallbackMode(ECallbackSuppressMode) const
Set suppress callback mode.
Definition NodeMapRef.h:442
virtual GENICAM_NAMESPACE::gcstring _GetDeviceName() const
Get device name.
Definition NodeMapRef.h:417
virtual bool _Connect(IPortStacked *pPort, const GENICAM_NAMESPACE::gcstring &PortName) const
Connects a port to a port node with given name.
Definition NodeMapRef.h:507
CNodeMapRefT & operator=(const CNodeMapRefT &Them)
Assignment.
Definition NodeMapRef.h:289
void _Destroy()
Destroys the node map.
Definition NodeMapRef.h:303
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 CNodeWriteConcatenator * _NewNodeWriteConcatenator() const
Create a new write concatenator object.
Definition NodeMapRef.h:451
void _LoadXMLFromZIPData(const void *zipData, size_t zipSize)
Creates the object from a ZIP'd XML file given in a string.
Definition NodeMapRef.h:379
virtual void _InvalidateNodes() const
Invalidates all nodes.
Definition NodeMapRef.h:475
INodeMap * _Ptr
Pointer to the NodeMap.
Definition NodeMapRef.h:160
CNodeMapRefT(const CNodeMapRefT &Them)
Copy constructor.
Definition NodeMapRef.h:193
static bool _ClearXMLCache()
Clears the cache of the camera description files.
Definition NodeMapRef.h:523
void _LoadXMLFromZIPFile(const GENICAM_NAMESPACE::gcstring &ZipFileName)
Creates the object from a ZIP'd XML file with given file name.
Definition NodeMapRef.h:327
virtual void _GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const
Gets a list of supported schema versions.
Definition NodeMapRef.h:411
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
virtual ~CNodeMapRefT()
Destructor.
Definition NodeMapRef.h:297
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
virtual bool _ParseSwissKnifes(GENICAM_NAMESPACE::gcstring_vector *pErrorList=NULL) const
Parse all Swissknife equations.
Definition NodeMapRef.h:483
void _LoadXMLFromFile(const GENICAM_NAMESPACE::gcstring &FileName)
Creates the object from a XML file with given file name.
Definition NodeMapRef.h:310
CNodeMapRefT & operator=(INodeMap *pNodeMap)
Assignment of an INodeMap*.
Definition NodeMapRef.h:276
Smartpointer for NodeMaps with create function.
Definition NodeMapRef.h:550
CNodeMapRef & operator=(INodeMap *pNodeMap)
Assignment of an INodeMap*.
Definition NodeMapRef.h:578
CNodeMapRef(const CNodeMapRef &Them)
Copy constructor.
Definition NodeMapRef.h:565
CNodeMapRef(const GENICAM_NAMESPACE::gcstring &DeviceName="Device")
Constructor.
Definition NodeMapRef.h:553
CNodeMapRef & operator=(const CNodeMapRef &Them)
Assignment.
Definition NodeMapRef.h:571
CNodeMapRef(INodeMap *pNodeMap, const GENICAM_NAMESPACE::gcstring &DeviceName="Device")
Constructor.
Definition NodeMapRef.h:559
A string class which is a clone of std::string.
Definition GCString.h:51
#define RUNTIME_EXCEPTION
Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
Definition GCException.h:246
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition GCException.h:252
enum GENAPI_NAMESPACE::_ECallbackSuppressMode ECallbackSuppressMode
GENICAM_INTERFACE INodeMap
Interface to access the node map.
Definition INode.h:50
GENICAM_INTERFACE INode
Interface common to all nodes.
Definition ICategory.h:49
@ ContentType_ZippedXml
Zipped XML camera description file text.
Definition NodeMapFactory.h:65
@ ContentType_Xml
XML camera description file text.
Definition NodeMapFactory.h:64