XMLParser.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. // Copyright 2017 Proyectos y Sistemas de Mantenimiento SL (eProsima).
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. //
  15. #ifndef XML_PARSER_H_
  16. #define XML_PARSER_H_
  17. #include <stdio.h>
  18. #include <fastrtps/transport/TransportDescriptorInterface.h>
  19. #include <fastrtps/attributes/ParticipantAttributes.h>
  20. #include <fastrtps/attributes/PublisherAttributes.h>
  21. #include <fastrtps/attributes/SubscriberAttributes.h>
  22. #include <fastrtps/attributes/RequesterAttributes.hpp>
  23. #include <fastrtps/attributes/ReplierAttributes.hpp>
  24. #include <fastrtps/xmlparser/XMLParserCommon.h>
  25. #include <fastrtps/types/DynamicTypeBuilderPtr.h>
  26. #include <fastrtps/attributes/LibrarySettingsAttributes.h>
  27. #include <map>
  28. #include <string>
  29. namespace tinyxml2 {
  30. class XMLElement;
  31. class XMLDocument;
  32. } // namespace tinyxml2
  33. namespace eprosima {
  34. namespace fastrtps {
  35. namespace xmlparser {
  36. class BaseNode;
  37. template <class T> class DataNode;
  38. typedef std::unique_ptr<BaseNode> up_base_node_t;
  39. typedef std::vector<up_base_node_t> up_base_node_vector_t;
  40. typedef std::map<std::string, std::string> node_att_map_t;
  41. typedef node_att_map_t::iterator node_att_map_it_t;
  42. typedef node_att_map_t::const_iterator node_att_map_cit_t;
  43. typedef std::shared_ptr<fastdds::rtps::TransportDescriptorInterface> sp_transport_t;
  44. typedef std::map<std::string, sp_transport_t> sp_transport_map_t;
  45. typedef types::DynamicTypeBuilder* p_dynamictypebuilder_t;
  46. typedef std::map<std::string, p_dynamictypebuilder_t> p_dynamictype_map_t;
  47. typedef std::unique_ptr<ParticipantAttributes> up_participant_t;
  48. typedef DataNode<ParticipantAttributes> node_participant_t;
  49. typedef node_participant_t* p_node_participant_t;
  50. typedef std::unique_ptr<node_participant_t> up_node_participant_t;
  51. typedef std::unique_ptr<PublisherAttributes> up_publisher_t;
  52. typedef DataNode<PublisherAttributes> node_publisher_t;
  53. typedef node_publisher_t* p_node_publisher_t;
  54. typedef std::unique_ptr<node_publisher_t> up_node_publisher_t;
  55. typedef std::unique_ptr<SubscriberAttributes> up_subscriber_t;
  56. typedef DataNode<SubscriberAttributes> node_subscriber_t;
  57. typedef node_subscriber_t* p_node_subscriber_t;
  58. typedef std::unique_ptr<node_subscriber_t> up_node_subscriber_t;
  59. typedef std::unique_ptr<TopicAttributes> up_topic_t;
  60. typedef DataNode<TopicAttributes> node_topic_t;
  61. typedef node_topic_t* p_node_topic_t;
  62. typedef std::unique_ptr<node_topic_t> up_node_topic_t;
  63. typedef std::unique_ptr<RequesterAttributes> up_requester_t;
  64. typedef DataNode<RequesterAttributes> node_requester_t;
  65. typedef node_requester_t* p_node_requester_t;
  66. typedef std::unique_ptr<node_requester_t> up_node_requester_t;
  67. typedef std::unique_ptr<ReplierAttributes> up_replier_t;
  68. typedef DataNode<ReplierAttributes> node_replier_t;
  69. typedef node_replier_t* p_node_replier_t;
  70. typedef std::unique_ptr<node_replier_t> up_node_replier_t;
  71. /**
  72. * Class XMLParser, used to load XML data.
  73. * @ingroup XMLPARSER_MODULE
  74. */
  75. class XMLParser
  76. {
  77. public:
  78. /**
  79. * Load the default XML file.
  80. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  81. */
  82. RTPS_DllAPI static XMLP_ret loadDefaultXMLFile(
  83. up_base_node_t& root);
  84. /**
  85. * Load a XML file.
  86. * @param filename Name for the file to be loaded.
  87. * @param root Root node.
  88. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  89. */
  90. RTPS_DllAPI static XMLP_ret loadXML(
  91. const std::string& filename,
  92. up_base_node_t& root);
  93. /**
  94. * Load a XML data from buffer.
  95. * @param data XML data to load.
  96. * @param length Length of the XML data.
  97. * @param root Root node.
  98. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  99. */
  100. RTPS_DllAPI static XMLP_ret loadXML(
  101. const char* data,
  102. size_t length,
  103. up_base_node_t& root);
  104. /**
  105. * Load a XML node.
  106. * @param xmlDoc Node to be loaded.
  107. * @param root Root node.
  108. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  109. */
  110. RTPS_DllAPI static XMLP_ret loadXML(
  111. tinyxml2::XMLDocument& xmlDoc,
  112. up_base_node_t& root);
  113. /**
  114. * Load a XML node.
  115. * @param profiles Node to be loaded.
  116. * @param root Root node.
  117. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  118. */
  119. RTPS_DllAPI static XMLP_ret loadXMLProfiles(
  120. tinyxml2::XMLElement& profiles,
  121. up_base_node_t& root);
  122. /**
  123. * Load a XML node.
  124. * @param types Node to be loaded.
  125. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  126. */
  127. RTPS_DllAPI static XMLP_ret loadXMLDynamicTypes(
  128. tinyxml2::XMLElement& types);
  129. protected:
  130. RTPS_DllAPI static XMLP_ret parseXML(
  131. tinyxml2::XMLDocument& xmlDoc,
  132. up_base_node_t& root);
  133. RTPS_DllAPI static XMLP_ret parseXMLProfiles(
  134. tinyxml2::XMLElement& profiles,
  135. up_base_node_t& root);
  136. RTPS_DllAPI static XMLP_ret parseProfiles(
  137. tinyxml2::XMLElement* p_root,
  138. BaseNode& profilesNode);
  139. RTPS_DllAPI static XMLP_ret parseRoot(
  140. tinyxml2::XMLElement* p_root,
  141. BaseNode& rootNode);
  142. /**
  143. * Load a XML log node and parses it. It applies the configuration of the node directly.
  144. * @param p_root Node to be loaded.
  145. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  146. */
  147. RTPS_DllAPI static XMLP_ret parseLogConfig(
  148. tinyxml2::XMLElement* p_root);
  149. RTPS_DllAPI static XMLP_ret parseXMLLibrarySettings(
  150. tinyxml2::XMLElement* p_root);
  151. RTPS_DllAPI static XMLP_ret parseXMLTransportsProf(
  152. tinyxml2::XMLElement* p_root);
  153. RTPS_DllAPI static XMLP_ret parseXMLParticipantProf(
  154. tinyxml2::XMLElement* p_root,
  155. BaseNode& rootNode);
  156. RTPS_DllAPI static XMLP_ret parseXMLPublisherProf(
  157. tinyxml2::XMLElement* p_root,
  158. BaseNode& rootNode);
  159. RTPS_DllAPI static XMLP_ret parseXMLSubscriberProf(
  160. tinyxml2::XMLElement* p_root,
  161. BaseNode& rootNode);
  162. RTPS_DllAPI static XMLP_ret parseXMLTopicData(
  163. tinyxml2::XMLElement* p_root,
  164. BaseNode& rootNode);
  165. RTPS_DllAPI static XMLP_ret parseXMLRequesterProf(
  166. tinyxml2::XMLElement* p_root,
  167. BaseNode& rootNode);
  168. RTPS_DllAPI static XMLP_ret parseXMLReplierProf(
  169. tinyxml2::XMLElement* p_root,
  170. BaseNode& rootNode);
  171. RTPS_DllAPI static XMLP_ret parseXMLTransportData(
  172. tinyxml2::XMLElement* p_root);
  173. RTPS_DllAPI static XMLP_ret parseXMLCommonTransportData(
  174. tinyxml2::XMLElement* p_root,
  175. sp_transport_t p_transport);
  176. RTPS_DllAPI static XMLP_ret parseXMLCommonTCPTransportData(
  177. tinyxml2::XMLElement* p_root,
  178. sp_transport_t p_transport);
  179. RTPS_DllAPI static XMLP_ret parseXMLCommonSharedMemTransportData(
  180. tinyxml2::XMLElement* p_root,
  181. sp_transport_t p_transport);
  182. RTPS_DllAPI static XMLP_ret parse_tls_config(
  183. tinyxml2::XMLElement* p_root,
  184. sp_transport_t tcp_transport);
  185. /**
  186. * Load a XML consumer node and parses it. Adds the parsed consumer to Log directly.
  187. * @param consumer Node to be loaded.
  188. * @return XMLP_ret::XML_OK on success, XMLP_ret::XML_ERROR in other case.
  189. */
  190. RTPS_DllAPI static XMLP_ret parseXMLConsumer(
  191. tinyxml2::XMLElement& consumer);
  192. RTPS_DllAPI static XMLP_ret parseXMLDynamicTypes(
  193. tinyxml2::XMLElement& types);
  194. RTPS_DllAPI static XMLP_ret parseDynamicTypes(
  195. tinyxml2::XMLElement* p_root);
  196. RTPS_DllAPI static XMLP_ret parseXMLTypes(
  197. tinyxml2::XMLElement* p_root);
  198. RTPS_DllAPI static XMLP_ret parseXMLDynamicType(
  199. tinyxml2::XMLElement* p_root);
  200. RTPS_DllAPI static XMLP_ret parseXMLStructDynamicType(
  201. tinyxml2::XMLElement* p_root);
  202. RTPS_DllAPI static XMLP_ret parseXMLUnionDynamicType(
  203. tinyxml2::XMLElement* p_root);
  204. RTPS_DllAPI static XMLP_ret parseXMLEnumDynamicType(
  205. tinyxml2::XMLElement* p_root);
  206. RTPS_DllAPI static XMLP_ret parseXMLAliasDynamicType(
  207. tinyxml2::XMLElement* p_root);
  208. RTPS_DllAPI static XMLP_ret parseXMLBitsetDynamicType(
  209. tinyxml2::XMLElement* p_root);
  210. RTPS_DllAPI static XMLP_ret parseXMLBitmaskDynamicType(
  211. tinyxml2::XMLElement* p_root);
  212. RTPS_DllAPI static p_dynamictypebuilder_t parseXMLBitfieldDynamicType(
  213. tinyxml2::XMLElement* p_root,
  214. p_dynamictypebuilder_t p_dynamictype,
  215. types::MemberId mId,
  216. uint16_t& position);
  217. RTPS_DllAPI static XMLP_ret parseXMLBitvalueDynamicType(
  218. tinyxml2::XMLElement* p_root,
  219. p_dynamictypebuilder_t p_dynamictype,
  220. uint16_t& position);
  221. RTPS_DllAPI static p_dynamictypebuilder_t parseXMLMemberDynamicType(
  222. tinyxml2::XMLElement* p_root,
  223. p_dynamictypebuilder_t p_dynamictype,
  224. types::MemberId mId);
  225. RTPS_DllAPI static p_dynamictypebuilder_t parseXMLMemberDynamicType(
  226. tinyxml2::XMLElement* p_root,
  227. p_dynamictypebuilder_t p_dynamictype,
  228. types::MemberId mId,
  229. const std::string& values);
  230. RTPS_DllAPI static XMLP_ret fillDataNode(
  231. tinyxml2::XMLElement* p_profile,
  232. DataNode<ParticipantAttributes>& participant_node);
  233. RTPS_DllAPI static XMLP_ret fillDataNode(
  234. tinyxml2::XMLElement* p_profile,
  235. DataNode<PublisherAttributes>& publisher_node);
  236. RTPS_DllAPI static XMLP_ret fillDataNode(
  237. tinyxml2::XMLElement* p_profile,
  238. DataNode<SubscriberAttributes>& subscriber_node);
  239. RTPS_DllAPI static XMLP_ret fillDataNode(
  240. tinyxml2::XMLElement* node,
  241. DataNode<TopicAttributes>& topic_node);
  242. RTPS_DllAPI static XMLP_ret fillDataNode(
  243. tinyxml2::XMLElement* node,
  244. DataNode<RequesterAttributes>& requester_node);
  245. RTPS_DllAPI static XMLP_ret fillDataNode(
  246. tinyxml2::XMLElement* node,
  247. DataNode<ReplierAttributes>& replier_node);
  248. template <typename T>
  249. RTPS_DllAPI static void addAllAttributes(
  250. tinyxml2::XMLElement* p_profile,
  251. DataNode<T>& node);
  252. RTPS_DllAPI static XMLP_ret getXMLEnum(
  253. tinyxml2::XMLElement* elem,
  254. fastrtps::IntraprocessDeliveryType * e,
  255. uint8_t ident);
  256. RTPS_DllAPI static XMLP_ret getXMLPropertiesPolicy(
  257. tinyxml2::XMLElement* elem,
  258. rtps::PropertyPolicy& propertiesPolicy,
  259. uint8_t ident);
  260. RTPS_DllAPI static XMLP_ret getXMLHistoryMemoryPolicy(
  261. tinyxml2::XMLElement* elem,
  262. rtps::MemoryManagementPolicy_t& historyMemoryPolicy,
  263. uint8_t ident);
  264. RTPS_DllAPI static XMLP_ret getXMLLocatorList(
  265. tinyxml2::XMLElement* elem,
  266. rtps::LocatorList_t& locatorList,
  267. uint8_t ident);
  268. RTPS_DllAPI static XMLP_ret getXMLLocatorUDPv4(
  269. tinyxml2::XMLElement* elem,
  270. rtps::Locator_t& locator,
  271. uint8_t ident);
  272. RTPS_DllAPI static XMLP_ret getXMLLocatorUDPv6(
  273. tinyxml2::XMLElement* elem,
  274. rtps::Locator_t& locator,
  275. uint8_t ident);
  276. RTPS_DllAPI static XMLP_ret getXMLLocatorTCPv4(
  277. tinyxml2::XMLElement* elem,
  278. rtps::Locator_t& locator,
  279. uint8_t ident);
  280. RTPS_DllAPI static XMLP_ret getXMLLocatorTCPv6(
  281. tinyxml2::XMLElement* elem,
  282. rtps::Locator_t& locator,
  283. uint8_t ident);
  284. RTPS_DllAPI static XMLP_ret getXMLWriterTimes(
  285. tinyxml2::XMLElement* elem,
  286. rtps::WriterTimes& times,
  287. uint8_t ident);
  288. RTPS_DllAPI static XMLP_ret getXMLReaderTimes(
  289. tinyxml2::XMLElement* elem,
  290. rtps::ReaderTimes& times,
  291. uint8_t ident);
  292. RTPS_DllAPI static XMLP_ret getXMLDuration(
  293. tinyxml2::XMLElement* elem,
  294. Duration_t& duration,
  295. uint8_t ident);
  296. RTPS_DllAPI static XMLP_ret getXMLWriterQosPolicies(
  297. tinyxml2::XMLElement* elem,
  298. WriterQos& qos,
  299. uint8_t ident);
  300. RTPS_DllAPI static XMLP_ret getXMLReaderQosPolicies(
  301. tinyxml2::XMLElement* elem,
  302. ReaderQos& qos,
  303. uint8_t ident);
  304. RTPS_DllAPI static XMLP_ret getXMLPublishModeQos(
  305. tinyxml2::XMLElement* elem,
  306. PublishModeQosPolicy& publishMode,
  307. uint8_t ident);
  308. RTPS_DllAPI static XMLP_ret getXMLGroupDataQos(
  309. tinyxml2::XMLElement* elem,
  310. GroupDataQosPolicy& groupData,
  311. uint8_t ident);
  312. RTPS_DllAPI static XMLP_ret getXMLTopicDataQos(
  313. tinyxml2::XMLElement* elem,
  314. TopicDataQosPolicy& topicData,
  315. uint8_t ident);
  316. RTPS_DllAPI static XMLP_ret getXMLPartitionQos(
  317. tinyxml2::XMLElement* elem,
  318. PartitionQosPolicy& partition,
  319. uint8_t ident);
  320. RTPS_DllAPI static XMLP_ret getXMLPresentationQos(
  321. tinyxml2::XMLElement* elem,
  322. PresentationQosPolicy& presentation,
  323. uint8_t ident);
  324. RTPS_DllAPI static XMLP_ret getXMLDestinationOrderQos(
  325. tinyxml2::XMLElement* elem,
  326. DestinationOrderQosPolicy& destinationOrder,
  327. uint8_t ident);
  328. RTPS_DllAPI static XMLP_ret getXMLOwnershipStrengthQos(
  329. tinyxml2::XMLElement* elem,
  330. OwnershipStrengthQosPolicy& ownershipStrength,
  331. uint8_t ident);
  332. RTPS_DllAPI static XMLP_ret getXMLOwnershipQos(
  333. tinyxml2::XMLElement* elem,
  334. OwnershipQosPolicy& ownership,
  335. uint8_t ident);
  336. RTPS_DllAPI static XMLP_ret getXMLTimeBasedFilterQos(
  337. tinyxml2::XMLElement* elem,
  338. TimeBasedFilterQosPolicy& timeBasedFilter,
  339. uint8_t ident);
  340. RTPS_DllAPI static XMLP_ret getXMLUserDataQos(
  341. tinyxml2::XMLElement* elem,
  342. UserDataQosPolicy& userData,
  343. uint8_t ident);
  344. RTPS_DllAPI static XMLP_ret getXMLLifespanQos(
  345. tinyxml2::XMLElement* elem,
  346. LifespanQosPolicy& lifespan,
  347. uint8_t ident);
  348. RTPS_DllAPI static XMLP_ret getXMLReliabilityQos(
  349. tinyxml2::XMLElement* elem,
  350. ReliabilityQosPolicy& reliability,
  351. uint8_t ident);
  352. RTPS_DllAPI static XMLP_ret getXMLLivelinessQos(
  353. tinyxml2::XMLElement* elem,
  354. LivelinessQosPolicy& liveliness,
  355. uint8_t ident);
  356. RTPS_DllAPI static XMLP_ret getXMLLatencyBudgetQos(
  357. tinyxml2::XMLElement* elem,
  358. LatencyBudgetQosPolicy& latencyBudget,
  359. uint8_t ident);
  360. RTPS_DllAPI static XMLP_ret getXMLDeadlineQos(
  361. tinyxml2::XMLElement* elem,
  362. DeadlineQosPolicy& deadline,
  363. uint8_t ident);
  364. RTPS_DllAPI static XMLP_ret getXMLDurabilityServiceQos(
  365. tinyxml2::XMLElement* elem,
  366. DurabilityServiceQosPolicy& durabilityService,
  367. uint8_t ident);
  368. RTPS_DllAPI static XMLP_ret getXMLDurabilityQos(
  369. tinyxml2::XMLElement* elem,
  370. DurabilityQosPolicy& durability,
  371. uint8_t ident);
  372. RTPS_DllAPI static XMLP_ret getXMLTopicAttributes(
  373. tinyxml2::XMLElement* elem,
  374. TopicAttributes& topic,
  375. uint8_t ident);
  376. RTPS_DllAPI static XMLP_ret getXMLHistoryQosPolicy(
  377. tinyxml2::XMLElement* elem,
  378. HistoryQosPolicy& historyQos,
  379. uint8_t ident);
  380. RTPS_DllAPI static XMLP_ret getXMLResourceLimitsQos(
  381. tinyxml2::XMLElement* elem,
  382. ResourceLimitsQosPolicy& resourceLimitsQos,
  383. uint8_t ident);
  384. RTPS_DllAPI static XMLP_ret getXMLContainerAllocationConfig(
  385. tinyxml2::XMLElement* elem,
  386. ResourceLimitedContainerConfig& resourceLimitsQos,
  387. uint8_t ident);
  388. RTPS_DllAPI static XMLP_ret getXMLThroughputController(
  389. tinyxml2::XMLElement* elem,
  390. rtps::ThroughputControllerDescriptor& throughputController,
  391. uint8_t ident);
  392. RTPS_DllAPI static XMLP_ret getXMLPortParameters(
  393. tinyxml2::XMLElement* elem,
  394. rtps::PortParameters& port,
  395. uint8_t ident);
  396. RTPS_DllAPI static XMLP_ret getXMLParticipantAllocationAttributes(
  397. tinyxml2::XMLElement* elem,
  398. rtps::RTPSParticipantAllocationAttributes& allocation,
  399. uint8_t ident);
  400. RTPS_DllAPI static XMLP_ret getXMLRemoteLocatorsAllocationAttributes(
  401. tinyxml2::XMLElement* elem,
  402. rtps::RemoteLocatorsAllocationAttributes& allocation,
  403. uint8_t ident);
  404. RTPS_DllAPI static XMLP_ret getXMLSendBuffersAllocationAttributes(
  405. tinyxml2::XMLElement* elem,
  406. rtps::SendBuffersAllocationAttributes& allocation,
  407. uint8_t ident);
  408. RTPS_DllAPI static XMLP_ret getXMLDiscoverySettings(
  409. tinyxml2::XMLElement* elem,
  410. rtps::DiscoverySettings& settings,
  411. uint8_t ident);
  412. RTPS_DllAPI static XMLP_ret getXMLInitialAnnouncementsConfig(
  413. tinyxml2::XMLElement* elem,
  414. rtps::InitialAnnouncementConfig& config,
  415. uint8_t ident);
  416. RTPS_DllAPI static XMLP_ret getXMLBuiltinAttributes(
  417. tinyxml2::XMLElement* elem,
  418. rtps::BuiltinAttributes& builtin,
  419. uint8_t ident);
  420. RTPS_DllAPI static XMLP_ret getXMLOctetVector(
  421. tinyxml2::XMLElement* elem,
  422. std::vector<rtps::octet>& octetVector,
  423. uint8_t ident);
  424. RTPS_DllAPI static XMLP_ret getXMLInt(
  425. tinyxml2::XMLElement* elem,
  426. int* i,
  427. uint8_t ident);
  428. RTPS_DllAPI static XMLP_ret getXMLUint(
  429. tinyxml2::XMLElement* elem,
  430. unsigned int* ui,
  431. uint8_t ident);
  432. RTPS_DllAPI static XMLP_ret getXMLUint(
  433. tinyxml2::XMLElement* elem,
  434. uint16_t* ui16,
  435. uint8_t ident);
  436. RTPS_DllAPI static XMLP_ret getXMLBool(
  437. tinyxml2::XMLElement* elem,
  438. bool* b,
  439. uint8_t ident);
  440. RTPS_DllAPI static XMLP_ret getXMLEnum(
  441. tinyxml2::XMLElement* elem,
  442. rtps::DiscoveryProtocol_t* e,
  443. uint8_t ident);
  444. RTPS_DllAPI static XMLP_ret getXMLList(
  445. tinyxml2::XMLElement* elem,
  446. rtps::RemoteServerList_t& list,
  447. uint8_t ident);
  448. RTPS_DllAPI static XMLP_ret getXMLEnum(
  449. tinyxml2::XMLElement* elem,
  450. rtps::ParticipantFilteringFlags_t * e,
  451. uint8_t ident);
  452. RTPS_DllAPI static XMLP_ret getXMLRemoteServer(
  453. tinyxml2::XMLElement* elem,
  454. rtps::RemoteServerAttributes& server,
  455. uint8_t ident);
  456. RTPS_DllAPI static XMLP_ret getXMLString(
  457. tinyxml2::XMLElement* elem,
  458. std::string* s,
  459. uint8_t ident);
  460. RTPS_DllAPI static XMLP_ret getXMLTransports(
  461. tinyxml2::XMLElement* elem,
  462. std::vector<std::shared_ptr<fastdds::rtps::TransportDescriptorInterface> >& transports,
  463. uint8_t ident);
  464. RTPS_DllAPI static XMLP_ret getXMLDisablePositiveAcksQos(
  465. tinyxml2::XMLElement* elem,
  466. DisablePositiveACKsQosPolicy& disablePositiveAcks,
  467. uint8_t ident);
  468. RTPS_DllAPI static XMLP_ret getXMLguidPrefix(
  469. tinyxml2::XMLElement* elem,
  470. rtps::GuidPrefix_t& prefix,
  471. uint8_t ident);
  472. RTPS_DllAPI static XMLP_ret getXMLPublisherAttributes(
  473. tinyxml2::XMLElement *elem,
  474. PublisherAttributes &publisher,
  475. uint8_t ident);
  476. RTPS_DllAPI static XMLP_ret getXMLSubscriberAttributes(
  477. tinyxml2::XMLElement *elem,
  478. SubscriberAttributes &subscriber,
  479. uint8_t ident);
  480. };
  481. } // namespace xmlparser
  482. } // namespace fastrtps
  483. } // namespace eprosima
  484. #endif