Go to the documentation of this file.
31 #ifndef GENAPI_INTEGERT_H
32 #define GENAPI_INTEGERT_H
34 #include "../Compatibility.h"
35 #include "../IInteger.h"
38 #include "GenApi/impl/Log.h"
65 std::list<CNodeCallback*> CallbacksToFire;
70 Base::m_ValueCacheValid =
false;
81 CHECK_RANGE_I64_NODE( Value, Base::InternalGetMin(), Base::InternalGetMax(), Base::InternalGetInc() );
86 typename Base::PostSetValueFinalizer PostSetValueCaller(
this, CallbacksToFire);
92 Base::InternalSetValue(Value,
Verify);
94 #if ! defined( DISABLE_VALUE_CACHING ) || (DISABLE_VALUE_CACHING == 0)
99 Base::m_ValueCacheValid =
true;
100 Base::m_DontDeleteThisCache =
true;
107 Base::InternalCheckError();
112 std::list<CNodeCallback*>::iterator ptrCallback;
113 for( ptrCallback = CallbacksToFire.begin(); ptrCallback != CallbacksToFire.end(); ptrCallback++ )
120 std::list<CNodeCallback*>::iterator ptrCallback;
121 for( ptrCallback = CallbacksToFire.begin(); ptrCallback != CallbacksToFire.end(); ptrCallback++ )
138 if (!
String2Value(ValueStr, &Value, Base::InternalGetRepresentation()))
154 #if ! defined( DISABLE_VALUE_CACHING ) || (DISABLE_VALUE_CACHING == 0)
156 if ( !IgnoreCache && Base::m_ValueCacheValid && !
Verify)
165 const int64_t Value( Base::InternalGetValue(
Verify, IgnoreCache ) );
169 CHECK_RANGE_I64_NODE( Value, Base::InternalGetMin(), Base::InternalGetMax(), Base::InternalGetInc() );
170 Base::InternalCheckError();
173 #if ! defined( DISABLE_VALUE_CACHING ) || (DISABLE_VALUE_CACHING == 0)
181 Base::m_ValueCacheValid =
true;
207 Value2String(Value, ValueStr, Base::InternalGetRepresentation() );
216 typename Base::EntryMethodFinalizer(
this,
meGetMin );
224 int64_t Minimum = Base::InternalGetMin();
237 typename Base::EntryMethodFinalizer(
this,
meGetMax );
245 int64_t Maximum = Base::InternalGetMax();
256 typename Base::EntryMethodFinalizer(
this,
meGetIncMode );
260 if( ! Base::m_ListOfValidValuesCacheValid )
263 Base::m_ListOfValidValuesCacheValid =
true;
276 typename Base::EntryMethodFinalizer(
this,
meGetInc );
284 const int64_t Increment(Base::InternalGetInc());
295 GCLOGINFOPUSH( Base::m_pRangeLog,
"GetListOfValidValues...");
297 if( ! Base::m_ListOfValidValuesCacheValid )
300 Base::m_ListOfValidValuesCacheValid =
true;
305 GCLOGINFOPOP( Base::m_pRangeLog,
"...GetListOfValidValues");
317 return Base::InternalGetRepresentation();
324 return Base::InternalGetUnit();
GENICAM_INTERFACE IInteger
Interface for integer properties.
Lexical analyzer for CIntSwissKnife.
@ cbPostOutsideLock
callback is fired on leaving the tree inside the lock-guarded area
virtual EIncMode GetIncMode()
Implementation of IInteger::GetIncMode.
virtual ECachingMode GetCachingMode() const =0
Get Caching Mode.
virtual GENICAM_NAMESPACE::gcstring GetUnit()
Implementation of IInteger::GetUnit()
@ WriteThrough
Write to cache and register.
#define CHECK_RANGE_I64_NODE(_Value, _Min, _Max, _Inc)
Range check for int64.
virtual int64_autovector_t GetListOfValidValues(bool bounded=true)
Implementation of IInteger::GetListOfValidValues.
A string class which is a clone of std::string.
const _autovector_impl duplicate(T min, T max)
void Value2String(T Value, GENICAM_NAMESPACE::gcstring &ValueStr)
Converts an T property to a string.
virtual IInteger & operator=(int64_t Value)
Implementation of IInteger::operator=()
virtual ERepresentation GetRepresentation()
Implementation of IInteger::GetRepresentation.
virtual CLock & GetLock() const =0
Returns the lock which guards the node map.
#define INVALID_ARGUMENT_EXCEPTION_NODE
Fires an invalid argument exception, e.g. throw INVALID_ARGUMENT("%ld too large", Value);.
enum GENAPI_NAMESPACE::_EIncMode EIncMode
typedef for increment mode
virtual bool EntryIsStremable()=0
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
#define GCLOGINFOPOP(cat,...)
virtual int64_t operator*()
Implementation of IInteger::operator*()
GENICAM_NAMESPACE::gcstring InternalToString(bool Verify=false, bool IgnoreCache=false)
bool IsAvailable(EAccessMode AccessMode)
Tests if available.
virtual int64_t GetValue(bool Verify=false, bool IgnoreCache=false)
Implementation of IInteger::GetValue()
virtual void SetValue(int64_t Value, bool Verify=true)
Implementation of IInteger::SetValue.
virtual bool CanBeWritten(bool Verify)=0
#define ACCESS_EXCEPTION_NODE
Fires a access error exception, e.g. throw ACCESS_ERROR_EXCEPTION("Not everybody")
bool IsReadable(EAccessMode AccessMode)
Tests if readable.
int64_t m_ValueCache
The cache for the integer value.
virtual void ImposeMax(int64_t Value)
Restrict maximum value.
GENICAM_INTERFACE INode
Interface common to all nodes.
int64_autovector_impl m_CurentValidValueSet
The cached list of valie value for the integer.
bool String2Value(const GENICAM_NAMESPACE::gcstring &ValueStr, T *Value)
Converts a string to an T property.
int64_t m_ImposedMin
a Value imposed to the minimum
virtual bool IsStreamable() const =0
True if the node is streamable.
virtual const char * c_str(void) const
This file contains the internal implementation of the autovector.
virtual int64_t GetMin()
Implementation of IInteger::GetMin()
enum GENAPI_NAMESPACE::_ECachingMode ECachingMode
caching mode of a register
virtual void ImposeMin(int64_t Value)
Restrict minimum value.
@ simAll
Invalidate the node and all of its dependents.
#define GCLOGINFO(cat,...)
void InternalFromString(const GENICAM_NAMESPACE::gcstring &ValueStr, bool Verify=true)
@ WriteAround
Write to register, write to cache on read.
Vector of integers with reference counting.
int64_t m_ImposedMax
a Value imposed to the maximum
virtual int64_t operator()()
Implementation of IInteger::operator()()
#define GCLOGINFOPUSH(cat,...)
virtual void SetInvalid(ESetInvalidMode simMode)=0
Invalidate the node resp. the node and all of its dependents.
Implementation of the IInteger Interface.
virtual int64_t GetInc()
Implementation of IInteger::GetInc()
virtual int64_t GetMax()
Implementation of IInteger::GetMax()
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11