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 
42 namespace GENAPI_NAMESPACE
43 {
44  //*************************************************************
45  // CTxtKey class
46  //*************************************************************
47 
55  class CTxtKeyImpl : public IString, public CNodeImpl
56  {
57  public:
59  CTxtKeyImpl();
60 
61 
62  protected:
63  //-------------------------------------------------------------
64  // IValue implementation
65  //-------------------------------------------------------------
67  #pragma BullseyeCoverage off
68  virtual void InternalFromString(const GENICAM_NAMESPACE::gcstring& ValueStr, bool /*Verify*/)
69  {
70  //assert(false);
71  throw LOGICAL_ERROR_EXCEPTION_NODE("NodeImpl %s can't set value from string : %s. Use derived class!", m_Name.c_str(), ValueStr.c_str() );
72  }
73  #pragma BullseyeCoverage on
74 
76  virtual GENICAM_NAMESPACE::gcstring InternalToString(bool Verify = false, bool IgnoreCache = false);
77 
78  virtual EAccessMode InternalGetAccessMode() const;
79 
82  {
83  return intfIString;
84  }
85 
86 
87  public:
88  //-------------------------------------------------------------
89  // Implementation of INodePrivate
90  //-------------------------------------------------------------
92  // \{
93  virtual void SetProperty(CProperty &Property);
94  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
95  virtual void FinalConstruct();
96  // \}
97 
98  //-------------------------------------------------------------
99  // IString implementation
100  //-------------------------------------------------------------
101  protected:
103  virtual void InternalSetValue(const GENICAM_NAMESPACE::gcstring& Value, bool /*Verify = true*/){
104  // assert(false);
105  throw ACCESS_EXCEPTION_NODE("TxtKey : %s SetValue to %s failed. TxtKey is read only", m_Name.c_str(),Value.c_str() );
106  }
107 
109  virtual GENICAM_NAMESPACE::gcstring InternalGetValue(bool Verify = false, bool IgnoreCache = false);
110 
113  {
114  // assert(false);
115  throw ACCESS_EXCEPTION_NODE("TxtKey : %s GetMaxLength failed. TxtKey is read only" );
116  }
117 
118  protected:
119  // inititialize when childs are initialized
120  //-------------------------------------------------------------
121  // Memeber variables
122  //-------------------------------------------------------------
123 
124 
126  uint16_t m_Key;
127 
130 
133  };
134 
135  class CTxtKey : public BaseT< ValueT< NodeT< StringT< CTxtKeyImpl > > > >
136  {
137  };
138 
139 }
140 
141 #endif // GENAPI_TXTKEY_H
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: Txtkey.h:81
Definition of the ValueT class template.
GENICAM_NAMESPACE::gcstring m_Name
The name of the node.
Definition: Node.h:369
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
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:103
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:68
IString implementation for IEEE1212 string entries.
Definition: Txtkey.h:55
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:129
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
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
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:85
virtual int64_t InternalGetMaxLength()
Retrieves the maximum length of the string in bytes.
Definition: Txtkey.h:112
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
interface GENAPI_DECL_ABSTRACT IString
Interface for string properties.
Definition: IString.h:61
virtual void SetProperty(CProperty &Property)
uint16_t m_Key
Key of IEEE1212 Configuration Rom entry.
Definition: Txtkey.h:126
virtual const char * c_str(void) const
Part of the generic device API.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type
CIEEE1212Parser * m_pParser
The config rom reader.
Definition: Txtkey.h:132


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:54