IEnumeration.h 3.7 KB

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