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 
42 namespace GENAPI_NAMESPACE
43 {
44 
45  //*************************************************************
46  // CEnumeration class
47  //*************************************************************
48 
49  class CEnumerationImpl : public CNodeImpl, public IEnumeration
50  {
51  public:
54 
55  //-------------------------------------------------------------
57 
59  virtual bool Poll( int64_t ElapsedTime );
60 
61  protected:
63  virtual void InternalGetSymbolics(StringList_t& Symbolics);
64 
66  virtual void InternalGetEntries(NodeList_t & Entries);
67 
68  virtual EAccessMode InternalGetAccessMode() const;
69 
72 
74  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
75 
77  virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring& ValueStr, bool Verify = true);
78 
80  virtual void InternalSetIntValue(int64_t Value, bool Verify = true);
81 
83  virtual int64_t InternalGetIntValue(bool Verify = false, bool IgnoreCache = false );
84 
87 
89  virtual IEnumEntry *InternalGetEntry(const int64_t IntValue);
90 
92  virtual bool InternalIsValueCacheValid() const;
93 
95  virtual EYesNo InternalIsAccessModeCacheable() const;
96 
97  public:
98 
99  virtual void FinalConstruct();
100 
101  virtual void SetProperty( CProperty &Property );
102  virtual bool GetProperty( CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList ) const;
103 
104  protected:
105  //-------------------------------------------------------------
106  // Member variables
107  //-------------------------------------------------------------
108 
110  typedef enum _EStatus
111  {
115  } EStatus;
116 
118  EStatus m_Status;
119 
121  typedef std::map<GENICAM_NAMESPACE::gcstring, IEnumEntry*> EnumEntrySymbolicMap_t;
122 
124  EnumEntrySymbolicMap_t m_EnumEntrySymbolicMap;
125 
127  typedef std::map<int64_t, IEnumEntry*> EnumEntryIntValueMap_t;
128 
130  EnumEntryIntValueMap_t m_EnumEntryIntValueMap;
131 
134 
137 
140 
141  private:
142  void InternalSetIntValue( IEnumEntry* pEnumEntry, int64_t Value, bool Verify );
143  };
144 
145  class CEnumeration : public BaseT< ValueT< EnumerationT < NodeT < CEnumerationImpl> > > >
146  {
147  };
148 
149 }
150 
151 #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.
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.
interface GENAPI_DECL_ABSTRACT IEnumeration
Interface for enumeration properties.
Definition: IEnumeration.h:60
EnumEntrySymbolicMap_t m_EnumEntrySymbolicMap
the map holding the enum entries referenced by their symbolic name
Definition: Enumeration.h:124
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Implementation of the IBase interface.
Definition: BaseT.h:48
interface GENAPI_DECL_ABSTRACT IEnumEntry
Interface of single enum value.
Definition: IEnumEntry.h:60
EStatus m_Status
the internal status of the command node
Definition: Enumeration.h:118
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:121
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:110
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:127
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
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:130
Definition of the BaseT class template.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:85
CIntegerPolyRef m_Value
Reference to the value.
Definition: Enumeration.h:136
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:133
int64_t m_SelfClearingValue
Value which will be self cleared by the device.
Definition: Enumeration.h:139
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
virtual void InternalSetIntValue(int64_t Value, bool Verify=true)
Sets the integer value.
virtual void InternalGetSymbolics(StringList_t &Symbolics)
Get the enumeration map.
Part of the generic device API.
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 Thu Jun 6 2019 19:10:54