Skip to content

Commit

Permalink
Add license field in Stackage class.
Browse files Browse the repository at this point in the history
  • Loading branch information
130s committed Feb 8, 2017
1 parent 205f5bc commit d513117
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/rospack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ class Stackage
std::string manifest_path_;
// \brief filename of the stackage manifest
std::string manifest_name_;
// \brief package's license with a support for multi-license.
std::vector<std::string> licenses_;
// \brief have we already loaded the manifest?
bool manifest_loaded_;
// \brief TinyXML structure, filled in during parsing
Expand Down Expand Up @@ -182,6 +184,12 @@ class Stackage
name_ = el->GetText();
break;
}
// Get license texts, where there may be multiple elements for.
std::string tagname_license = "license";
for(TiXmlElement* el = root->FirstChildElement(tagname_license); el; el = el->NextSiblingElement(tagname_license ))
{
licenses_.push_back(el->GetText());
}
// check if package is a metapackage
for(TiXmlElement* el = root->FirstChildElement("export"); el; el = el->NextSiblingElement("export"))
{
Expand Down

0 comments on commit d513117

Please sign in to comment.