applied patch from #3193 to put TinyXML symbols in a namespace
This commit is contained in:
parent
0be37cd645
commit
5578c6143c
|
@ -192,7 +192,7 @@ public:
|
|||
std::vector<std::pair<std::string, std::string> > plugins();
|
||||
VecPkg descendants1();
|
||||
const std::vector<Package *> &descendants(int depth=0);
|
||||
TiXmlElement *manifest_root();
|
||||
rospack_tinyxml::TiXmlElement *manifest_root();
|
||||
void accumulate_deps(AccList& acc_list, Package* to);
|
||||
|
||||
/**
|
||||
|
@ -207,7 +207,7 @@ public:
|
|||
private:
|
||||
bool deps_calculated, direct_deps_calculated, descendants_calculated;
|
||||
std::vector<Package *> _deps, _direct_deps, _descendants;
|
||||
TiXmlDocument manifest;
|
||||
rospack_tinyxml::TiXmlDocument manifest;
|
||||
bool manifest_loaded;
|
||||
|
||||
Package(const Package &p) { } // just override the default public one
|
||||
|
|
|
@ -89,12 +89,12 @@ public:
|
|||
std::string manifest_path();
|
||||
VecStack descendants1();
|
||||
const VecStack &descendants(int depth=0);
|
||||
TiXmlElement *manifest_root();
|
||||
rospack_tinyxml::TiXmlElement *manifest_root();
|
||||
|
||||
private:
|
||||
bool deps_calculated, direct_deps_calculated, descendants_calculated;
|
||||
VecStack _deps, _direct_deps, _descendants;
|
||||
TiXmlDocument manifest;
|
||||
rospack_tinyxml::TiXmlDocument manifest;
|
||||
bool manifest_loaded;
|
||||
|
||||
Stack(const Stack &p) { } // just override the default public one
|
||||
|
|
|
@ -229,8 +229,8 @@ string Package::flags(string lang, string attrib)
|
|||
string Package::rosdep()
|
||||
{
|
||||
string sd;
|
||||
TiXmlElement *mroot = manifest_root();
|
||||
for(TiXmlElement *sd_ele = mroot->FirstChildElement("rosdep");
|
||||
rospack_tinyxml::TiXmlElement *mroot = manifest_root();
|
||||
for(rospack_tinyxml::TiXmlElement *sd_ele = mroot->FirstChildElement("rosdep");
|
||||
sd_ele;
|
||||
sd_ele = sd_ele->NextSiblingElement("rosdep"))
|
||||
{
|
||||
|
@ -246,8 +246,8 @@ string Package::rosdep()
|
|||
string Package::versioncontrol()
|
||||
{
|
||||
string sd;
|
||||
TiXmlElement *mroot = manifest_root();
|
||||
for(TiXmlElement *sd_ele = mroot->FirstChildElement("versioncontrol");
|
||||
rospack_tinyxml::TiXmlElement *mroot = manifest_root();
|
||||
for(rospack_tinyxml::TiXmlElement *sd_ele = mroot->FirstChildElement("versioncontrol");
|
||||
sd_ele;
|
||||
sd_ele = sd_ele->NextSiblingElement("versioncontrol"))
|
||||
{
|
||||
|
@ -397,11 +397,11 @@ const vector<Package *> &Package::direct_deps(bool missing_package_as_warning)
|
|||
#ifdef VERBOSE_DEBUG
|
||||
fprintf(stderr, "calculating direct deps for package [%s]\n", name.c_str());
|
||||
#endif
|
||||
TiXmlElement *mroot = manifest_root();
|
||||
TiXmlNode *dep_node = 0;
|
||||
rospack_tinyxml::TiXmlElement *mroot = manifest_root();
|
||||
rospack_tinyxml::TiXmlNode *dep_node = 0;
|
||||
while ((dep_node = mroot->IterateChildren(string("depend"), dep_node)))
|
||||
{
|
||||
TiXmlElement *dep_ele = dep_node->ToElement();
|
||||
rospack_tinyxml::TiXmlElement *dep_ele = dep_node->ToElement();
|
||||
assert(dep_ele);
|
||||
const char *dep_pkgname = dep_ele->Attribute("package");
|
||||
if (!dep_pkgname)
|
||||
|
@ -497,14 +497,14 @@ string Package::cpp_message_flags(bool cflags, bool lflags)
|
|||
|
||||
string Package::direct_flags(string lang, string attrib)
|
||||
{
|
||||
TiXmlElement *mroot = manifest_root();
|
||||
TiXmlElement *export_ele = mroot->FirstChildElement("export");
|
||||
rospack_tinyxml::TiXmlElement *mroot = manifest_root();
|
||||
rospack_tinyxml::TiXmlElement *export_ele = mroot->FirstChildElement("export");
|
||||
string str;
|
||||
if (export_ele)
|
||||
{
|
||||
bool os_match = false;
|
||||
TiXmlElement *best_usage = NULL;
|
||||
for (TiXmlElement *lang_ele = export_ele->FirstChildElement(lang);
|
||||
rospack_tinyxml::TiXmlElement *best_usage = NULL;
|
||||
for (rospack_tinyxml::TiXmlElement *lang_ele = export_ele->FirstChildElement(lang);
|
||||
lang_ele; lang_ele = lang_ele->NextSiblingElement(lang))
|
||||
{
|
||||
const char *os_str;
|
||||
|
@ -644,10 +644,10 @@ void Package::load_manifest()
|
|||
}
|
||||
}
|
||||
|
||||
TiXmlElement *Package::manifest_root()
|
||||
rospack_tinyxml::TiXmlElement *Package::manifest_root()
|
||||
{
|
||||
load_manifest();
|
||||
TiXmlElement *ele = manifest.RootElement();
|
||||
rospack_tinyxml::TiXmlElement *ele = manifest.RootElement();
|
||||
if (!ele)
|
||||
{
|
||||
string errmsg = string("error parsing manifest file at [") + manifest_path().c_str() + string("]");
|
||||
|
|
|
@ -106,7 +106,7 @@ const string g_ros_os("osx");
|
|||
// to keep rosstack happy (rospack's lib links directly to tinyxml.cpp,
|
||||
// rosstack's lib does not).
|
||||
// I'll fix this later. Thanks, MS, for creating yet another broken system.
|
||||
const int TiXmlBase::utf8ByteTable[256] =
|
||||
const int rospack_tinyxml::TiXmlBase::utf8ByteTable[256] =
|
||||
{
|
||||
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00
|
||||
|
@ -126,7 +126,7 @@ const int TiXmlBase::utf8ByteTable[256] =
|
|||
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte
|
||||
4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid
|
||||
};
|
||||
bool TiXmlBase::condenseWhiteSpace = true;
|
||||
bool rospack_tinyxml::TiXmlBase::condenseWhiteSpace = true;
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -321,11 +321,11 @@ const VecStack &Stack::direct_deps(bool missing_stack_as_warning)
|
|||
#ifdef VERBOSE_DEBUG
|
||||
printf("calculating direct deps for package [%s]\n", name.c_str());
|
||||
#endif
|
||||
TiXmlElement *mroot = manifest_root();
|
||||
TiXmlNode *dep_node = 0;
|
||||
rospack_tinyxml::TiXmlElement *mroot = manifest_root();
|
||||
rospack_tinyxml::TiXmlNode *dep_node = 0;
|
||||
while ((dep_node = mroot->IterateChildren(string("depend"), dep_node)))
|
||||
{
|
||||
TiXmlElement *dep_ele = dep_node->ToElement();
|
||||
rospack_tinyxml::TiXmlElement *dep_ele = dep_node->ToElement();
|
||||
assert(dep_ele);
|
||||
const char *dep_stackname = dep_ele->Attribute("stack");
|
||||
if (!dep_stackname)
|
||||
|
@ -378,13 +378,13 @@ void Stack::load_manifest()
|
|||
manifest_loaded = true;
|
||||
throw runtime_error(errmsg);
|
||||
}
|
||||
TiXmlElement *mroot = manifest.RootElement();
|
||||
rospack_tinyxml::TiXmlElement *mroot = manifest.RootElement();
|
||||
}
|
||||
|
||||
TiXmlElement *Stack::manifest_root()
|
||||
rospack_tinyxml::TiXmlElement *Stack::manifest_root()
|
||||
{
|
||||
load_manifest();
|
||||
TiXmlElement *ele = manifest.RootElement();
|
||||
rospack_tinyxml::TiXmlElement *ele = manifest.RootElement();
|
||||
if (!ele)
|
||||
{
|
||||
string errmsg = string("error parsing manifest file at [") + manifest_path().c_str() + string("]");
|
||||
|
|
|
@ -31,6 +31,8 @@ distribution.
|
|||
|
||||
#include "tinystr.h"
|
||||
|
||||
namespace rospack_tinyxml {
|
||||
|
||||
// Error value for find primitive
|
||||
const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1);
|
||||
|
||||
|
@ -112,5 +114,5 @@ TiXmlString operator + (const char* a, const TiXmlString & b)
|
|||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endif // TIXML_USE_STL
|
||||
|
|
|
@ -56,6 +56,7 @@ distribution.
|
|||
#define TIXML_EXPLICIT
|
||||
#endif
|
||||
|
||||
namespace rospack_tinyxml {
|
||||
|
||||
/*
|
||||
TiXmlString is an emulation of a subset of the std::string template.
|
||||
|
@ -315,5 +316,7 @@ public :
|
|||
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
#endif // TIXML_STRING_INCLUDED
|
||||
#endif // TIXML_USE_STL
|
||||
|
|
|
@ -31,6 +31,7 @@ distribution.
|
|||
|
||||
#include "tinyxml.h"
|
||||
|
||||
namespace rospack_tinyxml {
|
||||
|
||||
bool TiXmlBase::condenseWhiteSpace = true;
|
||||
|
||||
|
@ -1886,3 +1887,5 @@ bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown )
|
|||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -94,6 +94,9 @@ distribution.
|
|||
#define TINYXML_EXPORT
|
||||
#endif
|
||||
|
||||
|
||||
namespace rospack_tinyxml {
|
||||
|
||||
class TiXmlDocument;
|
||||
class TiXmlElement;
|
||||
class TiXmlComment;
|
||||
|
@ -1805,6 +1808,7 @@ private:
|
|||
TIXML_STRING lineBreak;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( pop )
|
||||
|
|
|
@ -31,6 +31,8 @@ distribution.
|
|||
// It also cleans up the code a bit.
|
||||
//
|
||||
|
||||
namespace rospack_tinyxml {
|
||||
|
||||
const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
|
||||
{
|
||||
"No error",
|
||||
|
@ -51,3 +53,5 @@ const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
|
|||
"Error parsing CDATA.",
|
||||
"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ distribution.
|
|||
# endif
|
||||
#endif
|
||||
|
||||
namespace rospack_tinyxml {
|
||||
|
||||
// Note tha "PutString" hardcodes the same list. This
|
||||
// is less flexible than it appears. Changing the entries
|
||||
// or order will break putstring.
|
||||
|
@ -1636,3 +1638,4 @@ bool TiXmlText::Blank() const
|
|||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue