Enumeration.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Margret Albrecht
6 // $Header$
7 //
8 // License: This file is published under the license of the EMVA GenICam Standard Group.
9 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10 // If for some reason you are missing this file please contact the EMVA or visit the website
11 // (http://www.genicam.org) for a full copy.
12 //
13 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
14 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
17 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 // POSSIBILITY OF SUCH DAMAGE.
24 //-----------------------------------------------------------------------------
31 #ifndef GENAPI_ENUMERATION_H
32 #define GENAPI_ENUMERATION_H
33 
34 #include "Base/GCStringVector.h"
35 #include "Node.h"
36 #include "../Pointer.h"
37 #include "BaseT.h"
38 #include "ValueT.h"
39 #include "EnumerationT.h"
40 #include "PolyReference.h"
41 #include "NodeMap.h"
42 
43 
44 namespace GENAPI_NAMESPACE
45 {
46 
47  //*************************************************************
48  // CEnumeration class
49  //*************************************************************
50 
51  class CEnumerationImpl : public IEnumeration, public CNodeImpl
52  {
53  public:
56 
57  //-------------------------------------------------------------
59 
61  virtual bool Poll( int64_t ElapsedTime );
62 
63  protected:
65  virtual void InternalGetSymbolics(StringList_t& Symbolics);
66 
68  virtual void InternalGetEntries(NodeList_t & Entries);
69 
70  virtual EAccessMode InternalGetAccessMode() const;
71 
74 
76  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
77 
79  virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring& ValueStr, bool Verify = true);
80 
82  virtual void InternalSetIntValue(int64_t Value, bool Verify = true);
83 
85  virtual int64_t InternalGetIntValue(bool Verify = false, bool IgnoreCache = false );
86 
89 
91  virtual IEnumEntry *InternalGetEntry(const int64_t IntValue);
92 
94  virtual bool InternalIsValueCacheValid() const;
95 
97  virtual EYesNo InternalIsAccessModeCacheable() const;
98 
99  public:
100 
101  virtual void FinalConstruct();
102 
103  virtual void SetProperty( CProperty &Property );
104  virtual bool GetProperty( CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList ) const;
105 
106  protected:
107  //-------------------------------------------------------------
108  // Member variables
109  //-------------------------------------------------------------
110 
112  typedef enum _EStatus
113  {
117  } EStatus;
118 
120  EStatus m_Status;
121 
123  typedef std::map<GENICAM_NAMESPACE::gcstring, IEnumEntry*> EnumEntrySymbolicMap_t;
124 
126  EnumEntrySymbolicMap_t m_EnumEntrySymbolicMap;
127 
129  typedef std::map<int64_t, IEnumEntry*> EnumEntryIntValueMap_t;
130 
132  EnumEntryIntValueMap_t m_EnumEntryIntValueMap;
133 
136 
139 
142 
143  private:
144  void InternalSetIntValue( IEnumEntry* pEnumEntry, int64_t Value, bool Verify );
145  };
146 
147  class CEnumeration : public BaseT< ValueT< EnumerationT < NodeT < CEnumerationImpl> > > >
148  {
149  };
150 
151 }
152 
153 #endif // ifndef GENAPI_ENUMERATION_H
enum GENAPI_NAMESPACE::CEnumerationImpl::_EStatus EStatus
possible stati of the command node
Definition of the ValueT class template.
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
virtual void InternalGetEntries(NodeList_t &Entries)
Get list of entry nodes.
virtual IEnumEntry * InternalGetEntry(const int64_t IntValue)
Get an entry node by its IntValue.
virtual EYesNo InternalIsAccessModeCacheable() const
True if the AccessMode can be cached.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
virtual void SetProperty(CProperty &Property)
Portable string vector implementation.
__int64 int64_t
Definition: config-win32.h:21
virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring &ValueStr, bool Verify=true)
Sets from symbolic value.
EnumEntrySymbolicMap_t m_EnumEntrySymbolicMap
the map holding the enum entries referenced by their symbolic name
Definition: Enumeration.h:126
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Implementation of the IBase interface.
Definition: BaseT.h:48
EStatus m_Status
the internal status of the command node
Definition: Enumeration.h:120
virtual bool InternalIsValueCacheValid() const
Checks if the value comes from cache or is requested from another node.
node_vector NodeList_t
a list of node references
Definition: INode.h:55
std::map< GENICAM_NAMESPACE::gcstring, IEnumEntry * > EnumEntrySymbolicMap_t
the type of the map holding enum entry pointers referenced by the corresponding symbolic name ...
Definition: Enumeration.h:123
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumeration
Interface for enumeration properties.
Definition: IEnumeration.h:60
enum GENAPI_NAMESPACE::_EYesNo EYesNo
Defines the choices of a Yes/No alternatives.
virtual bool Poll(int64_t ElapsedTime)
Invalidates the node if the polling time has elapsed.
_EStatus
possible stati of the command node
Definition: Enumeration.h:112
virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify=false, bool IgnoreCache=false)
Gets the symbolic value.
virtual int64_t InternalGetIntValue(bool Verify=false, bool IgnoreCache=false)
Gets the integer value.
std::map< int64_t, IEnumEntry * > EnumEntryIntValueMap_t
the type of the map holding enum entry pointers referenced by the corresponding int value ...
Definition: Enumeration.h:129
Definition of polymorphical smart pointer.
virtual IEnumEntry * InternalGetEntryByName(const GENICAM_NAMESPACE::gcstring &Symbolic)
Get an entry node by name.
EnumEntryIntValueMap_t m_EnumEntryIntValueMap
the map holding the enum entries referenced by their int value
Definition: Enumeration.h:132
Definition of the BaseT class template.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:86
CIntegerPolyRef m_Value
Reference to the value.
Definition: Enumeration.h:138
A string class which is a clone of std::string.
Definition: GCString.h:52
NodeList_t m_EnumEntryList
a list holding pointers to the EnumEntries
Definition: Enumeration.h:135
int64_t m_SelfClearingValue
Value which will be self cleared by the device.
Definition: Enumeration.h:141
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
A reference to an int64 which can bei either an int64 variable, or a pointer to an IInteger...
Definition: PolyReference.h:68
Definition of the EnumerationT class template.
GENICAM_NAMESPACE::gcstring_vector StringList_t
A list of strings.
Definition: Types.h:150
Declaration of CNodeMap.
virtual void InternalSetIntValue(int64_t Value, bool Verify=true)
Sets the integer value.
virtual void InternalGetSymbolics(StringList_t &Symbolics)
Get the enumeration map.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumEntry
Interface of single enum value.
Definition: IEnumEntry.h:60
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40