ISelectorDigit.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //-----------------------------------------------------------------------------
  2. // (c) 2010 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. */
  28. #ifndef GENAPI_ISELECTORDIGIT_H
  29. #define GENAPI_ISELECTORDIGIT_H
  30. #include <GenApi/GenApiDll.h>
  31. #include <GenApi/Types.h>
  32. #include <GenApi/Container.h>
  33. namespace GENAPI_NAMESPACE
  34. {
  35. //! Interface of a "digit" of the "counter" formed by the selector set
  36. interface GENAPI_DECL_ABSTRACT ISelectorDigit
  37. {
  38. /*! \brief Sets digit to start value
  39. \return true if the resulting value is valid */
  40. virtual bool SetFirst() = 0;
  41. /*! \brief Sets digit to next value
  42. \param Tick if false the counter does not tick (but realize it could have)
  43. \return true if the resulting value is valid */
  44. virtual bool SetNext(bool Tick = true) = 0;
  45. //! Restores the selectors' values found at creation
  46. virtual void Restore() = 0;
  47. //! Returns a string representation of the digit
  48. virtual GENICAM_NAMESPACE::gcstring ToString() = 0;
  49. //! Retrieves an ordered list of selectors
  50. virtual void GetSelectorList(
  51. GENAPI_NAMESPACE::FeatureList_t &SelectorList, //!> List to contain the selector pointer
  52. bool Incremental = false //!> if true only seletor changed since the last GetNext are contained
  53. ) = 0;
  54. //! Virtual destructor enforcing virtual destructor on all derived classes
  55. virtual ~ISelectorDigit() = 0;
  56. };
  57. // Implementation required for Windows only.
  58. // Note: the C++ standard >= 11 prohibit pure virtual destructors with a function body
  59. // in the declaration. Consequently gcc 4.0 and newer reject an inline implementation
  60. // in the class.
  61. inline ISelectorDigit::~ISelectorDigit()
  62. {
  63. // do nothing
  64. }
  65. }
  66. #endif