All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PolyReference.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2008 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Fritz Dierks
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_POLYREFERENCE_H
32 #define GENAPI_POLYREFERENCE_H
33 
34 #include "Base/GCBase.h"
35 #include "GenApi/IBase.h"
36 #include "GenApi/IValue.h"
37 #include "GenApi/IFloat.h"
38 #include "GenApi/IInteger.h"
39 #include "GenApi/IEnumeration.h"
40 #include "GenApi/IBoolean.h"
41 #include "GenApi/IString.h"
43 #include "GenApi/Pointer.h"
44 #include <limits>
45 
46 #undef min
47 #undef max
48 
49 namespace GENAPI_NAMESPACE
50 {
51  inline int64_t round(double x)
52  {
53  return (int64_t)(x > 0.0 ? x + 0.5 : x - 0.5);
54  }
55 
56  //inline int64_t abs(int64_t x)
57  //{
58  // return (x >= 0 ? x : -x);
59  //}
60 
61  inline double abs(double x)
62  {
63  return (x >= 0.0 ? x : -x);
64  }
65 
69  {
70  public:
74  {
75  m_Value.Value = 0;
76  }
77 
80  {
81  m_Type = typeValue;
82  m_Value.Value = Value;
83  return *this;
84  }
85 
88  {
89  operator=( dynamic_cast<IBase*>(pValue) );
90  return *this;
91  }
92 
95  {
96  m_Value.pInteger = dynamic_cast<IInteger*>(pValue);
97  if (m_Value.pInteger)
99  else
100  {
101  m_Value.pEnumeration = dynamic_cast<IEnumeration*>(pValue);
102  if (m_Value.pEnumeration)
104  else
105  {
106  m_Value.pBoolean = dynamic_cast<IBoolean*>(pValue);
107  if (m_Value.pBoolean)
109  else
110  {
111  m_Value.pFloat = dynamic_cast<IFloat*>(pValue);
112  if (m_Value.pFloat)
113  m_Type = typeIFloat;
114  else
115  throw RUNTIME_EXCEPTION("CIntegerPolyRef::operator(IBase*) : pointer is neither IInteger*, nor IEnumeration*, nor IBoolean*, nor IFloat*");
116  }
117  }
118  }
119  return *this;
120  }
121 
123  inline bool IsPointer() const
124  {
125  return (m_Type != typeValue) && (m_Type != typeUninitialized);
126  }
127 
129  inline bool IsValue() const
130  {
131  return (m_Type == typeValue) && (m_Type != typeUninitialized);
132  }
133 
135  inline bool IsInitialized() const
136  {
137  return (m_Type != typeUninitialized);
138  }
139 
141  inline INodePrivate *GetPointer() const
142  {
143  switch(m_Type)
144  {
145  case typeIInteger:
146  return dynamic_cast<INodePrivate*>(m_Value.pInteger);
147  case typeIEnumeration:
148  return dynamic_cast<INodePrivate*>(m_Value.pEnumeration);
149  case typeIBoolean:
150  return dynamic_cast<INodePrivate*>(m_Value.pBoolean);
151  case typeIFloat:
152  return dynamic_cast<INodePrivate*>(m_Value.pFloat);
153  case typeValue:
154  return NULL;
155 # pragma BullseyeCoverage off
156  case typeUninitialized:
157  default:
158  return NULL;
159 # pragma BullseyeCoverage on
160  }
161  }
162 
164  inline operator INode*(void) const
165  {
166  return GetPointer();
167  }
168 
170  inline int64_t GetValue( bool Verify = false, bool IgnoreCache = false) const
171  {
172  switch(m_Type)
173  {
174  case typeValue:
175  return m_Value.Value;
176  case typeIInteger:
177  return m_Value.pInteger->GetValue(Verify, IgnoreCache);
178  case typeIEnumeration:
179  {
180  CEnumEntryPtr ptrEnumEntry = m_Value.pEnumeration->GetCurrentEntry(Verify, IgnoreCache);
181  return round(ptrEnumEntry->GetNumericValue());
182  }
183  case typeIBoolean:
184  return m_Value.pBoolean->GetValue(Verify, IgnoreCache) ? 1 : 0;
185  case typeIFloat:
186  {
187  double Result = m_Value.pFloat->GetValue(Verify, IgnoreCache);
188  if (Result > (int64_t)GC_INT64_MAX || Result < (int64_t)GC_INT64_MIN)
189  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetValue(): Float value %f out of integer range", Result);
190  return round(Result);
191  }
192  case typeUninitialized:
193 #pragma BullseyeCoverage off
194  default:
195  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetValue(): uninitialized pointer");
196 #pragma BullseyeCoverage on
197  }
198  }
199 
201  inline void SetValue( int64_t Value, bool Verify = true)
202  {
203  switch(m_Type)
204  {
205  case typeValue:
206  m_Value.Value = Value;
207  break;
208  case typeIInteger:
209  m_Value.pInteger->SetValue(Value, Verify);
210  break;
211  case typeIEnumeration:
212  {
213  CEnumEntryPtr ptrOldEnumEntry;
214  double OldDistance = -1;
215  NodeList_t EnumEntries;
216  m_Value.pEnumeration->GetEntries(EnumEntries);
217  for( NodeList_t::iterator it=EnumEntries.begin(); it!=EnumEntries.end(); ++it )
218  {
219  if( IsAvailable(*it) )
220  {
221  if( !ptrOldEnumEntry.IsValid() )
222  {
223  ptrOldEnumEntry = *it;
224  OldDistance = abs( (double)Value - ptrOldEnumEntry->GetNumericValue() );
225  }
226  else
227  {
228  CEnumEntryPtr ptrNewEnumEntry( *it );
229  double NewDistance = abs( (double)Value - ptrNewEnumEntry->GetNumericValue() ) ;
230  if(NewDistance < OldDistance)
231  {
232  ptrOldEnumEntry = *it;
233  OldDistance = NewDistance;
234  }
235  }
236  }
237  }
238  if( ptrOldEnumEntry.IsValid() )
239  m_Value.pEnumeration->SetIntValue(ptrOldEnumEntry->GetValue(), Verify);
240  else
241  throw ACCESS_EXCEPTION("Failed to write enumeration. None of the entries is writable");
242  }
243  break;
244  case typeIBoolean:
245  return m_Value.pBoolean->SetValue( (Value != 0), Verify);
246  break;
247  case typeIFloat:
248  return m_Value.pFloat->SetValue( (double)Value, Verify);
249  break;
250  case typeUninitialized:
251 #pragma BullseyeCoverage off
252  default:
253  throw RUNTIME_EXCEPTION("CIntegerPolyRef::SetValue(): uninitialized pointer");
254 #pragma BullseyeCoverage on
255  }
256  }
257 
259  inline int64_t GetMin() const
260  {
261  switch(m_Type)
262  {
263  case typeIInteger:
264  return m_Value.pInteger->GetMin();
265  case typeIEnumeration:
266  case typeIBoolean:
267  case typeValue:
268  return GC_INT64_MIN;
269  case typeIFloat:
270  {
271  double Min = m_Value.pFloat->GetMin();
272  if(Min > (int64_t)GC_INT64_MAX || Min < (int64_t)GC_INT64_MIN)
273  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetMin(): Float value %f out of integer range", Min);
274  return round(Min);
275  }
276  case typeUninitialized:
277 #pragma BullseyeCoverage off
278  default:
279  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetMin(): uninitialized pointer");
280 #pragma BullseyeCoverage on
281  }
282  }
283 
285  inline int64_t GetMax() const
286  {
287  switch(m_Type)
288  {
289  case typeIInteger:
290  return m_Value.pInteger->GetMax();
291  case typeIEnumeration:
292  case typeIBoolean:
293  case typeValue:
294  return GC_INT64_MAX;
295  case typeIFloat:
296  {
297  double Max = m_Value.pFloat->GetMax();
298  if(Max > (int64_t)GC_INT64_MAX || Max < (int64_t)GC_INT64_MIN)
299  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetMin(): Float value %f out of integer range", Max);
300  return round(Max);
301  }
302  case typeUninitialized:
303 #pragma BullseyeCoverage off
304  default:
305  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetMax(): uninitialized pointer");
306 #pragma BullseyeCoverage on
307  }
308  }
309 
311  inline int64_t GetInc() const
312  {
313  switch(m_Type)
314  {
315  case typeIInteger:
316  return m_Value.pInteger->GetInc();
317  case typeIEnumeration:
318  case typeIBoolean:
319  case typeValue:
320  return 1;
321  case typeIFloat:
322  if( m_Value.pFloat->HasInc() )
323  return round(m_Value.pFloat->GetInc());
324  else
325  return 1;
326  case typeUninitialized:
327 #pragma BullseyeCoverage off
328  default:
329  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetInc(): uninitialized pointer");
330 #pragma BullseyeCoverage on
331  }
332  }
333 
336  {
337  switch(m_Type)
338  {
339  case typeIInteger:
340  return m_Value.pInteger->GetRepresentation();
341  case typeValue:
342  case typeIEnumeration:
343  case typeIBoolean:
344  case typeIFloat:
345  return PureNumber;
346  case typeUninitialized:
347 #pragma BullseyeCoverage off
348  default:
349  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetRepresentation(): uninitialized pointer");
350 #pragma BullseyeCoverage on
351  }
352  }
353 
356  {
357  switch(m_Type)
358  {
359  case typeIInteger:
360  return m_Value.pInteger->GetUnit();
361  case typeIFloat:
362  return m_Value.pFloat->GetUnit();
363  case typeValue:
364  case typeIEnumeration:
365  case typeIBoolean:
367  case typeUninitialized:
368 #pragma BullseyeCoverage off
369  default:
370  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetUnit(): uninitialized pointer");
371  }
372 #pragma BullseyeCoverage on
373  }
374 
376  bool IsValueCacheValid() const
377  {
378  switch(m_Type)
379  {
380  case typeIInteger:
381  return m_Value.pInteger->IsValueCacheValid();
382  case typeIEnumeration:
383  return m_Value.pEnumeration->IsValueCacheValid();
384  case typeIBoolean:
385  return m_Value.pBoolean->IsValueCacheValid();
386  case typeIFloat:
387  return m_Value.pFloat->IsValueCacheValid();
388  case typeValue:
389  return true;
390  case typeUninitialized:
391 # pragma BullseyeCoverage off
392  default:
393  throw RUNTIME_EXCEPTION("CIntegerPolyRef::IsValueCacheValid(): uninitialized pointer");
394  }
395 # pragma BullseyeCoverage on
396  }
397 
399  {
400  switch(m_Type)
401  {
402  case typeIInteger:
403  return m_Value.pInteger->GetNode()->GetCachingMode();
404  case typeIEnumeration:
405  return m_Value.pEnumeration->GetNode()->GetCachingMode();
406  case typeIBoolean:
407  return m_Value.pBoolean->GetNode()->GetCachingMode();
408  case typeIFloat:
409  return m_Value.pFloat->GetNode()->GetCachingMode();
410  case typeValue:
411  return WriteThrough;
412  case typeUninitialized:
413  #pragma BullseyeCoverage off
414  default:
415  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetCachingMode(): uninitialized pointer");
416  #pragma BullseyeCoverage on
417  }
418  }
419 
420  protected:
422  typedef enum _EType
423  {
430  } EType;
431 
434 
436  union
437  {
443  } m_Value;
444  };
445 
446 
450  {
451  public:
455  {
456  m_Value.Value = false;
457  }
458 
459  #pragma BullseyeCoverage off
461  {
462  CNodePtr ptrNode = GetPointer();
463  if( ptrNode.IsValid() )
464  return ptrNode->GetName();
465  else
466  return GENICAM_NAMESPACE::gcstring(".Value.");
467  }
468  #pragma BullseyeCoverage on
469 
472  {
473  m_Type = typeValue;
474  m_Value.Value = Value;
475  return *this;
476  }
477 
480  {
481  m_Value.pInteger = dynamic_cast<IInteger*>(pValue);
482  if (m_Value.pInteger)
484  else
485  {
486  m_Value.pEnumeration = dynamic_cast<IEnumeration*>(pValue);
487  if (m_Value.pEnumeration)
489  else
490  {
491  m_Value.pBoolean = dynamic_cast<IBoolean*>(pValue);
492  if (m_Value.pBoolean)
494  else
495  throw RUNTIME_EXCEPTION("CIntegerPolyRef::operator(IBase*) : pointer is neither IInteger*, IEnumeration*, nor IBoolean*");
496  }
497  }
498  return *this;
499  }
500 
502  inline bool IsPointer() const
503  {
504  return (m_Type != typeValue) && (m_Type != typeUninitialized);
505  }
506 
508  inline bool IsInitialized() const
509  {
510  return (m_Type != typeUninitialized);
511  }
512 
514  inline INodePrivate *GetPointer() const
515  {
516  switch(m_Type)
517  {
518  case typeIInteger:
519  return dynamic_cast<INodePrivate*>(m_Value.pInteger);
520  case typeIEnumeration:
521  return dynamic_cast<INodePrivate*>(m_Value.pEnumeration);
522  case typeIBoolean:
523  return dynamic_cast<INodePrivate*>(m_Value.pBoolean);
524  case typeValue:
525  return NULL;
526 #pragma BullseyeCoverage off
527  case typeUninitialized:
528  default:
529  assert(false);
530  return NULL;
531 #pragma BullseyeCoverage on
532  }
533  }
534 
536  inline operator INode*(void) const
537  {
538  return GetPointer();
539  }
540 
542  inline bool GetValue( bool Verify = false, bool IgnoreCache = false) const
543  {
544  switch(m_Type)
545  {
546  case typeValue:
547  return m_Value.Value;
548  case typeIInteger:
549  return m_Value.pInteger->GetValue(Verify, IgnoreCache) != 0;
550  case typeIEnumeration:
551  return m_Value.pEnumeration->GetIntValue(Verify, IgnoreCache) != 0;
552  case typeIBoolean:
553  return m_Value.pBoolean->GetValue(Verify, IgnoreCache);
554  case typeUninitialized:
555 #pragma BullseyeCoverage off
556  default:
557  throw RUNTIME_EXCEPTION("CIntegerPolyRef::GetValue(): uninitialized pointer");
558 #pragma BullseyeCoverage on
559  }
560  }
561 
563  inline void SetValue( bool Value, bool Verify = true)
564  {
565  switch(m_Type)
566  {
567  case typeValue:
568  m_Value.Value = Value;
569  break;
570  case typeIInteger:
571  m_Value.pInteger->SetValue(Value ? 1 : 0, Verify);
572  break;
573  case typeIEnumeration:
574  return m_Value.pEnumeration->SetIntValue(Value, Verify);
575  break;
576  case typeIBoolean:
577  return m_Value.pBoolean->SetValue(Value, Verify);
578  break;
579  case typeUninitialized:
580 #pragma BullseyeCoverage off
581  default:
582  throw RUNTIME_EXCEPTION("CIntegerPolyRef::SetValue(): uninitialized pointer");
583 #pragma BullseyeCoverage on
584  }
585  }
586 
588  {
589  switch(m_Type)
590  {
591  case typeIInteger:
592  return m_Value.pInteger->GetNode()->GetCachingMode();
593  case typeIEnumeration:
594  return m_Value.pEnumeration->GetNode()->GetCachingMode();
595  case typeIBoolean:
596  return m_Value.pBoolean->GetNode()->GetCachingMode();
597  case typeValue:
598  return WriteThrough;
599  case typeUninitialized:
600  #pragma BullseyeCoverage off
601  default:
602  throw RUNTIME_EXCEPTION("CBooleanPolyRef::GetCachingMode(): uninitialized pointer");
603  #pragma BullseyeCoverage on
604  }
605  }
606  protected:
608  typedef enum _EType
609  {
615  } EType;
616 
619 
621  union
622  {
623  bool Value;
627  } m_Value;
628 
629  };
630 
634  {
635  public:
639  {
640  m_Value.Value = 0.0;
641  }
642 
645  {
646  m_Type = typeValue;
647  m_Value.Value = Value;
648  return *this;
649  }
650 
653  {
654  operator=(dynamic_cast<IBase*>(pValue));
655  return *this;
656  }
657 
660  {
661  m_Value.pFloat = dynamic_cast<IFloat*>(pValue);
662  if (m_Value.pFloat)
663  m_Type = typeIFloat;
664  else
665  {
666  m_Value.pEnumeration = dynamic_cast<IEnumeration*>(pValue);
667  if (m_Value.pEnumeration)
669  else
670  {
671  m_Value.pInteger= dynamic_cast<IInteger*>(pValue);
672  if (m_Value.pInteger)
674  else
675  throw RUNTIME_EXCEPTION("CFloatPolyRef::operator(IBase*) : pointer is neither IFloat*, IInteger*, nor IEnumeration*");
676  }
677  }
678  return *this;
679  }
680 
682  inline bool IsValue() const
683  {
684  return (m_Type == typeValue) && (m_Type != typeUninitialized);
685  }
686 
688  inline bool IsPointer() const
689  {
690  return (m_Type != typeValue) && (m_Type != typeUninitialized);
691  }
692 
694  inline bool IsInitialized() const
695  {
696  return (m_Type != typeUninitialized);
697  }
698 
700  inline INodePrivate *GetPointer() const
701  {
702  switch(m_Type)
703  {
704  case typeIFloat:
705  return dynamic_cast<INodePrivate*>(m_Value.pFloat);
706  case typeIInteger:
707  return dynamic_cast<INodePrivate*>(m_Value.pInteger);
708  case typeIEnumeration:
709  return dynamic_cast<INodePrivate*>(m_Value.pEnumeration);
710  case typeValue:
711  return NULL;
712  #pragma BullseyeCoverage off
713  case typeUninitialized:
714  default:
715  assert(false);
716  return NULL;
717  #pragma BullseyeCoverage on
718  }
719  }
720 
722  inline operator INode*(void) const
723  {
724  return GetPointer();
725  }
726 
728  inline double GetValue(bool Verify = false, bool IgnoreCache = false) const
729  {
730  switch(m_Type)
731  {
732  case typeValue:
733  return m_Value.Value;
734  case typeIFloat:
735  return m_Value.pFloat->GetValue(Verify, IgnoreCache);
736  case typeIInteger:
737  return (double)m_Value.pInteger->GetValue(Verify, IgnoreCache);
738  case typeIEnumeration:
739  {
740  CEnumEntryPtr ptrEnumEntry = m_Value.pEnumeration->GetCurrentEntry(Verify, IgnoreCache);
741  return ptrEnumEntry->GetNumericValue();
742  }
743  case typeUninitialized:
744  #pragma BullseyeCoverage off
745  default:
746  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetValue(): uninitialized pointer");
747  #pragma BullseyeCoverage on
748  }
749  }
750 
752  inline void SetValue(double Value, bool Verify = true)
753  {
754  switch(m_Type)
755  {
756  case typeValue:
757  m_Value.Value = Value;
758  break;
759  case typeIFloat:
760  m_Value.pFloat->SetValue(Value, Verify);
761  break;
762  case typeIInteger:
763  {
765  throw OUT_OF_RANGE_EXCEPTION("CIntegerPolyRef::SetValue(): double value outside int64 range");
766 
767  int64_t TargetValue = round(Value);
768  int64_t Residuum = (TargetValue - m_Value.pInteger->GetMin()) % m_Value.pInteger->GetInc();
769  TargetValue -= Residuum;
770  if( 2 * Residuum > m_Value.pInteger->GetInc())
771  TargetValue += m_Value.pInteger->GetInc();
772  m_Value.pInteger->SetValue(TargetValue, Verify);
773  }
774  break;
775  case typeIEnumeration:
776  {
777  CEnumEntryPtr ptrOldEnumEntry;
778  double OldDistance = -1;
779  NodeList_t EnumEntries;
780  m_Value.pEnumeration->GetEntries(EnumEntries);
781  for( NodeList_t::iterator it=EnumEntries.begin(); it!=EnumEntries.end(); ++it )
782  {
783  if (IsAvailable(*it))
784  {
785  if (!ptrOldEnumEntry.IsValid())
786  {
787  ptrOldEnumEntry = *it;
788  OldDistance = abs( Value - ptrOldEnumEntry->GetNumericValue() );
789  }
790  else
791  {
792  CEnumEntryPtr ptrNewEnumEntry( *it );
793  double NewDistance = abs( Value - ptrNewEnumEntry->GetNumericValue() ) ;
794  if (NewDistance < OldDistance)
795  {
796  ptrOldEnumEntry = *it;
797  OldDistance = NewDistance;
798  }
799  }
800  }
801  }
802  if (ptrOldEnumEntry.IsValid())
803  m_Value.pEnumeration->SetIntValue(ptrOldEnumEntry->GetValue(), Verify);
804  else
805  throw ACCESS_EXCEPTION("Failed to write enumeration. None of the entries is writable");
806  }
807  break;
808  case typeUninitialized:
809  #pragma BullseyeCoverage off
810  default:
811  throw RUNTIME_EXCEPTION("CIntegerPolyRef::SetValue(): uninitialized pointer");
812  #pragma BullseyeCoverage on
813  }
814  }
815 
817  inline double GetMin() const
818  {
819  switch(m_Type)
820  {
821  case typeIFloat:
822  return m_Value.pFloat->GetMin();
823  case typeIInteger:
824  return (double) m_Value.pInteger->GetMin();
825  case typeIEnumeration:
826  case typeValue:
827  return -std::numeric_limits<double>::max();
828  case typeUninitialized:
829  #pragma BullseyeCoverage off
830  default:
831  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetMin(): uninitialized pointer");
832  #pragma BullseyeCoverage on
833  }
834  }
835 
837  inline double GetMax() const
838  {
839  switch(m_Type)
840  {
841  case typeIFloat:
842  return m_Value.pFloat->GetMax();
843  case typeIInteger:
844  return (double) m_Value.pInteger->GetMax();
845  case typeIEnumeration:
846  case typeValue:
847  return std::numeric_limits<double>::max();
848  case typeUninitialized:
849  #pragma BullseyeCoverage off
850  default:
851  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetMax(): uninitialized pointer");
852  #pragma BullseyeCoverage on
853  }
854  }
855 
857  inline bool HasInc()
858  {
859  switch(m_Type)
860  {
861  case typeIFloat:
862  return m_Value.pFloat->HasInc();
863  case typeIInteger:
864  return true;
865  case typeIEnumeration:
866  case typeValue:
867  case typeUninitialized:
868  #pragma BullseyeCoverage off
869  default:
870  return false;
871  #pragma BullseyeCoverage on
872  }
873  }
874 
876  virtual double GetInc()
877  {
878  switch(m_Type)
879  {
880  case typeIFloat:
881  return m_Value.pFloat->GetInc();
882  case typeIInteger:
883  return (double) m_Value.pInteger->GetInc();
884  case typeIEnumeration:
885  case typeValue:
886  case typeUninitialized:
887  #pragma BullseyeCoverage off
888  default:
889  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetInc(): uninitialized pointer");
890  #pragma BullseyeCoverage on
891  }
892  }
893 
895  #pragma BullseyeCoverage off
896  inline double GetInc() const
897  {
898  switch(m_Type)
899  {
900  case typeIInteger:
901  return (double) m_Value.pInteger->GetInc();
902  case typeIFloat:
903  case typeIEnumeration:
904  case typeValue:
905  return 1.0;
906  case typeUninitialized:
907  #pragma BullseyeCoverage off
908  default:
909  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetMax(): uninitialized pointer");
910  #pragma BullseyeCoverage on
911  }
912  }
913  #pragma BullseyeCoverage on
914 
917  {
918  switch(m_Type)
919  {
920  case typeIFloat:
921  return m_Value.pFloat->GetRepresentation();
922  case typeIInteger:
923  return m_Value.pInteger->GetRepresentation();
924  case typeValue:
925  case typeIEnumeration:
926  return PureNumber;
927  case typeUninitialized:
928  #pragma BullseyeCoverage off
929  default:
930  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetRepresentation(): uninitialized pointer");
931  #pragma BullseyeCoverage on
932  }
933  }
934 
937  {
938  switch(m_Type)
939  {
940  case typeIFloat:
941  return m_Value.pFloat->GetUnit();
942  case typeIInteger:
943  return m_Value.pInteger->GetUnit();
944  case typeValue:
945  case typeIEnumeration:
947  case typeUninitialized:
948  #pragma BullseyeCoverage off
949  default:
950  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetUnit(): uninitialized pointer");
951  #pragma BullseyeCoverage on
952  }
953  }
954 
955 // this is currently not needed but may be in future so we keep the code
956 #if 0
957  bool IsValueCacheValid() const
959  {
960  switch(m_Type)
961  {
962  case typeIFloat:
963  return m_Value.pFloat->IsValueCacheValid();
964  case typeIInteger:
965  return m_Value.pInteger->IsValueCacheValid();
966  case typeIEnumeration:
967  return m_Value.pEnumeration->IsValueCacheValid();
968  case typeValue:
969  return true;
970  case typeUninitialized:
971  #pragma BullseyeCoverage off
972  default:
973  throw RUNTIME_EXCEPTION("CFloatPolyRef::IsValueCacheValid(): uninitialized pointer");
974  #pragma BullseyeCoverage on
975  }
976  }
977 #endif
978 
981  {
982  switch(m_Type)
983  {
984  case typeIFloat:
985  return m_Value.pFloat->GetDisplayNotation();
986  case typeIInteger:
987  case typeIEnumeration:
988  case typeValue:
989  return fnAutomatic;
990  case typeUninitialized:
991  #pragma BullseyeCoverage off
992  default:
993  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetDisplayNotation(): uninitialized pointer");
994  #pragma BullseyeCoverage on
995  }
996  }
997 
1000  {
1001  switch(m_Type)
1002  {
1003  case typeIFloat:
1004  return m_Value.pFloat->GetDisplayPrecision();
1005  case typeIInteger:
1006  case typeIEnumeration:
1007  case typeValue:
1008  return -1;
1009  case typeUninitialized:
1010  #pragma BullseyeCoverage off
1011  default:
1012  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetDisplayPrecision(): uninitialized pointer");
1013  #pragma BullseyeCoverage on
1014  }
1015  }
1016 
1018  typedef enum _EType
1019  {
1025  } EType;
1026 
1028  {
1029  switch(m_Type)
1030  {
1031  case typeIInteger:
1032  return m_Value.pInteger->GetNode()->GetCachingMode();
1033  case typeIEnumeration:
1034  return m_Value.pEnumeration->GetNode()->GetCachingMode();
1035  case typeIFloat:
1036  return m_Value.pFloat->GetNode()->GetCachingMode();
1037  case typeValue:
1038  return WriteThrough;
1039  case typeUninitialized:
1040  #pragma BullseyeCoverage off
1041  default:
1042  throw RUNTIME_EXCEPTION("CFloatPolyRef::GetCachingMode(): uninitialized pointer");
1043  #pragma BullseyeCoverage on
1044  }
1045  }
1046  protected:
1049 
1051  union
1052  {
1053  double Value;
1057  } m_Value;
1058 
1059  };
1060 
1061 
1065  {
1066  public:
1070  {
1071  m_Value.pString = NULL;
1072  }
1073 
1074  #pragma BullseyeCoverage off
1076  {
1077  CNodePtr ptrNode = GetPointer();
1078  if( ptrNode.IsValid() )
1079  return ptrNode->GetName();
1080  else
1081  return GENICAM_NAMESPACE::gcstring(".Value.");
1082  }
1083  #pragma BullseyeCoverage on
1084 
1087  {
1088  m_Type = typeValue;
1089  m_Value.Value = Value;
1090  return *this;
1091  }
1092 
1095  {
1096  m_Value.pString = dynamic_cast<IString*>(pValue);
1097  if( !m_Value.pString )
1098  throw RUNTIME_EXCEPTION("CStringPolyRef::operator(IBase*) : pointer is not IString*");
1099  m_Type = typeIString;
1100  return *this;
1101  }
1102 
1104  inline bool IsValue() const
1105  {
1106  return (m_Type == typeValue);
1107  }
1108 
1109 
1111  inline bool IsPointer() const
1112  {
1113  return (m_Type != typeValue) && (m_Type != typeUninitialized);
1114  }
1115 
1117  inline bool IsInitialized() const
1118  {
1119  return (m_Type != typeUninitialized);
1120  }
1121 
1123  inline INodePrivate *GetPointer() const
1124  {
1125  switch(m_Type)
1126  {
1127  case typeIString:
1128  return dynamic_cast<INodePrivate*>(m_Value.pString);
1129  case typeValue:
1130  return NULL;
1131 # pragma BullseyeCoverage off
1132  case typeUninitialized:
1133  default:
1134  assert(false);
1135  return NULL;
1136 # pragma BullseyeCoverage on
1137  }
1138  }
1139 
1141  inline operator INode*(void) const
1142  {
1143  return GetPointer();
1144  }
1145 
1147  inline GENICAM_NAMESPACE::gcstring GetValue( bool Verify = false, bool IgnoreCache = false) const
1148  {
1149  switch(m_Type)
1150  {
1151  case typeValue:
1152  return m_Value.Value;
1153  case typeIString:
1154  return m_Value.pString->GetValue(Verify, IgnoreCache);
1155  case typeUninitialized:
1156 #pragma BullseyeCoverage off
1157  default:
1158  throw RUNTIME_EXCEPTION("CStringPolyRef::GetValue(): uninitialized pointer");
1159 #pragma BullseyeCoverage on
1160  }
1161  }
1162 
1164  inline void SetValue( const GENICAM_NAMESPACE::gcstring& Value, bool Verify = true)
1165  {
1166  switch(m_Type)
1167  {
1168  case typeValue:
1169  m_Value.Value = Value;
1170  break;
1171  case typeIString:
1172  m_Value.pString->SetValue(Value, Verify);
1173  break;
1174  case typeUninitialized:
1175 #pragma BullseyeCoverage off
1176  default:
1177  throw RUNTIME_EXCEPTION("CStringPolyRef::SetValue(): uninitialized pointer");
1178 #pragma BullseyeCoverage on
1179  }
1180  }
1181 
1183  inline int64_t GetMaxLength( bool Verify = false )
1184  {
1185  switch(m_Type)
1186  {
1187  case typeValue:
1188  return m_Value.Value.max_size();
1189  break;
1190  case typeIString:
1191  return m_Value.pString->GetMaxLength(Verify);
1192  break;
1193  case typeUninitialized:
1194 #pragma BullseyeCoverage off
1195  default:
1196  throw RUNTIME_EXCEPTION("CStringPolyRef::GetMaxLength(): uninitialized pointer");
1197 #pragma BullseyeCoverage on
1198  }
1199  }
1200 
1201 
1203  bool IsValueCacheValid() const
1204  {
1205  switch(m_Type)
1206  {
1207  case typeIString:
1208  return m_Value.pString->IsValueCacheValid();
1209  case typeValue:
1210  return true;
1211  case typeUninitialized:
1212 # pragma BullseyeCoverage off
1213  default:
1214  throw RUNTIME_EXCEPTION("CStringPolyRef::IsValueCacheValid(): uninitialized pointer");
1215  }
1216 # pragma BullseyeCoverage on
1217  }
1218 
1219 
1220  protected:
1222  typedef enum _EType
1223  {
1227  } EType;
1228 
1231 
1233  struct
1234  {
1237  } m_Value;
1238  };
1239 
1241  {
1242  public:
1244  {
1245  };
1247  {
1248  pIndex = _pIndex;
1249  Offset = _Offset;
1250  };
1251 
1252  CIntegerOffsetPolyRef(INode *_pIndex, INode *_pOffset)
1253  {
1254  pIndex = _pIndex;
1255  Offset = _pOffset;
1256  };
1257 
1259  {
1260  pIndex = Copy.pIndex;
1261  Offset = Copy.Offset;
1262  };
1263 
1266  };
1267 
1268 
1269 }
1270 
1271 #endif // ifndef GENAPI_POLYREFERENCE_H
GENAPI_NAMESPACE::CIntegerPolyRef::GetMax
int64_t GetMax() const
see IInteger interface
Definition: PolyReference.h:285
GENAPI_NAMESPACE::IInteger
GENICAM_INTERFACE IInteger
Interface for integer properties.
Definition: IFloat.h:114
GENAPI_NAMESPACE
Lexical analyzer for CIntSwissKnife.
Definition: Destructible.h:30
Pointer.h
Definition of template CPointer.
GENAPI_NAMESPACE::abs
double abs(double x)
Definition: PolyReference.h:61
IFloat.h
Definition of the IFloat interface.
GENAPI_NAMESPACE::CBooleanPolyRef::operator=
CBooleanPolyRef & operator=(IBase *pValue)
set pointer
Definition: PolyReference.h:479
GENAPI_NAMESPACE::CStringPolyRef::operator=
CStringPolyRef & operator=(const GENICAM_NAMESPACE::gcstring &Value)
set string value
Definition: PolyReference.h:1086
GENAPI_NAMESPACE::CBooleanPolyRef::typeIInteger
@ typeIInteger
Definition: PolyReference.h:612
GENAPI_NAMESPACE::CFloatPolyRef::GetDisplayNotation
EDisplayNotation GetDisplayNotation() const
see IFloat
Definition: PolyReference.h:980
GENAPI_NAMESPACE::CBooleanPolyRef::operator=
CBooleanPolyRef & operator=(bool Value)
set integer value
Definition: PolyReference.h:471
GENAPI_NAMESPACE::CStringPolyRef::IsInitialized
bool IsInitialized() const
True if the object is initilaized.
Definition: PolyReference.h:1117
GENAPI_NAMESPACE::CIntegerPolyRef::typeIBoolean
@ typeIBoolean
Definition: PolyReference.h:428
GENAPI_NAMESPACE::CFloatPolyRef::operator=
CFloatPolyRef & operator=(INode *pValue)
set pointer
Definition: PolyReference.h:652
GENAPI_NAMESPACE::CBooleanPolyRef::Value
bool Value
Definition: PolyReference.h:623
GENAPI_NAMESPACE::CStringPolyRef::pString
IString * pString
fixed value
Definition: PolyReference.h:1236
GENAPI_NAMESPACE::CFloatPolyRef::pEnumeration
IEnumeration * pEnumeration
Integer node
Definition: PolyReference.h:1056
GENAPI_NAMESPACE::fnAutomatic
@ fnAutomatic
the notation if either scientific or fixed depending on what is shorter
Definition: Types.h:180
GENAPI_NAMESPACE::CFloatPolyRef::IsValue
bool IsValue() const
True if the object references a pointer.
Definition: PolyReference.h:682
GENAPI_NAMESPACE::PureNumber
@ PureNumber
Decimal number in an edit control.
Definition: Types.h:93
GENAPI_NAMESPACE::CFloatPolyRef::pFloat
IFloat * pFloat
fixed value
Definition: PolyReference.h:1054
GENAPI_NAMESPACE::CFloatPolyRef::typeUninitialized
@ typeUninitialized
Definition: PolyReference.h:1020
GENAPI_NAMESPACE::CStringPolyRef::CStringPolyRef
CStringPolyRef()
Constructor.
Definition: PolyReference.h:1068
GENAPI_NAMESPACE::CBooleanPolyRef::SetValue
void SetValue(bool Value, bool Verify=true)
see IBoolean interface
Definition: PolyReference.h:563
GC_INT64_MIN
#define GC_INT64_MIN
Definition: GCTypes.h:162
GENAPI_NAMESPACE::CFloatPolyRef::HasInc
bool HasInc()
True if the float has a constant increment.
Definition: PolyReference.h:857
IBase.h
Definition of interface IBase.
GENAPI_NAMESPACE::CFloatPolyRef::EType
enum GENAPI_NAMESPACE::CFloatPolyRef::_EType EType
possible types of the internally held pointer
GENAPI_NAMESPACE::WriteThrough
@ WriteThrough
Write to cache and register.
Definition: Types.h:81
GENAPI_NAMESPACE::EDisplayNotation
enum GENAPI_NAMESPACE::_EDisplayNotation EDisplayNotation
typedef for float notation
GENAPI_NAMESPACE::IBoolean
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IBoolean
Interface for Boolean properties.
Definition: IBoolean.h:61
GENAPI_NAMESPACE::CFloatPolyRef
A reference to a float which can be either a double variable, or a pointer to an IFloat,...
Definition: PolyReference.h:633
GENAPI_NAMESPACE::CIntegerOffsetPolyRef
Definition: PolyReference.h:1240
IEnumeration.h
Definition of interface IEnumeration.
GENAPI_NAMESPACE::CFloatPolyRef::IsInitialized
bool IsInitialized() const
True if the object is initialized.
Definition: PolyReference.h:694
GENAPI_NAMESPACE::CIntegerPolyRef::m_Type
EType m_Type
the type of the internally held pointer
Definition: PolyReference.h:433
GENICAM_NAMESPACE::gcstring
A string class which is a clone of std::string.
Definition: GCString.h:52
GENAPI_NAMESPACE::CStringPolyRef::typeUninitialized
@ typeUninitialized
Definition: PolyReference.h:1224
GENAPI_NAMESPACE::CFloatPolyRef::CFloatPolyRef
CFloatPolyRef()
Constructor.
Definition: PolyReference.h:637
GENAPI_NAMESPACE::CStringPolyRef::EType
enum GENAPI_NAMESPACE::CStringPolyRef::_EType EType
possible types of the internally held pointer
GENAPI_NAMESPACE::CFloatPolyRef::typeValue
@ typeValue
Definition: PolyReference.h:1021
GENAPI_NAMESPACE::CIntegerPolyRef::GetMin
int64_t GetMin() const
see IInteger interface
Definition: PolyReference.h:259
GENAPI_NAMESPACE::CIntegerOffsetPolyRef::CIntegerOffsetPolyRef
CIntegerOffsetPolyRef(const CIntegerOffsetPolyRef &Copy)
Definition: PolyReference.h:1258
GENAPI_NAMESPACE::CBooleanPolyRef::pInteger
IInteger * pInteger
fixed value
Definition: PolyReference.h:624
GENAPI_NAMESPACE::CBooleanPolyRef::IsInitialized
bool IsInitialized() const
True if the object is initilaized.
Definition: PolyReference.h:508
GENAPI_NAMESPACE::CBooleanPolyRef::m_Value
union GENAPI_NAMESPACE::CBooleanPolyRef::@3 m_Value
the place to store the value or the pointers to the nodes to get the value from
GENAPI_NAMESPACE::CFloatPolyRef::_EType
_EType
possible types of the internally held pointer
Definition: PolyReference.h:1018
GENAPI_NAMESPACE::CIntegerPolyRef
A reference to an int64 which can bei either an int64 variable, or a pointer to an IInteger,...
Definition: PolyReference.h:68
GENAPI_NAMESPACE::CStringPolyRef::IsValue
bool IsValue() const
True if the object references a pointer.
Definition: PolyReference.h:1104
GENAPI_NAMESPACE::CIntegerPolyRef::pInteger
IInteger * pInteger
fixed value
Definition: PolyReference.h:439
OUT_OF_RANGE_EXCEPTION
#define OUT_OF_RANGE_EXCEPTION
Fires an out of range exception, e.g. throw OUT_OF_RANGE_EXCEPTION("%ld too large",...
Definition: GCException.h:241
GENAPI_NAMESPACE::CBooleanPolyRef::typeIEnumeration
@ typeIEnumeration
Definition: PolyReference.h:613
GENAPI_NAMESPACE::CStringPolyRef::Value
GENICAM_NAMESPACE::gcstring Value
Definition: PolyReference.h:1235
GENAPI_NAMESPACE::CIntegerPolyRef::operator=
CIntegerPolyRef & operator=(IBase *pValue)
set pointer
Definition: PolyReference.h:94
GENAPI_NAMESPACE::CFloatPolyRef::GetDisplayPrecision
int64_t GetDisplayPrecision() const
see IFloat
Definition: PolyReference.h:999
GENAPI_NAMESPACE::CStringPolyRef::typeValue
@ typeValue
Definition: PolyReference.h:1225
GENAPI_NAMESPACE::CBooleanPolyRef::IsPointer
bool IsPointer() const
True if the object references a pointer.
Definition: PolyReference.h:502
GENAPI_NAMESPACE::CFloatPolyRef::pInteger
IInteger * pInteger
Float node
Definition: PolyReference.h:1055
GENAPI_NAMESPACE::CBooleanPolyRef::GetValue
bool GetValue(bool Verify=false, bool IgnoreCache=false) const
see IBoolean interface
Definition: PolyReference.h:542
GENAPI_NAMESPACE::CStringPolyRef::typeIString
@ typeIString
Definition: PolyReference.h:1226
GENAPI_NAMESPACE::CFloatPolyRef::m_Value
union GENAPI_NAMESPACE::CFloatPolyRef::@4 m_Value
the place to store the value or the pointers to the nodes to get the value from
GENAPI_NAMESPACE::ERepresentation
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
GENAPI_NAMESPACE::Verify
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
GENAPI_NAMESPACE::CBooleanPolyRef::CBooleanPolyRef
CBooleanPolyRef()
Constructor.
Definition: PolyReference.h:453
GENAPI_NAMESPACE::CIntegerPolyRef::GetCachingMode
ECachingMode GetCachingMode() const
Definition: PolyReference.h:398
GENAPI_NAMESPACE::CStringPolyRef::operator=
CStringPolyRef & operator=(IBase *pValue)
set pointer
Definition: PolyReference.h:1094
GENAPI_NAMESPACE::CFloatPolyRef::GetUnit
GENICAM_NAMESPACE::gcstring GetUnit() const
see IFloat interface
Definition: PolyReference.h:936
GENAPI_NAMESPACE::CFloatPolyRef::typeIInteger
@ typeIInteger
Definition: PolyReference.h:1023
GENAPI_NAMESPACE::round
int64_t round(double x)
Definition: PolyReference.h:51
GENAPI_NAMESPACE::CFloatPolyRef::GetMin
double GetMin() const
see IFloat interface
Definition: PolyReference.h:817
GENAPI_NAMESPACE::CStringPolyRef::IsPointer
bool IsPointer() const
True if the object references a pointer.
Definition: PolyReference.h:1111
GENAPI_NAMESPACE::CIntegerOffsetPolyRef::CIntegerOffsetPolyRef
CIntegerOffsetPolyRef(INode *_pIndex, int64_t _Offset)
Definition: PolyReference.h:1246
GENAPI_NAMESPACE::CFloatPolyRef::Value
double Value
Definition: PolyReference.h:1053
GENAPI_NAMESPACE::CFloatPolyRef::GetMax
double GetMax() const
see IFloat interface
Definition: PolyReference.h:837
GENAPI_NAMESPACE::CStringPolyRef::m_Type
EType m_Type
the type of the internally held pointer
Definition: PolyReference.h:1230
GENAPI_NAMESPACE::CIntegerPolyRef::_EType
_EType
possible types of the internally held pointer
Definition: PolyReference.h:422
GENAPI_NAMESPACE::CIntegerPolyRef::pFloat
IFloat * pFloat
Boolean node
Definition: PolyReference.h:442
GC_INT64_MAX
#define GC_INT64_MAX
Definition: GCTypes.h:154
GENAPI_NAMESPACE::CIntegerPolyRef::m_Value
union GENAPI_NAMESPACE::CIntegerPolyRef::@2 m_Value
the place to store the value or the pointers to the nodes to get the value from
GENAPI_NAMESPACE::CBooleanPolyRef::typeValue
@ typeValue
Definition: PolyReference.h:611
GENAPI_NAMESPACE::IsAvailable
bool IsAvailable(EAccessMode AccessMode)
Tests if available.
Definition: INode.h:232
GENAPI_NAMESPACE::CStringPolyRef::GetName
GENICAM_NAMESPACE::gcstring GetName() const
Definition: PolyReference.h:1075
GENAPI_NAMESPACE::CFloatPolyRef::operator=
CFloatPolyRef & operator=(IBase *pValue)
set pointer
Definition: PolyReference.h:659
GENAPI_NAMESPACE::CIntegerPolyRef::typeIInteger
@ typeIInteger
Definition: PolyReference.h:426
GENAPI_NAMESPACE::CStringPolyRef::IsValueCacheValid
bool IsValueCacheValid() const
see IValue interface
Definition: PolyReference.h:1203
GENAPI_NAMESPACE::CIntegerOffsetPolyRef::CIntegerOffsetPolyRef
CIntegerOffsetPolyRef(INode *_pIndex, INode *_pOffset)
Definition: PolyReference.h:1252
GENAPI_NAMESPACE::CStringPolyRef::_EType
_EType
possible types of the internally held pointer
Definition: PolyReference.h:1222
GENAPI_NAMESPACE::CFloatPolyRef::GetInc
virtual double GetInc()
Get the constant increment if there is any.
Definition: PolyReference.h:876
IInteger.h
Definition of the interface IInteger.
GENAPI_NAMESPACE::CIntegerPolyRef::typeUninitialized
@ typeUninitialized
Definition: PolyReference.h:424
GENAPI_NAMESPACE::CIntegerOffsetPolyRef::Offset
CIntegerPolyRef Offset
Definition: PolyReference.h:1265
GENAPI_NAMESPACE::IEnumeration
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumeration
Interface for enumeration properties.
Definition: IEnumeration.h:60
GENAPI_NAMESPACE::CBooleanPolyRef::GetName
GENICAM_NAMESPACE::gcstring GetName() const
Definition: PolyReference.h:460
GENAPI_NAMESPACE::CIntegerPolyRef::GetInc
int64_t GetInc() const
see IInteger interface
Definition: PolyReference.h:311
GENAPI_NAMESPACE::CFloatPolyRef::typeIEnumeration
@ typeIEnumeration
Definition: PolyReference.h:1024
GENAPI_NAMESPACE::CFloatPolyRef::GetInc
double GetInc() const
extension required for swiss knifes
Definition: PolyReference.h:896
GENAPI_NAMESPACE::CIntegerPolyRef::pEnumeration
IEnumeration * pEnumeration
Integer node
Definition: PolyReference.h:440
GENAPI_NAMESPACE::CIntegerPolyRef::IsInitialized
bool IsInitialized() const
True if the object is initialized.
Definition: PolyReference.h:135
INodePrivate.h
Definition of interface INodePrivate.
GENAPI_NAMESPACE::CIntegerPolyRef::pBoolean
IBoolean * pBoolean
Enumeration node
Definition: PolyReference.h:441
GENAPI_NAMESPACE::CStringPolyRef::m_Value
struct GENAPI_NAMESPACE::CStringPolyRef::@5 m_Value
the place to store the value or the pointers to the nodes to get the value from
GENAPI_NAMESPACE::IFloat
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IFloat
Interface for float properties.
Definition: IFloat.h:60
GENAPI_NAMESPACE::INode
GENICAM_INTERFACE INode
Interface common to all nodes.
Definition: ICategory.h:51
GENAPI_NAMESPACE::CFloatPolyRef::SetValue
void SetValue(double Value, bool Verify=true)
see IFloat interface
Definition: PolyReference.h:752
GCBase.h
Common GenICam base include file.
GENAPI_NAMESPACE::CStringPolyRef::GetPointer
INodePrivate * GetPointer() const
returns the pointer referenced
Definition: PolyReference.h:1123
GENAPI_NAMESPACE::CFloatPolyRef::GetValue
double GetValue(bool Verify=false, bool IgnoreCache=false) const
see IFloat interface
Definition: PolyReference.h:728
GENAPI_NAMESPACE::CIntegerPolyRef::IsValueCacheValid
bool IsValueCacheValid() const
see IValue interface
Definition: PolyReference.h:376
GENAPI_NAMESPACE::CStringPolyRef::GetValue
GENICAM_NAMESPACE::gcstring GetValue(bool Verify=false, bool IgnoreCache=false) const
see IString interface
Definition: PolyReference.h:1147
GENAPI_NAMESPACE::CIntegerPolyRef::operator=
CIntegerPolyRef & operator=(int64_t Value)
set integer value
Definition: PolyReference.h:79
GENAPI_NAMESPACE::CPointer
Encapsulates a GenApi pointer dealing with the dynamic_cast automatically.
Definition: Pointer.h:51
IString.h
Definition of interface IString.
GENAPI_NAMESPACE::CStringPolyRef::SetValue
void SetValue(const GENICAM_NAMESPACE::gcstring &Value, bool Verify=true)
see IString interface
Definition: PolyReference.h:1164
GENAPI_NAMESPACE::CFloatPolyRef::GetRepresentation
ERepresentation GetRepresentation() const
see IFloat interface
Definition: PolyReference.h:916
GENAPI_NAMESPACE::CIntegerPolyRef::typeIFloat
@ typeIFloat
Definition: PolyReference.h:429
GENAPI_NAMESPACE::INodePrivate
GENICAM_INTERFACE INodePrivate
Interface including the methods for node construction common to all nodes.
Definition: INodePrivate.h:54
GENAPI_NAMESPACE::CFloatPolyRef::GetCachingMode
ECachingMode GetCachingMode() const
Definition: PolyReference.h:1027
GENAPI_NAMESPACE::CIntegerPolyRef::operator=
CIntegerPolyRef & operator=(INode *pValue)
set pointer
Definition: PolyReference.h:87
GENAPI_NAMESPACE::CIntegerPolyRef::GetPointer
INodePrivate * GetPointer() const
returns the pointer referenced
Definition: PolyReference.h:141
GENAPI_NAMESPACE::IString
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IString
Interface for string properties.
Definition: IString.h:61
GENAPI_NAMESPACE::CIntegerPolyRef::typeValue
@ typeValue
Definition: PolyReference.h:425
GENAPI_NAMESPACE::CIntegerPolyRef::IsPointer
bool IsPointer() const
True if the object references a pointer.
Definition: PolyReference.h:123
ACCESS_EXCEPTION
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition: GCException.h:253
int64_t
__int64 int64_t
Definition: config-win32.h:21
GENAPI_NAMESPACE::CIntegerOffsetPolyRef::pIndex
CIntegerPolyRef pIndex
Definition: PolyReference.h:1262
GENAPI_NAMESPACE::CBooleanPolyRef::m_Type
EType m_Type
the type of the internally held pointer
Definition: PolyReference.h:618
GENAPI_NAMESPACE::CIntegerOffsetPolyRef::CIntegerOffsetPolyRef
CIntegerOffsetPolyRef()
Definition: PolyReference.h:1243
GENAPI_NAMESPACE::CBooleanPolyRef::pEnumeration
IEnumeration * pEnumeration
Integer node
Definition: PolyReference.h:625
GENAPI_NAMESPACE::CIntegerPolyRef::GetUnit
GENICAM_NAMESPACE::gcstring GetUnit() const
see IInteger interface
Definition: PolyReference.h:355
GENAPI_NAMESPACE::CIntegerPolyRef::EType
enum GENAPI_NAMESPACE::CIntegerPolyRef::_EType EType
possible types of the internally held pointer
GENAPI_NAMESPACE::ECachingMode
enum GENAPI_NAMESPACE::_ECachingMode ECachingMode
caching mode of a register
GENAPI_NAMESPACE::CFloatPolyRef::m_Type
EType m_Type
the type of the internally held pointer
Definition: PolyReference.h:1048
IValue.h
Definition of the interface IValue.
GENAPI_NAMESPACE::CPointer::IsValid
bool IsValid() const
true if the pointer is valid
Definition: Pointer.h:111
GENAPI_NAMESPACE::CIntegerPolyRef::IsValue
bool IsValue() const
True if the object references a pointer.
Definition: PolyReference.h:129
GENAPI_NAMESPACE::CIntegerPolyRef::Value
int64_t Value
Definition: PolyReference.h:438
RUNTIME_EXCEPTION
#define RUNTIME_EXCEPTION
Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
Definition: GCException.h:247
GENAPI_NAMESPACE::CFloatPolyRef::IsPointer
bool IsPointer() const
True if the object references a pointer.
Definition: PolyReference.h:688
GENAPI_NAMESPACE::CBooleanPolyRef::typeIBoolean
@ typeIBoolean
Definition: PolyReference.h:614
GENAPI_NAMESPACE::IsValueCacheValid
virtual bool IsValueCacheValid() const =0
Checks if the value comes from cache or is requested from another node.
GENAPI_NAMESPACE::CIntegerPolyRef::SetValue
void SetValue(int64_t Value, bool Verify=true)
see IInteger interface
Definition: PolyReference.h:201
GENAPI_NAMESPACE::CFloatPolyRef::typeIFloat
@ typeIFloat
Definition: PolyReference.h:1022
GENAPI_NAMESPACE::CBooleanPolyRef::GetCachingMode
ECachingMode GetCachingMode() const
Definition: PolyReference.h:587
GENAPI_NAMESPACE::CStringPolyRef::GetMaxLength
int64_t GetMaxLength(bool Verify=false)
see IString interface
Definition: PolyReference.h:1183
GENAPI_NAMESPACE::CIntegerPolyRef::CIntegerPolyRef
CIntegerPolyRef()
Constructor.
Definition: PolyReference.h:72
GENAPI_NAMESPACE::CBooleanPolyRef::_EType
_EType
possible types of the internally held pointer
Definition: PolyReference.h:608
GENAPI_NAMESPACE::CIntegerPolyRef::GetRepresentation
ERepresentation GetRepresentation() const
see IInteger interface
Definition: PolyReference.h:335
GENAPI_NAMESPACE::CFloatPolyRef::GetPointer
INodePrivate * GetPointer() const
returns the pointer referenced
Definition: PolyReference.h:700
GENAPI_NAMESPACE::CFloatPolyRef::operator=
CFloatPolyRef & operator=(double Value)
set integer value
Definition: PolyReference.h:644
GENAPI_NAMESPACE::CBooleanPolyRef::typeUninitialized
@ typeUninitialized
Definition: PolyReference.h:610
GENAPI_NAMESPACE::CBooleanPolyRef
A reference to a bool which can bei either an bool variable, or a pointer to an IInteger,...
Definition: PolyReference.h:449
GENAPI_NAMESPACE::CIntegerPolyRef::GetValue
int64_t GetValue(bool Verify=false, bool IgnoreCache=false) const
see IInteger interface
Definition: PolyReference.h:170
GENAPI_NAMESPACE::CBooleanPolyRef::GetPointer
INodePrivate * GetPointer() const
returns the pointer referenced
Definition: PolyReference.h:514
GENAPI_NAMESPACE::CIntegerPolyRef::typeIEnumeration
@ typeIEnumeration
Definition: PolyReference.h:427
IBoolean.h
Definition of IBoolean interface.
GENAPI_NAMESPACE::IBase
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IBase
Base interface common to all nodes.
Definition: IBase.h:55
GENAPI_NAMESPACE::CBooleanPolyRef::pBoolean
IBoolean * pBoolean
Enumeration node
Definition: PolyReference.h:626
GENAPI_NAMESPACE::CStringPolyRef
A reference to a gcstring which can be either a gcstring variable, or a pointer to an IString.
Definition: PolyReference.h:1064
GENAPI_NAMESPACE::CBooleanPolyRef::EType
enum GENAPI_NAMESPACE::CBooleanPolyRef::_EType EType
possible types of the internally held pointer
GENAPI_NAMESPACE::NodeList_t
node_vector NodeList_t
a list of node references
Definition: INode.h:55


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11