Txtkey.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: Hartmut Nebelung
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_TXTKEY_H
32 #define GENAPI_TXTKEY_H
33 
34 #include "../IString.h"
35 #include "IEEE1212Parser.h"
36 #include "Node.h"
37 #include "BaseT.h"
38 #include "ValueT.h"
39 #include "StringT.h"
40 #include "NodeT.h"
41 #include "NodeMap.h"
42 
43 namespace GENAPI_NAMESPACE
44 {
45  //*************************************************************
46  // CTxtKey class
47  //*************************************************************
48 
56  class CTxtKeyImpl : public IString, public CNodeImpl
57  {
58  public:
60  CTxtKeyImpl();
61 
62 
63  protected:
64  //-------------------------------------------------------------
65  // IValue implementation
66  //-------------------------------------------------------------
68  #pragma BullseyeCoverage off
69  virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring& ValueStr, bool /*Verify*/)
70  {
71  //assert(false);
72  throw LOGICAL_ERROR_EXCEPTION_NODE("NodeImpl %s can't set value from string : %s. Use derived class!", m_Name.c_str(), ValueStr.c_str() );
73  }
74  #pragma BullseyeCoverage on
75 
77  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
78 
79  virtual EAccessMode InternalGetAccessMode() const;
80 
83  {
84  return intfIString;
85  }
86 
87 
88  public:
89  //-------------------------------------------------------------
90  // Implementation of INodePrivate
91  //-------------------------------------------------------------
93  // \{
94  virtual void SetProperty(CProperty &Property);
95  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
96  virtual void FinalConstruct();
97  // \}
98 
99  //-------------------------------------------------------------
100  // IString implementation
101  //-------------------------------------------------------------
102  protected:
104  virtual void InternalSetValue(const GENICAM_NAMESPACE::gcstring& Value, bool /*Verify = true*/){
105  // assert(false);
106  throw ACCESS_EXCEPTION_NODE("TxtKey : %s SetValue to %s failed. TxtKey is read only", m_Name.c_str(),Value.c_str() );
107  }
108 
110  virtual GENICAM_NAMESPACE::gcstring InternalGetValue(bool Verify = false, bool IgnoreCache = false);
111 
114  {
115  // assert(false);
116  throw ACCESS_EXCEPTION_NODE("TxtKey : %s GetMaxLength failed. TxtKey is read only" );
117  }
118 
119  protected:
120  // inititialize when childs are initialized
121  //-------------------------------------------------------------
122  // Memeber variables
123  //-------------------------------------------------------------
124 
125 
127  uint16_t m_Key;
128 
131 
134  };
135 
136  class CTxtKey : public BaseT< ValueT< NodeT< StringT< CTxtKeyImpl > > > >
137  {
138  };
139 
140 }
141 
142 #endif // GENAPI_TXTKEY_H
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: Txtkey.h:82
Definition of the ValueT class template.
GENICAM_NAMESPACE::gcstring m_Name
The name of the node.
Definition: Node.h:370
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
virtual int64_t InternalGetMaxLength(bool)
Retrieves the maximum length of the string in bytes.
Definition: Txtkey.h:113
Definition of the NodeT class template.
__int64 int64_t
Definition: config-win32.h:21
virtual void InternalSetValue(const GENICAM_NAMESPACE::gcstring &Value, bool)
Set node value.
Definition: Txtkey.h:104
Implementation of the IBase interface.
Definition: BaseT.h:48
Definition of the NodeT class template.
virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring &ValueStr, bool)
Set content of the node as string.
Definition: Txtkey.h:69
IString implementation for IEEE1212 string entries.
Definition: Txtkey.h:56
IString interface.
Definition: Types.h:197
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENICAM_NAMESPACE::gcstring m_Value
most recent Value
Definition: Txtkey.h:130
virtual GENICAM_NAMESPACE::gcstring InternalGetValue(bool Verify=false, bool IgnoreCache=false)
Get node value.
#define ACCESS_EXCEPTION_NODE
Fires a access error exception, e.g. throw ACCESS_ERROR_EXCEPTION("Not everybody") ...
Definition: Exception.h:172
#define LOGICAL_ERROR_EXCEPTION_NODE
Fires a logical error exception, e.g. throw LOGICAL_ERROR_EXCEPTION("Should never reach this point") ...
Definition: Exception.h:169
virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify=false, bool IgnoreCache=false)
Get value of the node as string.
Definition of the BaseT class template.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:86
Definition of CIEEE1212Parser.
A string class which is a clone of std::string.
Definition: GCString.h:52
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IString
Interface for string properties.
Definition: IString.h:61
virtual void SetProperty(CProperty &Property)
Declaration of CNodeMap.
uint16_t m_Key
Key of IEEE1212 Configuration Rom entry.
Definition: Txtkey.h:127
virtual const char * c_str(void) const
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
CIEEE1212Parser * m_pParser
The config rom reader.
Definition: Txtkey.h:133


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