Skip to content

Commit

Permalink
Refs eProsima#1996. Erased useless interfaces and default xml loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicente Monge authored and richiware committed May 29, 2017
1 parent ffb02b4 commit ae29d14
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 94 deletions.
17 changes: 0 additions & 17 deletions .settings/language.settings.xml

This file was deleted.

34 changes: 2 additions & 32 deletions include/fastrtps/xmlparser/XMLProfileParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,48 +63,18 @@ class XMLProfileParser
*/
RTPS_DllAPI static XMLP_ret loadXMLFile(const std::string &filename);
/**
* Load a profiles XML file and then search for the profile specified and fill the structure.
* @param filename Name for the file to be loaded.
* @param profile_name Name for the profile to be used to fill the structure.
* @param atts Structure to be filled.
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
*/
RTPS_DllAPI static XMLP_ret fillParticipantProfileFromXMLFile(const std::string &filename,
const std::string &profile_name,
ParticipantAttributes &atts);
/**
* Load a profiles XML file and then search for the profile specified and fill the structure.
* @param filename Name for the file to be loaded.
* @param profile_name Name for the profile to be used to fill the structure.
* @param atts Structure to be filled.
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
*/
RTPS_DllAPI static XMLP_ret fillPublisherProfileFromXMLFile(const std::string &filename,
const std::string &profile_name,
PublisherAttributes &atts);
/**
* Load a profiles XML file and then search for the profile specified and fill the structure.
* @param filename Name for the file to be loaded.
* Search for the profile specified and fill the structure.
* @param profile_name Name for the profile to be used to fill the structure.
* @param atts Structure to be filled.
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
*/
RTPS_DllAPI static XMLP_ret fillSubscriberProfileFromXMLFile(const std::string &filename,
const std::string &profile_name,
SubscriberAttributes &atts);
RTPS_DllAPI static XMLP_ret fillParticipantProfile(const std::string &profile_name, ParticipantAttributes &atts);
/**
* Search for the profile specified and fill the structure.
* @param profile_name Name for the profile to be used to fill the structure.
* @param atts Structure to be filled.
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
*/
RTPS_DllAPI static XMLP_ret fillParticipantProfile(const std::string &profile_name, ParticipantAttributes &atts);
/**
* Search for the profile specified and fill the structure.
* @param profile_name Name for the profile to be used to fill the structure.
* @param atts Structure to be filled.
* @return XMLP_ret::OK on success, XMLP_ret::ERROR in other case.
*/
RTPS_DllAPI static XMLP_ret fillPublisherProfile(const std::string &profile_name, PublisherAttributes &atts);
/**
* Search for the profile specified and fill the structure.
Expand Down
6 changes: 0 additions & 6 deletions src/cpp/Domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ Participant* Domain::createParticipant(const std::string &participant_profile, P

Participant* Domain::createParticipant(ParticipantAttributes& att,ParticipantListener* listen)
{
if (false == default_xml_profiles_loaded)
{
XMLProfileParser::loadDefaultXMLFile();
default_xml_profiles_loaded = true;
}

Participant* pubsubpar = new Participant();
ParticipantImpl* pspartimpl = new ParticipantImpl(att,pubsubpar,listen);
RTPSParticipant* part = RTPSDomain::createParticipant(att.rtps,&pspartimpl->m_rtps_listener);
Expand Down
39 changes: 0 additions & 39 deletions src/cpp/xmlparser/XMLProfileParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,6 @@ std::map<std::string, PublisherAttributes> XMLProfileParser::m_publisher_profi
std::map<std::string, SubscriberAttributes> XMLProfileParser::m_subscriber_profiles;
std::map<std::string, XMLP_ret> XMLProfileParser::m_xml_files;

XMLP_ret XMLProfileParser::fillParticipantProfileFromXMLFile(const std::string &filename,
const std::string &profile_name,
ParticipantAttributes &atts)
{
if (XMLP_ret::ERROR == XMLProfileParser::loadXMLFile(filename))
{
logError(XMLPROFILEPARSER, "Error parsing file: " << filename);
return XMLP_ret::ERROR;
}

return fillParticipantProfile(profile_name, atts);
}

XMLP_ret XMLProfileParser::fillPublisherProfileFromXMLFile(const std::string &filename,
const std::string &profile_name,
PublisherAttributes &atts)
{
if (XMLP_ret::ERROR == XMLProfileParser::loadXMLFile(filename))
{
logError(XMLPROFILEPARSER, "Error parsing file: " << filename);
return XMLP_ret::ERROR;
}

return fillPublisherProfile(profile_name, atts);
}

XMLP_ret XMLProfileParser::fillSubscriberProfileFromXMLFile(const std::string &filename,
const std::string &profile_name,
SubscriberAttributes &atts)
{
if (XMLP_ret::ERROR == XMLProfileParser::loadXMLFile(filename))
{
logError(XMLPROFILEPARSER, "Error parsing file: " << filename);
return XMLP_ret::ERROR;
}

return fillSubscriberProfile(profile_name, atts);
}

XMLP_ret XMLProfileParser::fillParticipantProfile(const std::string &profile_name, ParticipantAttributes &atts)
{
part_map_iterator_t it = m_participant_profiles.find(profile_name);
Expand Down

0 comments on commit ae29d14

Please sign in to comment.