SelectorSet.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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_SELECTORSET_H
  29. #define GENAPI_SELECTORSET_H
  30. #include <GenApi/GenApiDll.h>
  31. #include <GenApi/ISelectorDigit.h>
  32. #include <GenApi/IBase.h>
  33. #include <GenApi/Pointer.h>
  34. namespace GENAPI_NAMESPACE
  35. {
  36. //! The set of selectors selecting a given node
  37. class GENAPI_DECL CSelectorSet : public ISelectorDigit
  38. {
  39. public:
  40. //! Constructor
  41. CSelectorSet (
  42. IBase *pBase //!> Feature selected by the selector set
  43. );
  44. //! Destructor
  45. virtual ~CSelectorSet();
  46. //! returns true if no selectors are present
  47. bool IsEmpty();
  48. // Implementation of ISelectorDigit
  49. public:
  50. virtual bool SetFirst();
  51. virtual bool SetNext(bool Tick = true);
  52. virtual void Restore();
  53. virtual GENICAM_NAMESPACE::gcstring ToString();
  54. virtual void GetSelectorList( GENAPI_NAMESPACE::FeatureList_t &SelectorList, bool Incremental = false );
  55. private:
  56. struct SelectorIteratorList_t;
  57. //! List of selector digits
  58. SelectorIteratorList_t *m_pSelectorIterators;
  59. //! recursively explores the selectors and sub selectors of a node
  60. void ExploreSelector(
  61. CNodePtr &ptrNode, //!> The node to explore
  62. NodeList_t &SelectorNodes //!> ordered list of elector names (LSB first, MSB last)
  63. );
  64. //! Creates the selector counter
  65. void Create(
  66. IBase* pBase //!> the node to create the selector set for
  67. );
  68. };
  69. }
  70. #endif