IEnumeration.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. //-----------------------------------------------------------------------------
  2. // (c) 2006 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. //-----------------------------------------------------------------------------
  25. /*!
  26. \file
  27. \brief Definition of interface IEnumeration
  28. \ingroup GenApi_PublicInterface
  29. */
  30. #ifndef GENAPI_IENUMERATION_H
  31. #define GENAPI_IENUMERATION_H
  32. #include <Base/GCStringVector.h>
  33. #include <GenApi/GenApiDll.h>
  34. #include <GenApi/IEnumEntry.h>
  35. #include <GenApi/Types.h>
  36. #include <GenApi/IValue.h>
  37. #ifdef _MSC_VER
  38. # pragma warning ( push )
  39. # pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
  40. #endif
  41. namespace GENAPI_NAMESPACE
  42. {
  43. //*************************************************************
  44. // Enumeration interface
  45. //*************************************************************
  46. /**
  47. \brief Interface for enumeration properties
  48. \ingroup GenApi_PublicInterface
  49. */
  50. interface GENAPI_DECL_ABSTRACT IEnumeration : virtual public IValue
  51. {
  52. //! Get list of symbolic Values
  53. virtual void GetSymbolics(StringList_t & Symbolics) = 0;
  54. //! Get list of entry nodes
  55. virtual void GetEntries(NodeList_t & Entries) = 0;
  56. //! Set string node value
  57. virtual IEnumeration& operator=(const GENICAM_NAMESPACE::gcstring& ValueStr) = 0;
  58. //! Set integer node value
  59. /*!
  60. \param Value The value to set
  61. \param Verify Enables AccessMode and Range verification (default = true)
  62. */
  63. virtual void SetIntValue(int64_t Value, bool Verify = true) = 0;
  64. //! Get string node value
  65. virtual GENICAM_NAMESPACE::gcstring operator*() = 0;
  66. //! Get integer node value
  67. /*!
  68. \param Verify Enables Range verification (default = false). The AccessMode is always checked
  69. \param IgnoreCache If true the value is read ignoring any caches (default = false)
  70. \return The value read
  71. */
  72. virtual int64_t GetIntValue(bool Verify = false, bool IgnoreCache = false) = 0;
  73. //! Get an entry node by name
  74. virtual IEnumEntry *GetEntryByName(const GENICAM_NAMESPACE::gcstring& Symbolic) = 0;
  75. //! Get an entry node by its IntValue
  76. virtual IEnumEntry *GetEntry(const int64_t IntValue) = 0;
  77. //! Get the current entry
  78. virtual IEnumEntry *GetCurrentEntry(bool Verify = false, bool IgnoreCache = false) = 0;
  79. };
  80. }
  81. #ifdef _MSC_VER
  82. # pragma warning ( pop )
  83. #endif
  84. #endif // ifndef GENAPI_IENUMERATION_H