EnumEntry.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. /*=============================================================================
  2. Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
  3. Redistribution of this file, in original or modified form, without
  4. prior written consent of Allied Vision Technologies is prohibited.
  5. -------------------------------------------------------------------------------
  6. File: EnumEntry.h
  7. Description: Definition of class AVT::VmbAPI::EnumEntry.
  8. An EnumEntry consists of
  9. Name
  10. DisplayName
  11. Value
  12. of one particular enumeration
  13. -------------------------------------------------------------------------------
  14. THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
  15. WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
  16. NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  17. DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
  18. INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  21. AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
  22. TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  23. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. =============================================================================*/
  25. #ifndef AVT_VMBAPI_ENUMENTRY_H
  26. #define AVT_VMBAPI_ENUMENTRY_H
  27. #include <string>
  28. #include <VimbaC/Include/VimbaC.h>
  29. #include <VimbaCPP/Include/VimbaCPPCommon.h>
  30. #include <VimbaCPP/Include/SharedPointerDefines.h>
  31. namespace AVT {
  32. namespace VmbAPI {
  33. class EnumEntry
  34. {
  35. public:
  36. //
  37. // Method: EnumEntry constructor
  38. //
  39. // Purpose: Creates an instance of class EnumEntry
  40. //
  41. // Parameters:
  42. //
  43. // [in ] const char* pName The name of the enum
  44. // [in ] const char* pDisplayName The declarative name of the enum
  45. // [in ] const char* pDescription The description of the enum
  46. // [in ] const char* pTooltip A tooltip that can be used by a GUI
  47. // [in ] const char* pSNFCNamespace The SFNC namespace of the enum
  48. // [in ] VmbFeatureVisibility_t visibility The visibility of the enum
  49. // [in ] VmbInt64_t value The integer value of the enum
  50. //
  51. EnumEntry( const char *pName,
  52. const char *pDisplayName,
  53. const char *pDescription,
  54. const char *pTooltip,
  55. const char *pSNFCNamespace,
  56. VmbFeatureVisibility_t visibility,
  57. VmbInt64_t value);
  58. //
  59. // Method: EnumEntry constructor
  60. //
  61. // Purpose: Creates an instance of class EnumEntry
  62. //
  63. IMEXPORT EnumEntry();
  64. //
  65. // Method: EnumEntry copy constructor
  66. //
  67. // Purpose: Creates a copy of class EnumEntry
  68. //
  69. IMEXPORT EnumEntry( const EnumEntry &other);
  70. //
  71. // Method: EnumEntry assignment operator
  72. //
  73. // Purpose: assigns EnumEntry to existing instance
  74. //
  75. IMEXPORT EnumEntry& operator=( const EnumEntry&o);
  76. //
  77. // Method: EnumEntry destructor
  78. //
  79. // Purpose: Destroys an instance of class EnumEntry
  80. //
  81. IMEXPORT virtual ~EnumEntry();
  82. //
  83. // Method: GetName()
  84. //
  85. // Purpose: Gets the name of an enumeration
  86. //
  87. // Parameters:
  88. //
  89. // [out] std::string& name The name of the enumeration
  90. //
  91. VmbErrorType GetName( std::string &name ) const;
  92. //
  93. // Method: GetDisplayName()
  94. //
  95. // Purpose: Gets a more declarative name of an enumeration
  96. //
  97. // Parameters:
  98. //
  99. // [out] std::string& displayName The display name of the enumeration
  100. //
  101. VmbErrorType GetDisplayName( std::string &displayName ) const;
  102. //
  103. // Method: GetDescription()
  104. //
  105. // Purpose: Gets the description of an enumeration
  106. //
  107. // Parameters:
  108. //
  109. // [out] std::string& description The description of the enumeration
  110. //
  111. VmbErrorType GetDescription( std::string &description ) const;
  112. //
  113. // Method: GetTooltip()
  114. //
  115. // Purpose: Gets a tooltip that can be used as pop up help in a GUI
  116. //
  117. // Parameters:
  118. //
  119. // [out] std::string& tooltip The tooltip as string
  120. //
  121. VmbErrorType GetTooltip( std::string &tooltip ) const;
  122. //
  123. // Method: GetValue()
  124. //
  125. // Purpose: Gets the integer value of an enumeration
  126. //
  127. // Parameters:
  128. //
  129. // [out] VmbInt64_t& value The integer value of the enumeration
  130. //
  131. IMEXPORT VmbErrorType GetValue( VmbInt64_t &value ) const;
  132. //
  133. // Method: GetVisibility()
  134. //
  135. // Purpose: Gets the visibility of an enumeration
  136. //
  137. // Parameters:
  138. //
  139. // [out] VmbFeatureVisibilityType& value The visibility of the enumeration
  140. //
  141. IMEXPORT VmbErrorType GetVisibility( VmbFeatureVisibilityType &value ) const;
  142. //
  143. // Method: GetSNFCNamespace()
  144. //
  145. // Purpose: Gets the standard feature naming convention namespace of the enumeration
  146. //
  147. // Parameters:
  148. //
  149. // [out] std::string& sFNCNamespace The feature's SFNC namespace
  150. //
  151. VmbErrorType GetSFNCNamespace( std::string &sFNCNamespace ) const;
  152. private:
  153. struct PrivateImpl;
  154. PrivateImpl *m_pImpl;
  155. // Array functions to pass data across DLL boundaries
  156. IMEXPORT VmbErrorType GetName( char * const pName, VmbUint32_t &size ) const;
  157. IMEXPORT VmbErrorType GetDisplayName( char * const pDisplayName, VmbUint32_t &size ) const;
  158. IMEXPORT VmbErrorType GetTooltip( char * const pStrTooltip, VmbUint32_t &size ) const;
  159. IMEXPORT VmbErrorType GetDescription( char * const pStrDescription, VmbUint32_t &size ) const;
  160. IMEXPORT VmbErrorType GetSFNCNamespace( char * const pStrNamespace, VmbUint32_t &size ) const;
  161. };
  162. #include <VimbaCPP/Include/EnumEntry.hpp>
  163. }} // namespace AVT::VmbAPI
  164. #endif