rxvar.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. #pragma once
  12. #include "acstring.h"
  13. class AcRxVariableReactor;
  14. class AcRxImpVariable;
  15. class AcRxImpVariablesDirectory;
  16. class AcRxImpVariablesDictionary;
  17. class AcRxImpVariableChangingEventArgs;
  18. ///<summary>Represents a variable in the system. Variables are a convenient way to advertise arbitrary state to other parts of the system.</summary>
  19. ///<remarks>
  20. ///Variables are created by declaring them in the registry. The following format should be used (elements between {} should be replaced
  21. ///with a legal value for the property or type indicated inside the {}).
  22. //
  23. ///[HKEY_LOCAL_MACHINE\{ProductRegistryRoot}\Variables\{AcRxVariable::name()}]
  24. ///@="{some value}" : Required, will be converted to PrimaryDataType
  25. ///"PrimaryType"=dword:{AcRxVariable::primaryType()} : Required
  26. ///"SecondaryType"=dword:{AcRxVariable::seondaryType()} : Optional
  27. ///"TypeFlags"=dword:{AcRxVariable::typeFlags()} : Optional
  28. ///"StorageType"=dword:{AcRxVariable::StorageType} : Required
  29. ///"Owner"="{LogicalAppName|exe}" : Optional
  30. ///"Range"="{lowerbound},{upperbound}" : Optional, applies to RTREAL, RTANG, RTSHORT and RTLONG primary types
  31. ///
  32. ///Note these variables can be get/set using acedGetVar/acedSetVar functions in AutoCAD. They are also visible to the SETVAR command.
  33. ///</remarks>
  34. class AcRxVariable
  35. {
  36. public:
  37. ///<summary>Possible storage type values.</summary>
  38. enum StorageType
  39. {
  40. ///<summary>Application wide, does not persist.</summary>
  41. kStoragePerSession = 0,
  42. ///<summary>Application wide, persists per user.</summary>
  43. kStoragePerUser = 1,
  44. ///<summary>Application wide, persists per AutoCAD profile.</summary>
  45. kStoragePerProfile = 2,
  46. ///<summary>document wide, persists in drawing.</summary>
  47. kStoragePerDatabase = 3,
  48. ///<summary>viewport (AcDbViewport and AcDbViewportTableRecord) wide, persists in drawing.</summary>
  49. kStoragePerViewport = 4
  50. };
  51. ///<summary>Possible secondary type values.</summary>
  52. enum SecondaryType
  53. {
  54. ///<summary>No secondary data type is specified.</summary>
  55. kSecondaryTypeNone = 0,
  56. ///<summary>The variable is a boolean. Only valid when primaryDataType==RTSHORT</summary>
  57. kSecondaryTypeBoolean = 1,
  58. ///<summary>The variable is a RealDWG symbol name. Only valid when primaryDataType==RTSTR</summary>
  59. kSecondaryTypeSymbolName = 2,
  60. ///<summary>The variable represents area value. Only valid when primaryDataType==RTREAL</summary>
  61. kSecondaryTypeArea = 3,
  62. ///<summary>The variable represents distance value. Only valid when primaryDataType==RTREAL</summary>
  63. kSecondaryTypeDistance = 4,
  64. ///<summary>The variable represents an angle value. Only valid when primaryDataType==RTREAL</summary>
  65. kSecondaryTypeAngle = 5,
  66. ///<summary>The variable represents a unitless real value. Only valid when primaryDataType==RTREAL</summary>
  67. kSecondaryTypeUnitlessReal = 6,
  68. ///<summary>Marks the last item in the enumeration</summary>
  69. kSecondaryTypeLast = 6,
  70. };
  71. ///<summary>Possible type flag values. These can be 'OR'-ed together.</summary>
  72. enum TypeFlags
  73. {
  74. ///<summary>No type flags are specified.</summary>
  75. kTypeFlagsNone = 0,
  76. ///<summary>Spaces are allowed in the variable values. Only valid when primaryDataType==RTSTR</summary>
  77. kTypeFlagSpacesAllowed = 1,
  78. ///<summary>. character should be interpreted as empty string. Only valid when primaryDataType==RTSTR</summary>
  79. kTypeFlagDotMeansEmpty = 2, //primaryType == RTSTR
  80. ///<summary>Variable does not record for undo.</summary>
  81. kTypeFlagNoUndo = 4,
  82. ///<summary>Variable sends notifications when it is set to the same value as the previous value.
  83. ///Variables normally ignore attempts to set the same value twice in a row.</summary>
  84. kTypeFlagsChatty = 8,
  85. ///<summary> It's used to let users know the sysvar will be removed in next release or so.
  86. // Users should mitigate the change as soon as possible. The sysvar is deprecated by immediate
  87. // un-defining it after registering with the system.
  88. // If users really need to use it, they can still use it by prefixing with "." or re-define it.
  89. // For example: .TRAYICONS or redefine TRAYICONS.</summary>
  90. kTypeDeprecated = 16,
  91. };
  92. ///<summary>Represents a bounded range.</summary>
  93. struct Range
  94. {
  95. Range():lowerBound(0), upperBound(0) {}
  96. ///<summary>Initializes a range to the specified lower and upper bounds.</summary>
  97. Range(int lb, int ub):lowerBound(lb), upperBound(ub) {}
  98. ///<summary>Lower bound of the range</summary>
  99. int lowerBound;
  100. ///<summary>Upeer bound of the range</summary>
  101. int upperBound;
  102. };
  103. ///<summary>Returns the name of the variable.</summary>
  104. ///<returns>A non-null, null terminated const ACHAR pointer that represents name.</returns>
  105. ACDB_PORT const ACHAR* name() const;
  106. ///<summary>Returns the primary data type of the variable.</summary>
  107. ///<returns>A short integer (16 bit) that reprents the primary data type.</returns>
  108. ///<remarks>The allowed values are RTREAL, RTSHORT, RTSTR, RTLONG from adscodes.h</remarks>
  109. ACDB_PORT short primaryType() const;
  110. ///<summary>Returns the secondary data type of the variable.</summary>
  111. ///<returns>A SecondaryType enum value that reprents the secondary data type.</returns>
  112. ///<remarks>The allowed values are from the SeondaryType enumeration.</remarks>
  113. ACDB_PORT AcRxVariable::SecondaryType secondaryType() const;
  114. ///<summary>Returns the storage type of the variable.</summary>
  115. ///<returns>An StorageType enum value that reprents the storage type.</returns>
  116. ///<remarks>The allowed values are from the StorageType enumeration.</remarks>
  117. ACDB_PORT AcRxVariable::StorageType storageType() const;
  118. ///<summary>Returns the type flags of the variable.</summary>
  119. ///<returns>A short integer (16 bit) that reprents the type flags.</returns>
  120. ///<remarks>The allowed values are from the TypeFlags enumeration.</remarks>
  121. ACDB_PORT short typeFlags() const;
  122. ///<summary>Returns the range of the variable.</summary>
  123. ///<returns>Range object that provides the valid range of the variable or NULL if no range restriction was specified</returns>
  124. ACDB_PORT const Range* range() const;
  125. ///<summary>Sets the value of the variable.</summary>
  126. ///<param name='value'>The new value of the variable. Type of <paramref name='value'/> (as given by <paramref name='value'/>.restype) must match
  127. ///the primaryDataType of the variable.</param>
  128. ///<param name='ownerId'>Optional. If the variable is read-only then this parameter must be used. The calling application must pass
  129. ///void* value that RealDWG passed to the application via the acrxEntryPoint function when the application was first loaded.</param>
  130. ///<param name='failReason'>Optional. If more information is available about the failure then it will be passed to the caller via this
  131. ///parameter </param>
  132. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable if the variable is read-only. Other Acad::ErrorStatus values for
  133. ///other failures.</returns>
  134. ACDB_PORT Acad::ErrorStatus setValue(const resbuf& value, void* ownerId = NULL, AcString* failReason=NULL);
  135. ///<summary>Gets the value of the variable.</summary>
  136. ///<param name='value'>The current value of the variable. If the <paramref name='value'/>.restype==RTSTR upon successful return
  137. ///then <paramref name='value'/>.resval.rstring must be freed using acutDelString </param>
  138. ///<returns>Returns Acad::eOk if sucessful.</returns>
  139. ACDB_PORT Acad::ErrorStatus getValue(resbuf& value) const;
  140. ///<summary>Gets a value indicating whether the variable is read-only.</summary>
  141. ///<param name='reason'>Optional. If more information is available why the variable is read-only then it will be passed to
  142. ///the caller via this parameter </param>
  143. ///<returns>Returns Acad::eOk if sucessful.</returns>
  144. ///<remarks>The value of a read-only variable can only be set by its owner.</remarks>
  145. ACDB_PORT bool isReadOnly(AcString* reason=NULL) const;
  146. ///<summary>Sets a value indicating whether the variable is read-only</summary>
  147. ///<param name='value'>Pass true to set the variable read-only.</param>
  148. ///<param name='ownerId'>The calling application must pass void* value that RealDWG passed to the application via the acrxEntryPoint function
  149. ///when the application was first loaded. If the variable already has a different owner then the function will fail. Otherwise the caller will
  150. ///become the owner of the variable.
  151. ///Note: This must not be NULL.</param>
  152. ///<param name='reason'>Optional. If more information is available why the variable is now read-only then the caller should provide it via
  153. ///this parameter. The parameter is ignored when <paramref name='value'/> is false.</param>
  154. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  155. ///other failures.</returns>
  156. ACDB_PORT Acad::ErrorStatus setIsReadOnly(bool value, void* ownerId, const AcString* reason=NULL);
  157. ///<summary>Add an observer for this variable.</summary>
  158. ///<param name='reactor'>Pointer to an object that will receive notifications.</param>
  159. ACDB_PORT void addReactor(AcRxVariableReactor* reactor);
  160. ///<summary>Gets a value indicating whether the variable is locked by cad admin.</summary>
  161. ///<returns>Returns true if it is locked.</returns>
  162. ///<remarks>The locking of variable can only be done through cad admin tool or directly changing HKLM registry entry.</remarks>
  163. ACDB_PORT bool isLocked() const;
  164. ///<summary>Remove an observer for this variable.</summary>
  165. ///<param name='reactor'>Pointer to an observer that has been receiving notifications.</param>
  166. ACDB_PORT void removeReactor(AcRxVariableReactor* reactor);
  167. ///<summary>Reset this variable to its default value. Observers are notified.</summary>
  168. ///<returns>Returns Acad::eOk if sucessful.</returns>
  169. ACDB_PORT Acad::ErrorStatus reset();
  170. ///<summary>Destructor</summary>
  171. ACDB_PORT ~AcRxVariable();
  172. private:
  173. friend class AcRxImpVariable;
  174. AcRxVariable(AcRxImpVariable*);
  175. AcRxImpVariable* m_pImp;
  176. };
  177. ///<summary>A singleton instance of this type represents all variables in the system.</summary>
  178. class AcRxVariablesDictionary
  179. {
  180. public:
  181. ~AcRxVariablesDictionary();
  182. ///<summary>Add an observer for any variable.</summary>
  183. ///<param name='reactor'>Pointer to an object that will receive notifications.</param>
  184. ACDB_PORT void addReactor(AcRxVariableReactor* reactor);
  185. ///<summary>Remove an observer for any variable.</summary>
  186. ///<param name='reactor'>Pointer to an observer that has been receiving notifications.</param>
  187. ACDB_PORT void removeReactor(AcRxVariableReactor* reactor);
  188. ///<summary>Retrieves the names of all variables currently registered in the system.</summary>
  189. ///<returns>Returns a constant reference to an array of strings that hold the names of the variables.</returns>
  190. ACDB_PORT const AcArray<AcString>& getAllNames() const;
  191. ///<summary>Retrieves a variable.</summary>
  192. ///<param name='name'>Name of the variable to retrieve</param>
  193. ///<returns>Returns NULL if no variable with the specified name can be found. Other it returns a valid pointer to an AcRxVariable object.</returns>
  194. ACDB_PORT AcRxVariable* getVariable(const ACHAR* name) const;
  195. ///<summary>Gets the AcRxVariablesDictionary. This a singleton instance</summary>
  196. ///<returns>Returns a pointer to the singleton AcrxVariablesDictionary object in the system.</returns>
  197. ACDB_PORT static AcRxVariablesDictionary* get();
  198. ///<summary>Resets variables in the AcRxVariablesDictionary, filtered by "filter", to their default values.</summary>
  199. ///<param name='filter'>Strorage type of variable to reset.</param>
  200. ///<returns>Returns Acad::eOk if sucessful. Errors out if fails to reset any variable.</returns>
  201. ACDB_PORT Acad::ErrorStatus reset(AcRxVariable::StorageType filter);
  202. //Helper functions, we can add more here as we need them
  203. ///<summary>Gets the named boolean value</summary>
  204. ///<param name='name'>Name of the variable to retrieve</param>
  205. ///<param name='def'>default value that the function will return if the variable does not exist or if its type is other than bool</param>
  206. ///<returns>Returns the boolean value stored in the named variable or <paramref name='def'/>
  207. ///if the variable does not exist</returns>
  208. ACDB_PORT static bool getBool(const ACHAR* name, bool def);
  209. ///<summary>Gets the named boolean value</summary>
  210. ///<param name='pVar'>Pointer to variable to retrieve</param>
  211. ///<param name='def'>default value that the function will return if the variable does not exist or if its type is other than bool</param>
  212. ///<returns>Returns the boolean value stored in the variable or <paramref name='def'/>
  213. ///if the variable does not exist</returns>
  214. ACDB_PORT static bool getBool(const AcRxVariable* pVar, bool def);
  215. ///<summary>Sets the named boolean value</summary>
  216. ///<param name='name'>Name of the variable to set</param>
  217. ///<param name='val'>new value to set</param>
  218. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  219. ///other failures.</returns>
  220. ACDB_PORT static Acad::ErrorStatus setBool(const ACHAR* name, bool val);
  221. ///<summary>Sets the named boolean value</summary>
  222. ///<param name='pVar'>Pointer to variable to set</param>
  223. ///<param name='val'>new value to set</param>
  224. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  225. ///other failures.</returns>
  226. ACDB_PORT static Acad::ErrorStatus setBool(AcRxVariable*, bool val);
  227. ///<summary>Gets the named Int16 value</summary>
  228. ///<param name='name'>Name of the variable to retrieve</param>
  229. ///<param name='def'>default value that the function will return if the variable does not exist</param>
  230. ///<returns>Returns the Int16 value stored in the named variable of <paramref name='def'/>
  231. ///if the variable does not exist</returns>
  232. ACDB_PORT static short getInt16(const ACHAR* name, short def);
  233. ///<summary>Gets the named Int16 value</summary>
  234. ///<param name='pVar'>Pointer to variable to retrieve</param>
  235. ///<param name='def'>default value that the function will return if the variable does not exist or if its type is other than int16</param>
  236. ///<returns>Returns the Int16 value stored in the named variable of <paramref name='def'/>
  237. ///if the variable does not exist</returns>
  238. ACDB_PORT static short getInt16(const AcRxVariable* pVar, short def);
  239. ///<summary>Sets the named Int16 value</summary>
  240. ///<param name='name'>Name of the variable to set</param>
  241. ///<param name='val'>new value to set</param>
  242. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  243. ///other failures.</returns>
  244. ACDB_PORT static Acad::ErrorStatus setInt16(const ACHAR* name, short val);
  245. ///<summary>Sets the named Int16 value</summary>
  246. ///<param name='pVar'>Pointer to variable to set</param>
  247. ///<param name='val'>new value to set</param>
  248. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  249. ///other failures.</returns>
  250. ACDB_PORT static Acad::ErrorStatus setInt16(AcRxVariable* pVar, short val);
  251. ///<summary>Gets the named double value</summary>
  252. ///<param name='name'>Name of the variable to retrieve</param>
  253. ///<param name='def'>default value that the function will return if the variable does not exist</param>
  254. ///<returns>Returns the double value stored in the named variable of <paramref name='def'/>
  255. ///if the variable does not exist</returns>
  256. ACDB_PORT static double getDouble(const ACHAR* name, double def);
  257. ///<summary>Gets the named double value</summary>
  258. ///<param name='pVar'>Pointer to variable to retrieve</param>
  259. ///<param name='def'>default value that the function will return if the variable does not exist or if its type is other than double</param>
  260. ///<returns>Returns the double value stored in the named variable of <paramref name='def'/>
  261. ///if the variable does not exist</returns>
  262. ACDB_PORT static double getDouble(const AcRxVariable* pVar, double def);
  263. ///<summary>Sets the named double value</summary>
  264. ///<param name='name'>Name of the variable to retrieve</param>
  265. ///<param name='val'>new value to set</param>
  266. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  267. ///other failures.</returns>
  268. ACDB_PORT static Acad::ErrorStatus setDouble(const ACHAR* name, double val);
  269. ///<summary>Sets the named double value</summary>
  270. ///<param name='pVar'>Pointer to variable to retrieve</param>
  271. ///<param name='val'>new value to set</param>
  272. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  273. ///other failures.</returns>
  274. ACDB_PORT static Acad::ErrorStatus setDouble(AcRxVariable* pVar, double val);
  275. ///<summary>Gets the named string value</summary>
  276. ///<param name='name'>Name of the variable to retrieve</param>
  277. ///<returns>Returns the AcString value stored in the named variable of
  278. ///if the variable does not exist. The function will return NULL if there's no sysvar with this name</returns>
  279. ACDB_PORT static AcString getString(const ACHAR* name);
  280. ///<summary>Gets the named string value</summary>
  281. ///<param name='pVar'>Pointer to variable to retrieve</param>
  282. ///<returns>Returns the AcString value stored in the named variable of
  283. ///if the variable does not exist. The function will return NULL if there's no sysvar with this name</returns>
  284. ACDB_PORT static AcString getString(const AcRxVariable* pVar);
  285. ///<summary>Sets the named string value</summary>
  286. ///<param name='name'>Name of the variable to set</param>
  287. ///<param name='val'>new value to set</param>
  288. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  289. ///other failures.</returns>
  290. ACDB_PORT static Acad::ErrorStatus setString(const ACHAR* name, const ACHAR* val);
  291. ///<summary>Sets the named string value</summary>
  292. ///<param name='pVar'>Pointer to variable to set</param>
  293. ///<param name='val'>new value to set</param>
  294. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  295. ///other failures.</returns>
  296. ACDB_PORT static Acad::ErrorStatus setString(AcRxVariable* pVar, const ACHAR* val);
  297. private:
  298. friend class AcRxImpVariablesDictionary;
  299. AcRxVariablesDictionary(AcRxImpVariablesDictionary*);
  300. AcRxImpVariablesDictionary* m_pImp;
  301. };
  302. ///<summary>Provides more information in conjunction with AcRxVariableReactor::changed event.</summary>
  303. class AcRxVariableChangedEventArgs
  304. {
  305. public:
  306. ///<summary>Gets the old value of the variable.</summary>
  307. ///<returns>Constant reference to the old value of the variable. This value should not be modified. resval.rstring should NOT be freed.</returns>
  308. ACDB_PORT const resbuf& oldValue() const;
  309. ///<summary>Gets the new value of the variable.</summary>
  310. ///<returns>Constant reference to the new value of the variable. This value should not be modified. resval.rstring should NOT be freed.</returns>
  311. ACDB_PORT const resbuf& newValue() const;
  312. friend class AcRxImpVariableChangingEventArgs;
  313. AcRxVariableChangedEventArgs(AcRxImpVariableChangingEventArgs*);
  314. protected:
  315. AcRxImpVariableChangingEventArgs* m_pImp;
  316. };
  317. ///<summary>Provides more information in conjunction with AcRxVariableReactor::changing event.</summary>
  318. class AcRxVariableChangingEventArgs : public AcRxVariableChangedEventArgs
  319. {
  320. public:
  321. ///<summary>Modify the new value for the variable.</summary>
  322. ///<param name='value'>The new value of the variable. Type of <paramref name='value'/> (as given by <paramref name='value'/>.restype) must match
  323. ///the primaryDataType of the variable.</param>
  324. ///<param name='ownerId'>Optional. If the variable is read-only then this parameter must be used. The calling application must pass
  325. ///void* value that RealDWG passed to the application via the acrxEntryPoint function when the application was first loaded.</param>
  326. ///<returns>Returns Acad::eOk if sucessful. Acad::eNotApplicable when the variable has a different owner. Other Acad::ErrorStatus values for
  327. ///other failures.</returns>
  328. ///<remarks>Note that if any observers call this method it will cause the notification cycle to be repeated. All observers who have
  329. ///already seen the 'changing' notification will see it again with the updated 'newValue'. The cycle is repeated until either some
  330. ///observers call veto or no observers call setNewValue or if the cycle makes not progress</remarks>
  331. ACDB_PORT Acad::ErrorStatus setNewValue(const resbuf& value, void* ownerId = NULL);
  332. ///<summary>Vetos the variable change.</summary>
  333. ///<param name='failReason'>Optional. If more information is available about the failure then it should be be passed via this
  334. ///parameter </param>
  335. ACDB_PORT void veto(const ACHAR* failReason);
  336. ///<summary>Returns true if the value due to reset</summary>
  337. ///<returns>true, if resetting otherwise false</returns>
  338. ACDB_PORT bool isResetting() const;
  339. AcRxVariableChangingEventArgs(AcRxImpVariableChangingEventArgs*);
  340. };
  341. ///<summary>Callback interface implemented by observers that are interested in events related to variables.</summary>
  342. class ADESK_NO_VTABLE AcRxVariableReactor : public AcRxObject
  343. {
  344. public:
  345. ///<summary>Called when a variable is about to change but the value has not been modified yet. Callees can veto the change.</summary>
  346. ///<param name='sender'>Pointer to the variable that is about to change.</param>
  347. ///<param name='args'>More information about the change.</param>
  348. ///<remarks>Note that this notification is sent when the variable is about to be set to a new value. This notification is not raised when
  349. ///when the underlying storage changes thus implicitcly causing the variable to change. For example, if you have a kStoragePerProfile variable
  350. ///this notification is NOT raised when the profile changes. Similarly, kStoragePerDatabase variables do NOT raise this event when active/working
  351. ///database changes.</remarks>
  352. virtual void changing(const AcRxVariable* sender, AcRxVariableChangingEventArgs& args)
  353. {
  354. (sender); (args); //Unreferenced parameter
  355. }
  356. ///<summary>Called when a variable has changed.</summary>
  357. ///<param name='sender'>Pointer to the variable that has changed.</param>
  358. ///<param name='args'>More information about the change.</param>
  359. ///<remarks>Note that this notification is sent when the variable has been set to a new value. This notification is not raised when
  360. ///when the underlying storage changes thus implicitcly causing the variable to change. For example, if you have a kStoragePerProfile variable
  361. ///this notification is NOT raised when the profile changes. Similarly, kStoragePerDatabase variables do NOT raise this event when active/working
  362. ///database changes.</remarks>
  363. virtual void changed(const AcRxVariable* sender, const AcRxVariableChangedEventArgs& args)
  364. {
  365. (sender); (args); //Unreferenced parameter
  366. }
  367. };