29#ifndef GENAPI_POINTER_H
30#define GENAPI_POINTER_H
38namespace GENAPI_NAMESPACE
48 template <
class T,
class B = IBase>
61 :
m_pT( dynamic_cast<T*>(pB) )
72 m_pT =
dynamic_cast<T*
>(pB);
77 operator T*(void)
const
115 operator bool(
void)
const throw()
135 if (0 != nMustBeNull)
242 return dynamic_cast<IInteger*
>(
m_pT->GetNode()->GetCastAlias());
268# pragma warning (push)
269# pragma warning (disable : 279)
271 assert(pBase &&
"don't call this with a NULL pointer");
273# pragma warning (pop)
276 switch(ptrNode->GetPrincipalInterfaceType())
309 template <
class T,
class B>
316 template <
class T,
class B>
323 template <
class T,
class B>
330 template <
class T,
class B>
Forward declarations for GenICam types.
Definition of interface IEnumeration.
Definition of the IFloat interface.
Definition of the interface IInteger.
SmartPointer for IFloat interface pointer.
Definition Pointer.h:218
CFloatPtr & operator=(IBase *pB)
Assign IBase Pointer.
Definition Pointer.h:233
CFloatPtr()
Default constructor.
Definition Pointer.h:221
CFloatPtr(IBase *pB)
Constructor from IBase pointer type.
Definition Pointer.h:227
IEnumeration * GetEnumAlias()
gets the interface of an enum alias node.
Definition Pointer.h:246
IInteger * GetIntAlias()
gets the interface of an integer alias node.
Definition Pointer.h:240
Encapsulates a GenApi pointer dealing with the dynamic_cast automatically.
Definition Pointer.h:50
T & operator*(void) const
Dereferencing.
Definition Pointer.h:85
T * m_pT
Underlying raw pointer.
Definition Pointer.h:144
CPointer(B *pB)
Constructor from INode pointer type.
Definition Pointer.h:60
T * operator->(void) const
Dereferencing.
Definition Pointer.h:101
bool operator==(const CPointer< T, B > &rT) const
pointer equal
Definition Pointer.h:127
T & operator()(void) const
Dereferencing.
Definition Pointer.h:93
bool IsValid() const
true if the pointer is valid
Definition Pointer.h:109
CPointer & operator=(B *pB)
Assign INode Pointer.
Definition Pointer.h:70
bool operator==(int nMustBeNull) const
pointer equal
Definition Pointer.h:133
bool operator==(T *pT) const
pointer equal
Definition Pointer.h:121
CPointer(void)
Default constructor.
Definition Pointer.h:54
A string class which is a clone of std::string.
Definition GCString.h:51
#define LOGICAL_ERROR_EXCEPTION
Fires a logical error exception, e.g. throw LOGICAL_ERROR_EXCEPTION("Should never reach this point")
Definition GCException.h:249
GENICAM_NAMESPACE::gcstring GetInterfaceName(IBase *pBase)
Definition Pointer.h:265
@ intfIRegister
IRegister interface.
Definition Types.h:195
@ intfIPort
IPort interface.
Definition Types.h:199
@ intfIBase
IBase interface.
Definition Types.h:189
@ intfIFloat
IFloat interface.
Definition Types.h:193
@ intfIValue
IValue interface.
Definition Types.h:188
@ intfIEnumEntry
IEnumEntry interface.
Definition Types.h:198
@ intfIInteger
IInteger interface.
Definition Types.h:190
@ intfIString
IString interface.
Definition Types.h:194
@ intfIBoolean
IBoolean interface.
Definition Types.h:191
@ intfICategory
ICategory interface.
Definition Types.h:196
@ intfICommand
ICommand interface.
Definition Types.h:192
@ intfIEnumeration
IEnumeration interface.
Definition Types.h:197
bool IsImplemented(EAccessMode AccessMode)
Tests if implemented.
Definition INode.h:212
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IBase
Base interface common to all nodes.
Definition IBase.h:53
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumeration
Interface for enumeration properties.
Definition IEnumeration.h:58
bool IsWritable(EAccessMode AccessMode)
Tests if writable.
Definition INode.h:194
bool IsAvailable(EAccessMode AccessMode)
Tests if available.
Definition INode.h:230
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IFloat
Interface for float properties.
Definition IFloat.h:58
GENICAM_INTERFACE IInteger
Interface for integer properties.
Definition IFloat.h:118
bool IsReadable(EAccessMode AccessMode)
Tests if readable.
Definition INode.h:176