29 #ifndef GENAPI_NODEMAPREF_H 30 #define GENAPI_NODEMAPREF_H 32 #include <GenICamVersion.h> 38 #include <GenApi/IDestroy.h> 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);
152 virtual bool _ParseSwissKnifes( GENICAM_NAMESPACE::gcstring_vector *pErrorList = NULL )
const;
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>
373 INodeMap* pNodeMap = nodeMapData.CreateNodeMap(_DeviceName);
374 Attach( pNodeMap, _DeviceName,
new int( 0 ) );
378 template<
class TCameraParams>
390 Attach( pNodeMap, _DeviceName,
new int( 0 ) );
393 template<
class TCameraParams>
406 INodeMap* pNodeMap = nodeMapData.CreateNodeMap();
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();
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'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'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