105 #ifndef ROSPACK_ROSPACK_H 106 #define ROSPACK_ROSPACK_H 108 #include <boost/unordered_set.hpp> 109 #include <boost/unordered_map.hpp> 118 #if 1 // def ROSPACK_API_BACKCOMPAT_V1 151 boost::unordered_map<std::string, std::vector<std::string> >
dups_;
153 Stackage* findWithRecrawl(
const std::string& name);
154 void log(
const std::string& level,
const std::string& msg,
bool append_errno);
155 void clearStackages();
156 void addStackage(
const std::string& path);
157 void crawlDetail(
const std::string& path,
160 bool collect_profile_data,
161 std::vector<DirectoryCrawlRecord*>& profile_data,
162 boost::unordered_set<std::string>& profile_hash);
163 bool isStackage(
const std::string& path);
164 void loadManifest(
Stackage* stackage);
165 void computeDeps(
Stackage* stackage,
bool ignore_errors=
false,
bool ignore_missing=
false);
166 void computeDepsInternal(
Stackage* stackage,
bool ignore_errors,
const std::string& depend_tag,
bool ignore_missing=
false);
167 bool isSysPackage(
const std::string& pkgname);
168 void gatherDeps(
Stackage* stackage,
bool direct,
169 traversal_order_t order,
170 std::vector<Stackage*>& deps,
171 bool no_recursion_on_wet=
false);
172 void gatherDepsFull(
Stackage* stackage,
bool direct,
173 traversal_order_t order,
int depth,
174 boost::unordered_set<Stackage*>& deps_hash,
175 std::vector<Stackage*>& deps,
176 bool get_indented_deps,
177 std::vector<std::string>& indented_deps,
178 bool no_recursion_on_wet=
false);
179 std::string getCachePath();
180 std::string getCacheHash();
183 FILE* validateCache();
184 bool expandExportString(
Stackage* stackage,
185 const std::string& instring,
186 std::string& outstring);
189 std::list<std::list<Stackage*> >& acc_list);
203 const std::string& cache_prefix,
204 const std::string& name,
205 const std::string& tag);
217 virtual const char*
usage() {
return ""; }
229 void crawl(std::vector<std::string> search_path,
bool force);
236 bool inStackage(std::string& name);
243 void setQuiet(
bool quiet);
257 bool getSearchPathFromEnv(std::vector<std::string>& sp);
264 bool find(
const std::string& name, std::string& path);
271 bool contents(
const std::string& name, std::set<std::string>& packages);
279 bool contains(
const std::string& name,
287 void list(std::set<std::pair<std::string, std::string> >& list);
293 void listDuplicates(std::vector<std::string>& dups);
299 void listDuplicatesWithPaths(std::map<std::string, std::vector<std::string> >& dups);
310 bool deps(
const std::string& name,
bool direct, std::vector<std::string>& deps);
321 bool depsOn(
const std::string& name,
bool direct,
322 std::vector<std::string>& deps);
333 bool depsDetail(
const std::string& name,
bool direct, std::vector<Stackage*>& deps);
343 bool depsOnDetail(
const std::string& name,
bool direct,
344 std::vector<Stackage*>& deps,
bool ignore_missing=
false);
354 bool depsManifests(
const std::string& name,
bool direct,
355 std::vector<std::string>& manifests);
369 bool depsMsgSrv(
const std::string& name,
bool direct,
370 std::vector<std::string>& gens);
392 bool depsIndent(
const std::string& name,
bool direct,
393 std::vector<std::string>& deps);
410 bool depsWhy(
const std::string& from,
411 const std::string& to,
412 std::string& output);
424 bool rosdeps(
const std::string& name,
bool direct,
425 std::set<std::string>& rosdeps);
426 void _rosdeps(
Stackage* stackage, std::set<std::string>& rosdeps,
const char* tag_name);
439 bool vcs(
const std::string& name,
bool direct,
440 std::vector<std::string>& vcs);
453 bool cpp_exports(
const std::string& name,
const std::string& type,
454 const std::string& attrib,
bool deps_only,
455 std::vector<std::pair<std::string, bool> >& flags);
462 bool reorder_paths(
const std::string& paths, std::string& reordered);
475 bool exports(
const std::string& name,
const std::string& lang,
476 const std::string& attrib,
bool deps_only,
477 std::vector<std::string>& flags);
486 bool exports_dry_package(
Stackage* stackage,
const std::string& lang,
487 const std::string& attrib,
488 std::vector<std::string>& flags);
500 bool plugins(
const std::string& name,
const std::string& attrib,
501 const std::string& top,
502 std::vector<std::string>& flags);
528 bool profile(
const std::vector<std::string>& search_path,
531 std::vector<std::string>& dirs);
538 void logWarn(
const std::string& msg,
539 bool append_errno =
false);
546 void logError(
const std::string& msg,
547 bool append_errno =
false);
571 virtual const char* usage();
573 virtual std::string get_manifest_type();
591 virtual const char* usage();
593 virtual std::string get_manifest_type();
std::vector< std::string > search_paths_
boost::unordered_map< std::string, Stackage * > stackages_
virtual std::string get_manifest_type()
std::string manifest_name_
boost::unordered_map< std::string, std::vector< std::string > > dups_
std::string cache_prefix_
virtual const char * usage()
Usage string, to be overridden by derived classes.
Package crawler. Create one of these to operate on a package tree. Call public methods inherited from...
const std::string & getName()
Get the name of the tool that's in use (e.g., "rospack" or "rosstack")
The base class for package/stack ("stackage") crawlers. Users of the library should use the functiona...
Stack crawler. Create one of these to operate on a stack tree. Call public methods inherited from Ros...