Skip to content

Commit ae29d14

Browse files
Vicente Mongerichiware
Vicente Monge
authored andcommittedMay 29, 2017
Refs #1996. Erased useless interfaces and default xml loading.
1 parent ffb02b4 commit ae29d14

File tree

4 files changed

+2
-94
lines changed

4 files changed

+2
-94
lines changed
 

‎.settings/language.settings.xml

-17
This file was deleted.

‎include/fastrtps/xmlparser/XMLProfileParser.h

+2-32
Original file line numberDiff line numberDiff line change
@@ -63,48 +63,18 @@ class XMLProfileParser
6363
*/
6464
RTPS_DllAPI static XMLP_ret loadXMLFile(const std::string &filename);
6565
/**
66-
* Load a profiles XML file and then search for the profile specified and fill the structure.
67-
* @param filename Name for the file to be loaded.
68-
* @param profile_name Name for the profile to be used to fill the structure.
69-
* @param atts Structure to be filled.
70-
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
71-
*/
72-
RTPS_DllAPI static XMLP_ret fillParticipantProfileFromXMLFile(const std::string &filename,
73-
const std::string &profile_name,
74-
ParticipantAttributes &atts);
75-
/**
76-
* Load a profiles XML file and then search for the profile specified and fill the structure.
77-
* @param filename Name for the file to be loaded.
78-
* @param profile_name Name for the profile to be used to fill the structure.
79-
* @param atts Structure to be filled.
80-
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
81-
*/
82-
RTPS_DllAPI static XMLP_ret fillPublisherProfileFromXMLFile(const std::string &filename,
83-
const std::string &profile_name,
84-
PublisherAttributes &atts);
85-
/**
86-
* Load a profiles XML file and then search for the profile specified and fill the structure.
87-
* @param filename Name for the file to be loaded.
66+
* Search for the profile specified and fill the structure.
8867
* @param profile_name Name for the profile to be used to fill the structure.
8968
* @param atts Structure to be filled.
9069
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
9170
*/
92-
RTPS_DllAPI static XMLP_ret fillSubscriberProfileFromXMLFile(const std::string &filename,
93-
const std::string &profile_name,
94-
SubscriberAttributes &atts);
71+
RTPS_DllAPI static XMLP_ret fillParticipantProfile(const std::string &profile_name, ParticipantAttributes &atts);
9572
/**
9673
* Search for the profile specified and fill the structure.
9774
* @param profile_name Name for the profile to be used to fill the structure.
9875
* @param atts Structure to be filled.
9976
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
10077
*/
101-
RTPS_DllAPI static XMLP_ret fillParticipantProfile(const std::string &profile_name, ParticipantAttributes &atts);
102-
/**
103-
* Search for the profile specified and fill the structure.
104-
* @param profile_name Name for the profile to be used to fill the structure.
105-
* @param atts Structure to be filled.
106-
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
107-
*/
10878
RTPS_DllAPI static XMLP_ret fillPublisherProfile(const std::string &profile_name, PublisherAttributes &atts);
10979
/**
11080
* Search for the profile specified and fill the structure.

‎src/cpp/Domain.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,6 @@ Participant* Domain::createParticipant(const std::string &participant_profile, P
153153

154154
Participant* Domain::createParticipant(ParticipantAttributes& att,ParticipantListener* listen)
155155
{
156-
if (false == default_xml_profiles_loaded)
157-
{
158-
XMLProfileParser::loadDefaultXMLFile();
159-
default_xml_profiles_loaded = true;
160-
}
161-
162156
Participant* pubsubpar = new Participant();
163157
ParticipantImpl* pspartimpl = new ParticipantImpl(att,pubsubpar,listen);
164158
RTPSParticipant* part = RTPSDomain::createParticipant(att.rtps,&pspartimpl->m_rtps_listener);

‎src/cpp/xmlparser/XMLProfileParser.cpp

-39
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,6 @@ std::map<std::string, PublisherAttributes> XMLProfileParser::m_publisher_profi
1111
std::map<std::string, SubscriberAttributes> XMLProfileParser::m_subscriber_profiles;
1212
std::map<std::string, XMLP_ret> XMLProfileParser::m_xml_files;
1313

14-
XMLP_ret XMLProfileParser::fillParticipantProfileFromXMLFile(const std::string &filename,
15-
const std::string &profile_name,
16-
ParticipantAttributes &atts)
17-
{
18-
if (XMLP_ret::ERROR == XMLProfileParser::loadXMLFile(filename))
19-
{
20-
logError(XMLPROFILEPARSER, "Error parsing file: " << filename);
21-
return XMLP_ret::ERROR;
22-
}
23-
24-
return fillParticipantProfile(profile_name, atts);
25-
}
26-
27-
XMLP_ret XMLProfileParser::fillPublisherProfileFromXMLFile(const std::string &filename,
28-
const std::string &profile_name,
29-
PublisherAttributes &atts)
30-
{
31-
if (XMLP_ret::ERROR == XMLProfileParser::loadXMLFile(filename))
32-
{
33-
logError(XMLPROFILEPARSER, "Error parsing file: " << filename);
34-
return XMLP_ret::ERROR;
35-
}
36-
37-
return fillPublisherProfile(profile_name, atts);
38-
}
39-
40-
XMLP_ret XMLProfileParser::fillSubscriberProfileFromXMLFile(const std::string &filename,
41-
const std::string &profile_name,
42-
SubscriberAttributes &atts)
43-
{
44-
if (XMLP_ret::ERROR == XMLProfileParser::loadXMLFile(filename))
45-
{
46-
logError(XMLPROFILEPARSER, "Error parsing file: " << filename);
47-
return XMLP_ret::ERROR;
48-
}
49-
50-
return fillSubscriberProfile(profile_name, atts);
51-
}
52-
5314
XMLP_ret XMLProfileParser::fillParticipantProfile(const std::string &profile_name, ParticipantAttributes &atts)
5415
{
5516
part_map_iterator_t it = m_participant_profiles.find(profile_name);

0 commit comments

Comments
 (0)
Please sign in to comment.