EventAdapter.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 Declaration of the CEventAdapter class.
  28. \ingroup GenApi_PublicUtilities
  29. */
  30. #ifndef GENAPI_EVENTADAPTER_H
  31. #define GENAPI_EVENTADAPTER_H
  32. #include <GenApi/Types.h>
  33. #include <GenApi/INodeMap.h>
  34. #include <GenApi/EventPort.h>
  35. #include <vector>
  36. namespace GENAPI_NAMESPACE
  37. {
  38. /**
  39. \brief Delivers Events to ports
  40. \ingroup GenApi_PublicUtilities
  41. */
  42. class GENAPI_DECL CEventAdapter
  43. {
  44. public:
  45. //! Constructor
  46. CEventAdapter(INodeMap* pNodeMap = NULL);
  47. //! Destructor
  48. virtual ~CEventAdapter();
  49. //! Attaches to a node map and retrieves the chunk ports
  50. virtual void AttachNodeMap(INodeMap* pNodeMap);
  51. //! Detaches from the node emap
  52. virtual void DetachNodeMap();
  53. //! Deliver message
  54. virtual void DeliverMessage( const uint8_t msg[], uint32_t numBytes ) = 0;
  55. protected:
  56. //! An array of attached ChunkPorts
  57. /*! Note that this must be a pointer otherwise we'll get into DLL hell (see warning C4251) */
  58. std::vector<CEventPort*> *m_ppEventPorts;
  59. };
  60. }
  61. #endif // GENAPI_EVENTADAPTER_H