31 #ifndef GENAPI_POINTER_H 32 #define GENAPI_POINTER_H 50 template <
class T,
class B = IBase>
63 :
m_pT( dynamic_cast<T*>(pB) )
74 m_pT =
dynamic_cast<T*
>(pB);
79 operator T*(void)
const 117 operator bool(
void)
const throw()
137 if (0 != nMustBeNull)
244 return dynamic_cast<IInteger*
>(
m_pT->GetNode()->GetCastAlias());
270 # pragma warning (push) // icc -W4 complains: controlling expression is constant 271 # pragma warning (disable : 279) 273 assert(pBase &&
"don't call this with a NULL pointer");
275 # pragma warning (pop) 277 CNodePtr ptrNode(pBase);
278 switch(ptrNode->GetPrincipalInterfaceType())
311 template <
class T,
class B>
318 template <
class T,
class B>
325 template <
class T,
class B>
332 template <
class T,
class B>
344 #endif // ifndef GENAPI_POINTER_H GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IBase
Base interface common to all nodes.
CPointer(void)
Default constructor.
CPointer< ISelector > CSelectorPtr
SmartPointer for ISelector interface pointer.
CPointer< IPortReplay > CPortReplayPtr
SmartPointer for IPortReplay interface pointer.
GENICAM_INTERFACE IInteger
Interface for integer properties.
CPointer< IChunkPort > CChunkPortPtr
SmartPointer for IChunkPort interface pointer.
CPointer< IString > CStringPtr
SmartPointer for IString interface pointer.
CPointer< IUserData, INodeMap > CNodeMapUserDataPtr
SmartPointer for IUserData interface pointer.
CFloatPtr()
Default constructor.
CPointer< IValue > CValuePtr
SmartPointer for IValue interface pointer.
CFloatPtr(IBase *pB)
Constructor from IBase pointer type.
CPointer & operator=(B *pB)
Assign INode Pointer.
CPointer< IDeviceInfo, INodeMap > CDeviceInfoPtr
SmartPointer for IDeviceInfo interface pointer.
CPointer< IPortRecorder > CPortRecorderPtr
SmartPointer for IPortRecorder interface pointer.
CPointer< IPort > CPortPtr
SmartPointer for IPort interface pointer.
bool IsReadable(EAccessMode AccessMode)
Tests if readable.
bool IsValid() const
true if the pointer is valid
T * m_pT
Underlying raw pointer.
bool operator==(T *pT) const
pointer equal
GENICAM_NAMESPACE::gcstring GetInterfaceName(IBase *pBase)
Returns the name of the main interface as string DEPRECATED, use IBase::GetPrincipalInterfaceType() i...
T * operator->(void) const
Dereferencing.
Definition of the IFloat interface.
IEnumeration * GetEnumAlias()
gets the interface of an enum alias node.
CPointer< IUserData > CNodeUserDataPtr
SmartPointer for IUserData interface pointer.
bool IsAvailable(EAccessMode AccessMode)
Tests if available.
CPointer< IBoolean > CBooleanPtr
SmartPointer for IBoolean interface pointer.
Encapsulates a GenApi pointer dealing with the dynamic_cast automatically.
CPointer< INode > CNodePtr
SmartPointer for INode interface pointer.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumeration
Interface for enumeration properties.
CPointer< IEnumEntry > CEnumEntryPtr
SmartPointer for IEnumEntry interface pointer.
CPointer< INodeMap, INodeMap > CNodeMapPtr
SmartPointer for INodeMap interface pointer.
#define LOGICAL_ERROR_EXCEPTION
Fires a logical error exception, e.g. throw LOGICAL_ERROR_EXCEPTION("Should never reach this point") ...
bool IsImplemented(EAccessMode AccessMode)
Tests if implemented.
CPointer< IBase > CBasePtr
SmartPointer for IBase interface pointer.
IInteger * GetIntAlias()
gets the interface of an integer alias node.
Forward declarations for GenICam types.
Definition of the interface IInteger.
CPointer< IInteger > CIntegerPtr
SmartPointer for IInteger interface pointer.
T & operator*(void) const
Dereferencing.
A string class which is a clone of std::string.
CPointer< IRegister > CRegisterPtr
SmartPointer for IRegister interface pointer.
CPointer< IPortWriteList, IPortWriteList > CPortWriteListPtr
SmartPointer for IPortWriteList interface pointer.
CPointer< IPortConstruct > CPortConstructPtr
SmartPointer for IPortConstruct interface pointer.
CFloatPtr & operator=(IBase *pB)
Assign IBase Pointer.
bool IsWritable(EAccessMode AccessMode)
Tests if writable.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IFloat
Interface for float properties.
Definition of interface IEnumeration.
T & operator()(void) const
Dereferencing.
bool operator==(int nMustBeNull) const
pointer equal
CPointer< IEnumeration > CEnumerationPtr
SmartPointer for IEnumeration interface pointer.
CPointer< ICommand > CCommandPtr
SmartPointer for ICommand interface pointer.
Lexical analyzer for CIntSwissKnife.
CPointer< ICategory > CCategoryPtr
SmartPointer for ICategory interface pointer.
bool operator==(const CPointer< T, B > &rT) const
pointer equal
SmartPointer for IFloat interface pointer.
CPointer(B *pB)
Constructor from INode pointer type.
CPointer< IPortStackedConstruct > CPortStackedConstructPtr
SmartPointer for IPortStackedConstruct interface pointer.