acdmmeplotproperty.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. //
  2. //
  3. //////////////////////////////////////////////////////////////////////////////
  4. //
  5. // Copyright 2015 Autodesk, Inc. All rights reserved.
  6. //
  7. // Use of this software is subject to the terms of the Autodesk license
  8. // agreement provided at the time of installation or download, or which
  9. // otherwise accompanies this software in either electronic or hard copy form.
  10. //
  11. //////////////////////////////////////////////////////////////////////////////
  12. //
  13. #ifndef AcDMMEPlotProperty_h
  14. #define AcDMMEPlotProperty_h
  15. #include "AcArray.h"
  16. /////////////////////////////////////////////////////////////////////////
  17. // class AcDMMXMLAttribute
  18. /////////////////////////////////////////////////////////////////////////
  19. /// <summary>
  20. /// This is a subsidiary class to AcDMMEplotProperty defined below.
  21. /// You generally don't need to use this class.
  22. ///
  23. /// Normal attributes, i.e. those predefined by Dwf such as name, value, units, etc.,
  24. /// are added to an AcDMMEplotProperty using its built-in methods such as SetUnits.
  25. ///
  26. /// Applications that define their own private namespaces and want to publish attributes
  27. /// belonging to those namespaces need to use this class.
  28. /// </summary>
  29. ///
  30. /// <remarks>
  31. /// On the publishing side, you generally don't need to create elements of this class, and can add
  32. /// your elements to an AcDMMEplotProperty by using
  33. /// AcDMMEplotProperty::AddXMLAttribute(const wchar_t *ns, const wchar_t *nsUrl,
  34. /// const wchar_t *attName, const wchar_t *attValue);
  35. /// You will need this class mainly to read and interpret the existing vector of attributes
  36. /// returned by AcDMMEplotProperty::GetXMLAttributes().
  37. /// </remarks>
  38. ///
  39. class AcDMMXMLAttribute
  40. {
  41. public:
  42. /// <summary>
  43. /// Default constructor
  44. /// </summary>
  45. ///
  46. /// <remarks> initializes data members to an empty state
  47. /// </remarks>
  48. ///
  49. AcDMMXMLAttribute()
  50. {
  51. setNull();
  52. }
  53. /// <summary>
  54. /// constructs an AcDMMXMLAttribute wrapping a namespace, namespace
  55. /// location, attribute name and attribute value
  56. /// </summary>
  57. ///
  58. /// <param name="ns">
  59. /// a non-empty Unicode string supplying the namespace "tag" of the property
  60. /// </param>
  61. ///
  62. /// <param name="nsUrl">
  63. /// a non-empty Unicode string supplying a namespace URI for the property
  64. /// </param>
  65. ///
  66. /// <param name="attName">
  67. /// a Unicode string supplying the hidden attribute name of the property
  68. /// </param>
  69. ///
  70. /// <param name="attValue">
  71. /// a Unicode string supplying the hidden attribute value for the property
  72. /// this must not exceed 8192 bytes after xml encoding
  73. /// </param>
  74. ///
  75. /// <remarks> An AcDMMXMLAttribute must contain non-null values for all parameters,
  76. /// otherwise it will be ignored. Empty strings ("") for the namespace parameters will
  77. /// cause undefined behavior.
  78. /// </remarks>
  79. ///
  80. AcDMMXMLAttribute(const wchar_t *ns, const wchar_t *nsUrl,
  81. const wchar_t *attName, const wchar_t *attValue)
  82. {
  83. setNull();
  84. SetNamespace(ns);
  85. SetNamespaceUrl(nsUrl);
  86. SetAttributeName(attName);
  87. SetAttributeValue(attValue);
  88. }
  89. /// <summary>
  90. /// operator= also used by the copy constructor
  91. /// </summary>
  92. ///
  93. /// <param name="src">
  94. /// the object whose values will be copied to this object
  95. /// </param>
  96. ///
  97. /// <returns>
  98. /// a const reference to this
  99. /// </returns>
  100. ///
  101. const AcDMMXMLAttribute& operator= (const AcDMMXMLAttribute& src)
  102. {
  103. if (this != &src)
  104. {
  105. setNull();
  106. SetNamespace(src.GetNamespace());
  107. SetNamespaceUrl(src.GetNamespaceUrl());
  108. SetAttributeName(src.GetAttributeName());
  109. SetAttributeValue(src.GetAttributeValue());
  110. }
  111. return *this;
  112. }
  113. /// <summary>
  114. /// Copy Constructor
  115. /// </summary>
  116. ///
  117. /// <param name="src">
  118. /// The object to copy from
  119. /// </param>
  120. ///
  121. AcDMMXMLAttribute(const AcDMMXMLAttribute& src)
  122. {
  123. *this = src;
  124. }
  125. /// <summary>
  126. /// Destructor
  127. /// </summary>
  128. ///
  129. /// <remarks>
  130. /// The string data in the property is freed by this destructor
  131. /// </remarks>
  132. ///
  133. ~AcDMMXMLAttribute()
  134. {
  135. if (NULL != m_namespace)
  136. delete [] m_namespace;
  137. if (NULL != m_namespaceUrl)
  138. delete [] m_namespaceUrl;
  139. if (NULL != m_attributeName)
  140. delete [] m_attributeName;
  141. if (NULL != m_attributeValue)
  142. delete [] m_attributeValue;
  143. }
  144. /// <summary>
  145. /// mutator for the namespace xml attribute
  146. /// </summary>
  147. ///
  148. /// <param name ="ns">
  149. /// A Unicode string setting the namespace of the property
  150. /// </param>
  151. ///
  152. void SetNamespace(const wchar_t* ns)
  153. {
  154. delete [] m_namespace;
  155. if (NULL != ns) {
  156. size_t nSize = ::wcslen(ns) + 1;
  157. m_namespace = new wchar_t[nSize];
  158. errno_t err = ::wcscpy_s(m_namespace, nSize, ns);
  159. assert(err == 0);
  160. } else {
  161. m_namespace = NULL;
  162. }
  163. }
  164. /// <summary>
  165. /// accessor for the namespace of the xml attribute
  166. /// </summary>
  167. ///
  168. /// <returns>
  169. /// Returns a const pointer to the Unicode xml namespace string
  170. /// </returns>
  171. ///
  172. const wchar_t* GetNamespace() const
  173. {
  174. return m_namespace;
  175. }
  176. /// <summary>
  177. /// mutator for the namespace location of the xml attribute
  178. /// </summary>
  179. ///
  180. /// <param name ="nsUrl">
  181. /// A Unicode string setting the namespace location of the property
  182. /// </param>
  183. ///
  184. void SetNamespaceUrl(const wchar_t* nsUrl)
  185. {
  186. delete [] m_namespaceUrl;
  187. if (NULL != nsUrl) {
  188. size_t nSize = ::wcslen(nsUrl) + 1;
  189. m_namespaceUrl = new wchar_t[nSize];
  190. errno_t err = ::wcscpy_s(m_namespaceUrl, nSize, nsUrl);
  191. assert(err == 0);
  192. } else {
  193. m_namespaceUrl = NULL;
  194. }
  195. }
  196. /// <summary>
  197. /// accessor for the namespace location of the xml attribute
  198. /// </summary>
  199. ///
  200. /// <returns>
  201. /// Returns a const pointer to the Unicode namespace location string
  202. /// </returns>
  203. ///
  204. const wchar_t* GetNamespaceUrl() const
  205. {
  206. return m_namespaceUrl;
  207. }
  208. /// <summary>
  209. /// mutator for the xml attribute name
  210. /// </summary>
  211. ///
  212. /// <param name ="attName">
  213. /// A Unicode string setting the attribute name of the property
  214. /// </param>
  215. ///
  216. void SetAttributeName(const wchar_t* attName)
  217. {
  218. delete [] m_attributeName;
  219. if (NULL != attName) {
  220. size_t nSize = ::wcslen(attName) + 1;
  221. m_attributeName = new wchar_t[nSize];
  222. errno_t err = ::wcscpy_s(m_attributeName, nSize, attName);
  223. assert(err == 0);
  224. } else {
  225. m_attributeName = NULL;
  226. }
  227. }
  228. /// <summary>
  229. /// accessor for the xml attribute name
  230. /// </summary>
  231. ///
  232. /// <returns>
  233. /// Returns a const pointer to the Unicode xml attribute name string
  234. /// </returns>
  235. ///
  236. const wchar_t* GetAttributeName() const
  237. {
  238. return m_attributeName;
  239. }
  240. /// <summary>
  241. /// mutator for the xml attribute value
  242. /// </summary>
  243. ///
  244. /// <param name ="attValue">
  245. /// A Unicode string setting the xml attribute value of the property
  246. /// </param>
  247. ///
  248. void SetAttributeValue(const wchar_t* attValue)
  249. {
  250. delete [] m_attributeValue;
  251. if (NULL != attValue) {
  252. size_t nSize = ::wcslen(attValue) + 1;
  253. m_attributeValue = new wchar_t[nSize];
  254. errno_t err = ::wcscpy_s(m_attributeValue, nSize, attValue);
  255. assert(err == 0);
  256. } else {
  257. m_attributeValue = NULL;
  258. }
  259. }
  260. /// <summary>
  261. /// accessor for the xml attribute value
  262. /// </summary>
  263. ///
  264. /// <returns>
  265. /// Returns a const pointer to the xml attribute value string
  266. /// </returns>
  267. ///
  268. const wchar_t* GetAttributeValue() const
  269. {
  270. return m_attributeValue;
  271. }
  272. private:
  273. wchar_t * m_namespace;
  274. wchar_t * m_namespaceUrl;
  275. wchar_t * m_attributeName;
  276. wchar_t * m_attributeValue;
  277. void setNull()
  278. {
  279. m_namespace = NULL;
  280. m_namespaceUrl = NULL;
  281. m_attributeName = NULL;
  282. m_attributeValue = NULL;
  283. }
  284. };
  285. typedef AcArray<AcDMMXMLAttribute> AcDMMXMLAttributeVec;
  286. /////////////////////////////////////////////////////////////////////////
  287. // class AcDMMEPlotProperty
  288. /////////////////////////////////////////////////////////////////////////
  289. /// <summary>
  290. /// This class is a lightweight proxy for the DWF EPlotProperty object.
  291. /// It allows clients of the DMM (DWF Metadata Manager) API to add
  292. /// properties to an AcDMMEPlotProperties object which in turn
  293. /// is used to associate properties with an entity in a DWF file
  294. /// without linking to the DWF toolkit
  295. /// </summary>
  296. ///
  297. /// <remarks>
  298. /// This is just a container for Unicode strings. Two of these are required,
  299. /// the property name and its value. The other three are optional. If the
  300. /// strings are not already XML encoded, they will be encoded when this
  301. /// object is converted to the corresponding DWF toolkit object and this
  302. /// can result in significant expansion of the string due to the
  303. /// escaping of reserved characters. The maximum length of any encoded
  304. /// attribute string is 8192 bytes.
  305. /// </remarks>
  306. ///
  307. class AcDMMEPlotProperty
  308. {
  309. public:
  310. /// <summary>
  311. /// Default constructor
  312. /// </summary>
  313. ///
  314. /// <remarks> initializes data members to an empty state
  315. /// </remarks>
  316. ///
  317. AcDMMEPlotProperty()
  318. {
  319. m_name = NULL;
  320. m_value = NULL;
  321. m_type = NULL;
  322. m_units = NULL;
  323. m_category = NULL;
  324. }
  325. /// <summary>
  326. /// constructs an AcDMMEPlotProperty wrapping a name and value
  327. /// </summary>
  328. ///
  329. /// <param name="name">
  330. /// a Unicode string supplying the name of the property
  331. /// </param>
  332. ///
  333. /// <param name="value">
  334. /// a Unicode string supplying a value for the property
  335. /// this must not exceed 8192 bytes after xml encoding
  336. /// </param>
  337. ///
  338. /// <remarks> can construct from two wide strings supplying just
  339. /// the property name and property value.
  340. /// </remarks>
  341. ///
  342. AcDMMEPlotProperty(const wchar_t *name, const wchar_t * value)
  343. {
  344. if (NULL != name) {
  345. size_t nSize = ::wcslen(name) + 1;
  346. m_name = new wchar_t[nSize];
  347. errno_t err = ::wcscpy_s(m_name, nSize, name);
  348. assert(err == 0);
  349. } else {
  350. m_name = NULL;
  351. }
  352. if (NULL != value) {
  353. size_t nSize = ::wcslen(value) + 1;
  354. m_value = new wchar_t[nSize];
  355. errno_t err = ::wcscpy_s(m_value, nSize, value);
  356. assert(err == 0);
  357. } else {
  358. m_value = NULL;
  359. }
  360. m_category = NULL;
  361. m_type = NULL;
  362. m_units = NULL;
  363. }
  364. /// <summary>
  365. /// Copy Constructor
  366. /// </summary>
  367. ///
  368. /// <param name="src">
  369. /// The object to copy from
  370. /// </param>
  371. ///
  372. AcDMMEPlotProperty(const AcDMMEPlotProperty &src)
  373. {
  374. m_name = NULL;
  375. m_value = NULL;
  376. m_type = NULL;
  377. m_units = NULL;
  378. m_category = NULL;
  379. {*this = src;}
  380. }
  381. /// <summary>
  382. /// Destructor
  383. /// </summary>
  384. ///
  385. /// <remarks>
  386. /// The string data in the property is freed by this destructor
  387. /// </remarks>
  388. ///
  389. ~AcDMMEPlotProperty()
  390. {
  391. if (NULL != m_name)
  392. delete [] m_name;
  393. if (NULL != m_value)
  394. delete [] m_value;
  395. if (NULL != m_category)
  396. delete [] m_category;
  397. if (NULL != m_type)
  398. delete [] m_type;
  399. if (NULL != m_units)
  400. delete [] m_units;
  401. }
  402. /// <summary>
  403. /// mutator for the optional Type attribute
  404. /// </summary>
  405. ///
  406. /// <param name ="type">
  407. /// A Unicode string setting the DWF type of the property
  408. /// </param>
  409. ///
  410. /// <remarks>
  411. /// type is an optional Unicode string
  412. ///
  413. /// some recognized type name strings:
  414. /// String_List_Type "string"
  415. /// Boolean_Type "boolean"
  416. /// UriReference_Type "uriReference"
  417. /// TimeDuration_Type "timeDuration"
  418. /// TimeInstant_Type "timeInstant"
  419. /// Date_Type "date"
  420. /// Month_Type "month"
  421. /// Year_Type "year"
  422. /// Century_Type "century"
  423. /// RecurringDate_Type "recurringDate"
  424. /// RecurringDay_Type "recurringDay"
  425. /// Float_Type "float"
  426. /// Double_Type "double"
  427. /// Double_List_Type "doubleList"
  428. /// Long_Type "long"
  429. /// Long_List_Type; "longList"
  430. /// Int_Type "int"
  431. /// Short_Type "short"
  432. /// Byte_Type "byte"
  433. /// UnsignedLong_Type "unsignedLong"
  434. /// UnsignedInt_Type "unsignedint"
  435. /// UnsignedShort_Type "unsignedShort"
  436. /// UnsignedByte_Type "unsignedByte"
  437. /// StringList_Type "stringList"
  438. ///
  439. /// Note: the List types are space separated lists of values
  440. /// </remarks>
  441. void SetType(const wchar_t * type)
  442. {
  443. if (m_type) {
  444. delete [] m_type;
  445. m_type = NULL;
  446. }
  447. if (NULL != type) {
  448. size_t nSize = ::wcslen(type) + 1;
  449. m_type = new wchar_t[nSize];
  450. errno_t err = ::wcscpy_s(m_type, nSize, type);
  451. assert(err == 0);
  452. } else {
  453. m_type = NULL;
  454. }
  455. }
  456. /// <summary>
  457. /// accessor for the optional Type attribute
  458. /// </summary>
  459. ///
  460. /// <returns>
  461. /// Returns a const pointer to the Unicode Type string
  462. /// </returns>
  463. const wchar_t * GetType() const
  464. {
  465. return m_type;
  466. }
  467. /// <summary>
  468. /// mutator for the optional Units attribute
  469. /// </summary>
  470. ///
  471. /// <param name ="units">
  472. /// A Unicode string setting the DWF units of the property
  473. /// </param>
  474. ///
  475. /// <remarks>
  476. /// The units string is appended to the value string by the viewer
  477. /// when displaying properties. The convention is that they should be
  478. /// English and obvious, e.g., standard, abbreviations wherever possible.
  479. /// Examples include mm, cm, m, km, in, ft, yd and mi.
  480. /// </remarks>
  481. void SetUnits(const wchar_t * units)
  482. {
  483. if (m_units) {
  484. delete [] m_units;
  485. m_units = NULL;
  486. }
  487. if (NULL != units) {
  488. size_t nSize = ::wcslen(units) + 1;
  489. m_units = new wchar_t[nSize];
  490. errno_t err = ::wcscpy_s(m_units, nSize, units);
  491. assert(err == 0);
  492. } else {
  493. m_units = NULL;
  494. }
  495. }
  496. /// <summary>
  497. /// accessor for the optional Units attribute
  498. /// </summary>
  499. ///
  500. /// <returns>
  501. /// Returns a const pointer to the Unicode Units string
  502. /// </returns>
  503. const wchar_t * GetUnits() const
  504. {
  505. return m_units;
  506. }
  507. /// <summary>
  508. /// mutator for the optional Category attribute
  509. /// </summary>
  510. ///
  511. /// <param name ="category">
  512. /// A Unicode string setting the category of the property
  513. /// </param>
  514. ///
  515. /// <remarks>
  516. /// category is a Unicode string property for categorizing objects
  517. /// The category string is displayed in the DWF viewer properties window
  518. /// Clients may use category in various ways. The viewer recognizes one
  519. /// magic category, hidden, which will cause it not to display the
  520. /// property.
  521. /// </remarks>
  522. ///
  523. void SetCategory(const wchar_t * category)
  524. {
  525. if (m_category) {
  526. delete [] m_category;
  527. m_category = NULL;
  528. }
  529. if (NULL != category) {
  530. size_t nSize = ::wcslen(category) + 1;
  531. m_category = new wchar_t[nSize];
  532. errno_t err = ::wcscpy_s(m_category, nSize, category);
  533. assert(err == 0);
  534. } else {
  535. m_category = NULL;
  536. }
  537. }
  538. /// <summary>
  539. /// accessor for the optional Category attribute
  540. /// </summary>
  541. ///
  542. /// <returns>
  543. /// Returns a const pointer to the Unicode Category string
  544. /// </returns>
  545. ///
  546. const wchar_t * GetCategory() const
  547. {
  548. return m_category;
  549. }
  550. /// <summary>
  551. /// mutator for the required property Name attribute
  552. /// </summary>
  553. ///
  554. /// <param name ="name">
  555. /// A Unicode string setting the name of the property
  556. /// </param>
  557. ///
  558. /// <remarks>
  559. /// the name is a Unicode string property
  560. /// The name string is displayed in the DWF viewer properties window
  561. /// </remarks>
  562. ///
  563. void SetName(const wchar_t * name)
  564. {
  565. if (m_name) {
  566. delete [] m_name;
  567. m_name = NULL;
  568. }
  569. if (NULL != name) {
  570. size_t nSize = ::wcslen(name) + 1;
  571. m_name = new wchar_t[nSize];
  572. errno_t err = ::wcscpy_s(m_name, nSize, name);
  573. assert(err == 0);
  574. } else {
  575. m_name = NULL;
  576. }
  577. }
  578. /// <summary>
  579. /// accessor for the required property name attribute
  580. /// </summary>
  581. ///
  582. /// <returns>
  583. /// Returns a const pointer to the Unicode name string
  584. /// </returns>
  585. ///
  586. const wchar_t * GetName() const
  587. {
  588. return m_name;
  589. }
  590. /// <summary>
  591. /// mutator for the reqiured property Value attribute
  592. /// </summary>
  593. ///
  594. /// <param name ="value">
  595. /// A Unicode string setting the value of the property
  596. /// </param>
  597. ///
  598. /// <remarks>
  599. /// value is a Unicode string property for objects
  600. /// The value string is displayed in the DWF viewer properties window
  601. /// </remarks>
  602. void SetValue(const wchar_t * value)
  603. {
  604. if (m_value) {
  605. delete [] m_value;
  606. m_value = NULL;
  607. }
  608. if (NULL != value) {
  609. size_t nSize = ::wcslen(value) + 1;
  610. m_value = new wchar_t[nSize];
  611. errno_t err = ::wcscpy_s(m_value, nSize, value);
  612. assert(err == 0);
  613. } else {
  614. m_value = NULL;
  615. }
  616. }
  617. /// <summary>
  618. /// accessor for the required proterty Value attribute
  619. /// </summary>
  620. ///
  621. /// <returns>
  622. /// Returns a const pointer to the Unicode Value string
  623. /// </returns>
  624. ///
  625. const wchar_t * GetValue() const
  626. {
  627. return m_value;
  628. }
  629. /// <summary>
  630. /// operator= also used by the copy constructor
  631. /// </summary>
  632. ///
  633. /// <param name="src">
  634. /// the object whose values will be copied to this object
  635. /// </param>
  636. ///
  637. /// <returns>
  638. /// a const reference to this
  639. /// </returns>
  640. ///
  641. AcDMMEPlotProperty& operator= (const AcDMMEPlotProperty& src)
  642. {
  643. if (this == &src)
  644. return *this;
  645. SetName(src.m_name);
  646. SetValue(src.m_value);
  647. SetType(src.m_type);
  648. SetUnits(src.m_units);
  649. SetCategory(src.m_category);
  650. m_XMLAttributes = src.m_XMLAttributes;
  651. return *this;
  652. }
  653. /// <summary>
  654. /// Adds a new AcDMMXMLAttribute object to the internal
  655. /// vector of XML Attributes.
  656. /// </summary>
  657. ///
  658. /// <param name="attrib">
  659. /// a const pointer to the XMLAttibute that needs to be added to the
  660. /// vector of XML attributes
  661. /// </param>
  662. ///
  663. void AddXMLAttribute(const AcDMMXMLAttribute * attrib)
  664. {
  665. if(attrib)
  666. AddXMLAttribute(attrib->GetNamespace(),
  667. attrib->GetNamespaceUrl(),
  668. attrib->GetAttributeName(),
  669. attrib->GetAttributeValue());
  670. }
  671. /// <summary>
  672. /// Creates and adds a new AcDMMXMLAttribute object to the internal
  673. /// vector of XML Attributes.
  674. /// </summary>
  675. ///
  676. /// <param name="ns">
  677. /// the new Attribute's namespace name
  678. /// </param>
  679. ///
  680. /// <param name="nsUrl">
  681. /// the new Attribute's namepsace location
  682. /// </param>
  683. ///
  684. /// <param name="attName">
  685. /// the new Attribute's name
  686. /// </param>
  687. ///
  688. /// <param name="value">
  689. /// the new Attribute's value
  690. /// </param>
  691. ///
  692. void AddXMLAttribute(const wchar_t *ns, const wchar_t *nsUrl, const wchar_t *attName, const wchar_t *attValue)
  693. {
  694. if (NULL != ns && NULL != nsUrl && NULL != attName && NULL != attValue)
  695. m_XMLAttributes.append(AcDMMXMLAttribute(ns,nsUrl,attName,attValue));
  696. }
  697. /// <summary>
  698. /// accessor for the internal vector of AcDMMXMLAttribute objects
  699. /// contained by this object
  700. /// </summary>
  701. ///
  702. /// <returns>
  703. /// Returns a const reference to the internal Vector of
  704. /// AcDMMXMLAttribute objects contained by this object
  705. /// </returns>
  706. const AcDMMXMLAttributeVec& GetXMLAttributes() const
  707. {
  708. return m_XMLAttributes;
  709. }
  710. private:
  711. wchar_t * m_name;
  712. wchar_t * m_value;
  713. wchar_t * m_type;
  714. wchar_t * m_units;
  715. wchar_t * m_category;
  716. AcDMMXMLAttributeVec m_XMLAttributes;
  717. };
  718. typedef AcArray<AcDMMEPlotProperty> AcDMMEPlotPropertyVec;
  719. #endif // AcDMMEPlotProperty_h