Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
rospack::Rosstackage Class Reference

The base class for package/stack ("stackage") crawlers. Users of the library should use the functionality provided here through one of the derived classes, Rosstack or Rospack. More...

#include <rospack.h>

Inheritance diagram for rospack::Rosstackage:
Inheritance graph
[legend]

Public Member Functions

void _rosdeps (Stackage *stackage, std::set< std::string > &rosdeps, const char *tag_name)
 
bool contains (const std::string &name, std::string &stack, std::string &path)
 Find the stack that contains a package. More...
 
bool contents (const std::string &name, std::set< std::string > &packages)
 Compute the packages that are contained in a stack. More...
 
bool cpp_exports (const std::string &name, const std::string &type, const std::string &attrib, bool deps_only, std::vector< std::pair< std::string, bool > > &flags)
 Compute cpp exports declared in a package and its dependencies. Used by rosbuild. More...
 
void crawl (std::vector< std::string > search_path, bool force)
 Crawl the filesystem, accumulating a database of stackages. May read results from a cache file instead of crawling. This method should be called before any making any queries (find, list, etc.). More...
 
bool deps (const std::string &name, bool direct, std::vector< std::string > &deps)
 Compute dependencies of a stackage (i.e., stackages that this stackages depends on). More...
 
bool depsDetail (const std::string &name, bool direct, std::vector< Stackage *> &deps)
 Compute dependencies of a stackage (i.e., stackages that this stackages depends on), taking and returning stackage objects.. More...
 
bool depsIndent (const std::string &name, bool direct, std::vector< std::string > &deps)
 Generate indented list of a stackage's dependencies, including duplicates. Intended for visual debugging of dependency structures. More...
 
bool depsManifests (const std::string &name, bool direct, std::vector< std::string > &manifests)
 List the manifests of a stackage's dependencies. Used by rosbuild. More...
 
bool depsMsgSrv (const std::string &name, bool direct, std::vector< std::string > &gens)
 List the marker files in a packages's dependencies that indicate that those packages contain auto-generated message and/or service code. Used by rosbuild. More...
 
bool depsOn (const std::string &name, bool direct, std::vector< std::string > &deps)
 Compute reverse dependencies of a stackage (i.e., stackages that depend on this stackage). Forces crawl. More...
 
bool depsOnDetail (const std::string &name, bool direct, std::vector< Stackage *> &deps, bool ignore_missing=false)
 Compute reverse dependencies of a stackage (i.e., stackages that depend on this stackage), taking and returning stackage objects. Forces crawl. More...
 
bool depsWhy (const std::string &from, const std::string &to, std::string &output)
 Compute all dependency chains from one stackage to another. Intended for visual debugging of dependency structures. More...
 
bool exports (const std::string &name, const std::string &lang, const std::string &attrib, bool deps_only, std::vector< std::string > &flags)
 Compute exports declared in a package and its dependencies. Used by rosbuild. More...
 
bool exports_dry_package (Stackage *stackage, const std::string &lang, const std::string &attrib, std::vector< std::string > &flags)
 Compute exports declared in a dry package. More...
 
bool find (const std::string &name, std::string &path)
 Look for a stackage. More...
 
virtual std::string get_manifest_type ()
 
const std::string & getName ()
 Get the name of the tool that's in use (e.g., "rospack" or "rosstack") More...
 
bool getSearchPathFromEnv (std::vector< std::string > &sp)
 Helper method to construct a directory search path by looking at relevant environment variables. The value of ROS_ROOT goes first, followed by each element of a colon-separated ROS_PACKAGE_PATH. More...
 
bool inStackage (std::string &name)
 Is the current working directory a stackage? More...
 
void list (std::set< std::pair< std::string, std::string > > &list)
 List names and paths of all stackages. More...
 
void listDuplicates (std::vector< std::string > &dups)
 Identify duplicate stackages. Forces crawl. More...
 
void listDuplicatesWithPaths (std::map< std::string, std::vector< std::string > > &dups)
 Identify duplicate stackages and provide their paths. Forces crawl. More...
 
void logError (const std::string &msg, bool append_errno=false)
 Log a error (usually goes to stderr). More...
 
void logWarn (const std::string &msg, bool append_errno=false)
 Log a warning (usually goes to stderr). More...
 
bool plugins (const std::string &name, const std::string &attrib, const std::string &top, std::vector< std::string > &flags)
 Compute exported plugins declared in packages that depend on a package. Forces crawl. Used by rosbuild and roslib. More...
 
bool profile (const std::vector< std::string > &search_path, bool zombie_only, int length, std::vector< std::string > &dirs)
 Report on time taken to crawl for stackages. Intended for use in debugging misconfigured stackage trees. Forces crawl. More...
 
bool reorder_paths (const std::string &paths, std::string &reordered)
 Reorder the paths according to the workspace chaining. More...
 
bool rosdeps (const std::string &name, bool direct, std::set< std::string > &rosdeps)
 Compute rosdep entries that are declared in manifest of a package and its dependencies. Used by rosmake. More...
 
void setQuiet (bool quiet)
 Control warning and error console output. More...
 
virtual const char * usage ()
 Usage string, to be overridden by derived classes. More...
 
bool vcs (const std::string &name, bool direct, std::vector< std::string > &vcs)
 Compute vcs entries that are declared in manifest of a package and its dependencies. Was used by Hudson build scripts; might not be needed. More...
 
virtual ~Rosstackage ()
 Destructor. More...
 

Protected Member Functions

 Rosstackage (const std::string &manifest_name, const std::string &cache_prefix, const std::string &name, const std::string &tag)
 Constructor, only used by derived classes. More...
 

Private Member Functions

void addStackage (const std::string &path)
 
void clearStackages ()
 
void computeDeps (Stackage *stackage, bool ignore_errors=false, bool ignore_missing=false)
 
void computeDepsInternal (Stackage *stackage, bool ignore_errors, const std::string &depend_tag, bool ignore_missing=false)
 
void crawlDetail (const std::string &path, bool force, int depth, bool collect_profile_data, std::vector< DirectoryCrawlRecord *> &profile_data, boost::unordered_set< std::string > &profile_hash)
 
void depsWhyDetail (Stackage *from, Stackage *to, std::list< std::list< Stackage *> > &acc_list)
 
bool expandExportString (Stackage *stackage, const std::string &instring, std::string &outstring)
 
StackagefindWithRecrawl (const std::string &name)
 
void gatherDeps (Stackage *stackage, bool direct, traversal_order_t order, std::vector< Stackage *> &deps, bool no_recursion_on_wet=false)
 
void gatherDepsFull (Stackage *stackage, bool direct, traversal_order_t order, int depth, boost::unordered_set< Stackage *> &deps_hash, std::vector< Stackage *> &deps, bool get_indented_deps, std::vector< std::string > &indented_deps, bool no_recursion_on_wet=false)
 
std::string getCacheHash ()
 
std::string getCachePath ()
 
void initPython ()
 
bool isStackage (const std::string &path)
 
bool isSysPackage (const std::string &pkgname)
 
void loadManifest (Stackage *stackage)
 
void log (const std::string &level, const std::string &msg, bool append_errno)
 
bool readCache ()
 
FILE * validateCache ()
 
void writeCache ()
 

Private Attributes

std::string cache_prefix_
 
bool crawled_
 
boost::unordered_map< std::string, std::vector< std::string > > dups_
 
std::string manifest_name_
 
std::string name_
 
bool quiet_
 
std::vector< std::string > search_paths_
 
boost::unordered_map< std::string, Stackage * > stackages_
 
std::string tag_
 

Detailed Description

The base class for package/stack ("stackage") crawlers. Users of the library should use the functionality provided here through one of the derived classes, Rosstack or Rospack.

Definition at line 141 of file rospack.h.

Constructor & Destructor Documentation

◆ Rosstackage()

rospack::Rosstackage::Rosstackage ( const std::string &  manifest_name,
const std::string &  cache_prefix,
const std::string &  name,
const std::string &  tag 
)
protected

Constructor, only used by derived classes.

Parameters
manifest_nameWhat the manifest is called (e.g., "manifest.xml or stack.xml")
cache_prefixWhat the cache is called (e.g., "rospack_cache" or "rosstack_cache") excluding the appended search path hash
nameName of the tool we're building (e.g., "rospack" or "rosstack")
tagName of the attribute we look for in a "depend" tag in a manifest (e.g., "package" or "stack")

Definition at line 240 of file rospack.cpp.

◆ ~Rosstackage()

rospack::Rosstackage::~Rosstackage ( )
virtual

Destructor.

Definition at line 252 of file rospack.cpp.

Member Function Documentation

◆ _rosdeps()

void rospack::Rosstackage::_rosdeps ( Stackage stackage,
std::set< std::string > &  rosdeps,
const char *  tag_name 
)

Definition at line 734 of file rospack.cpp.

◆ addStackage()

void rospack::Rosstackage::addStackage ( const std::string &  path)
private

Definition at line 1385 of file rospack.cpp.

◆ clearStackages()

void rospack::Rosstackage::clearStackages ( )
private

Definition at line 257 of file rospack.cpp.

◆ computeDeps()

void rospack::Rosstackage::computeDeps ( Stackage stackage,
bool  ignore_errors = false,
bool  ignore_missing = false 
)
private

Definition at line 1576 of file rospack.cpp.

◆ computeDepsInternal()

void rospack::Rosstackage::computeDepsInternal ( Stackage stackage,
bool  ignore_errors,
const std::string &  depend_tag,
bool  ignore_missing = false 
)
private

Definition at line 1610 of file rospack.cpp.

◆ contains()

bool rospack::Rosstackage::contains ( const std::string &  name,
std::string &  stack,
std::string &  path 
)

Find the stack that contains a package.

Parameters
nameThe package to work on.
stackIf the containing stack is found, its name is written here.
pathIf the containing stack is found, its absolute path is written here.
Returns
True if the containing stack could be found, false otherwise.

Definition at line 474 of file rospack.cpp.

◆ contents()

bool rospack::Rosstackage::contents ( const std::string &  name,
std::set< std::string > &  packages 
)

Compute the packages that are contained in a stack.

Parameters
nameThe stack to work on.
packagesThe stack's constituent packages are written here.
Returns
True if the contents could be computed, false otherwise.

Definition at line 448 of file rospack.cpp.

◆ cpp_exports()

bool rospack::Rosstackage::cpp_exports ( const std::string &  name,
const std::string &  type,
const std::string &  attrib,
bool  deps_only,
std::vector< std::pair< std::string, bool > > &  flags 
)

Compute cpp exports declared in a package and its dependencies. Used by rosbuild.

Parameters
nameThe package to work on.
typeThe option to pass to pkg-config for wet packages.
attribThe value of the 'attrib' attribute to search for.
deps_onlyIf true, then only return information from the pacakge's dependencies; if false, then also include the package's own export information.
flagsThe pairs of export flags and is-wet are written here.
Returns
True if the flags were computed, false otherwise.

Definition at line 809 of file rospack.cpp.

◆ crawl()

void rospack::Rosstackage::crawl ( std::vector< std::string >  search_path,
bool  force 
)

Crawl the filesystem, accumulating a database of stackages. May read results from a cache file instead of crawling. This method should be called before any making any queries (find, list, etc.).

Parameters
search_pathList of directories to crawl, in precenence order. Directories should be absolute paths. It's passed by value to allow callers (e.g., find()) to safely pass in search_paths_.
forceIf true, then crawl even if the cache looks valid

Definition at line 360 of file rospack.cpp.

◆ crawlDetail()

void rospack::Rosstackage::crawlDetail ( const std::string &  path,
bool  force,
int  depth,
bool  collect_profile_data,
std::vector< DirectoryCrawlRecord *> &  profile_data,
boost::unordered_set< std::string > &  profile_hash 
)
private

Definition at line 1440 of file rospack.cpp.

◆ deps()

bool rospack::Rosstackage::deps ( const std::string &  name,
bool  direct,
std::vector< std::string > &  deps 
)

Compute dependencies of a stackage (i.e., stackages that this stackages depends on).

Parameters
nameThe stackage to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
depsIf dependencies are computed, then they're written here.
Returns
True if dependencies were computed, false otherwise.

Definition at line 554 of file rospack.cpp.

◆ depsDetail()

bool rospack::Rosstackage::depsDetail ( const std::string &  name,
bool  direct,
std::vector< Stackage *> &  deps 
)

Compute dependencies of a stackage (i.e., stackages that this stackages depends on), taking and returning stackage objects..

Parameters
nameThe stackage to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
depsIf dependencies are computed, then they're written here in stackage objects.
Returns
True if dependencies were computed, false otherwise.

Definition at line 1223 of file rospack.cpp.

◆ depsIndent()

bool rospack::Rosstackage::depsIndent ( const std::string &  name,
bool  direct,
std::vector< std::string > &  deps 
)

Generate indented list of a stackage's dependencies, including duplicates. Intended for visual debugging of dependency structures.

Parameters
nameThe stackage to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
depsList of the stackage's dependencies, with leading spaces to indicate depth, is written here. Print this list to console, with newlines separating each element. Example output:
roscpp_traits
  cpp_common
cpp_common
rostime
  cpp_common
Returns
True if the indented dependencies were computed, false otherwise.

Definition at line 593 of file rospack.cpp.

◆ depsManifests()

bool rospack::Rosstackage::depsManifests ( const std::string &  name,
bool  direct,
std::vector< std::string > &  manifests 
)

List the manifests of a stackage's dependencies. Used by rosbuild.

Parameters
nameThe stackage to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
manifestsThe list of absolute paths to manifests of stackages that the given stackage depends on is written here.
Returns
True if the manifest list was computed, false otherwise.

Definition at line 662 of file rospack.cpp.

◆ depsMsgSrv()

bool rospack::Rosstackage::depsMsgSrv ( const std::string &  name,
bool  direct,
std::vector< std::string > &  gens 
)

List the marker files in a packages's dependencies that indicate that those packages contain auto-generated message and/or service code. Used by rosbuild.

Parameters
nameThe package to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
gensThe list of absolute paths to marker files (e.g., "/opt/ros/electric/stacks/ros_comm/messages/std_msgs/msg_gen/generated") is written here.
Returns
True if the list of files was generated, false otherwise.

Definition at line 1151 of file rospack.cpp.

◆ depsOn()

bool rospack::Rosstackage::depsOn ( const std::string &  name,
bool  direct,
std::vector< std::string > &  deps 
)

Compute reverse dependencies of a stackage (i.e., stackages that depend on this stackage). Forces crawl.

Parameters
nameThe stackage to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
depsIf dependencies are computed, then they're written here.
Returns
True if dependencies were computed, false otherwise.

Definition at line 579 of file rospack.cpp.

◆ depsOnDetail()

bool rospack::Rosstackage::depsOnDetail ( const std::string &  name,
bool  direct,
std::vector< Stackage *> &  deps,
bool  ignore_missing = false 
)

Compute reverse dependencies of a stackage (i.e., stackages that depend on this stackage), taking and returning stackage objects. Forces crawl.

Parameters
nameThe stackage to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
depsList of Stackage objects. If dependencies are computed, then they're written here in stackage objects.
Returns
True if dependencies were computed, false otherwise.

Definition at line 1285 of file rospack.cpp.

◆ depsWhy()

bool rospack::Rosstackage::depsWhy ( const std::string &  from,
const std::string &  to,
std::string &  output 
)

Compute all dependency chains from one stackage to another. Intended for visual debugging of dependency structures.

Parameters
fromThe stackage that depends on.
toThe stackage that is depended on.
outputA list of dependency chains. Print this list to console, with newlines separating each element. Example output:
Dependency chains from roscpp to roslib:
* roscpp -> roslib
* roscpp -> std_msgs -> roslib
* roscpp -> rosgraph_msgs -> std_msgs -> roslib
Returns
True if the dependency chains were computed, false otherwise.

Definition at line 620 of file rospack.cpp.

◆ depsWhyDetail()

void rospack::Rosstackage::depsWhyDetail ( Stackage from,
Stackage to,
std::list< std::list< Stackage *> > &  acc_list 
)
private

Definition at line 1253 of file rospack.cpp.

◆ expandExportString()

bool rospack::Rosstackage::expandExportString ( Stackage stackage,
const std::string &  instring,
std::string &  outstring 
)
private

Definition at line 2177 of file rospack.cpp.

◆ exports()

bool rospack::Rosstackage::exports ( const std::string &  name,
const std::string &  lang,
const std::string &  attrib,
bool  deps_only,
std::vector< std::string > &  flags 
)

Compute exports declared in a package and its dependencies. Used by rosbuild.

Parameters
nameThe package to work on.
langThe value of the 'lang' attribute to search for.
attribThe value of the 'attrib' attribute to search for.
deps_onlyIf true, then only return information from the pacakge's dependencies; if false, then also include the package's own export information.
flagsThe accumulated flags are written here.
Returns
True if the flags were computed, false otherwise.

Definition at line 984 of file rospack.cpp.

◆ exports_dry_package()

bool rospack::Rosstackage::exports_dry_package ( Stackage stackage,
const std::string &  lang,
const std::string &  attrib,
std::vector< std::string > &  flags 
)

Compute exports declared in a dry package.

Parameters
nameThe package to work on.
langThe value of the 'lang' attribute to search for.
attribThe value of the 'attrib' attribute to search for.
flagsThe accumulated flags are written here.
Returns
True if the flags were computed, false otherwise.

Definition at line 1017 of file rospack.cpp.

◆ find()

bool rospack::Rosstackage::find ( const std::string &  name,
std::string &  path 
)

Look for a stackage.

Parameters
nameThe stackage to look for.
pathIf found, the absolute path to the stackage is written here.
Returns
True if the stackage is found, false otherwise.

Definition at line 435 of file rospack.cpp.

◆ findWithRecrawl()

Stackage * rospack::Rosstackage::findWithRecrawl ( const std::string &  name)
private

Definition at line 1206 of file rospack.cpp.

◆ gatherDeps()

void rospack::Rosstackage::gatherDeps ( Stackage stackage,
bool  direct,
traversal_order_t  order,
std::vector< Stackage *> &  deps,
bool  no_recursion_on_wet = false 
)
private

Definition at line 1794 of file rospack.cpp.

◆ gatherDepsFull()

void rospack::Rosstackage::gatherDepsFull ( Stackage stackage,
bool  direct,
traversal_order_t  order,
int  depth,
boost::unordered_set< Stackage *> &  deps_hash,
std::vector< Stackage *> &  deps,
bool  get_indented_deps,
std::vector< std::string > &  indented_deps,
bool  no_recursion_on_wet = false 
)
private

Definition at line 1892 of file rospack.cpp.

◆ get_manifest_type()

virtual std::string rospack::Rosstackage::get_manifest_type ( )
inlinevirtual

Reimplemented in rospack::Rosstack, and rospack::Rospack.

Definition at line 553 of file rospack.h.

◆ getCacheHash()

std::string rospack::Rosstackage::getCacheHash ( )
private

Definition at line 1961 of file rospack.cpp.

◆ getCachePath()

std::string rospack::Rosstackage::getCachePath ( )
private

Definition at line 1913 of file rospack.cpp.

◆ getName()

const std::string& rospack::Rosstackage::getName ( )
inline

Get the name of the tool that's in use (e.g., "rospack" or "rosstack")

Returns
The name of the tool.

Definition at line 248 of file rospack.h.

◆ getSearchPathFromEnv()

bool rospack::Rosstackage::getSearchPathFromEnv ( std::vector< std::string > &  sp)

Helper method to construct a directory search path by looking at relevant environment variables. The value of ROS_ROOT goes first, followed by each element of a colon-separated ROS_PACKAGE_PATH.

Parameters
spThe computed search path is written here.
Returns
True if a search path was computed, false otherwise (e.g., ROS_ROOT not set).

defined(WIN32)

Definition at line 283 of file rospack.cpp.

◆ initPython()

void rospack::Rosstackage::initPython ( )
private

Definition at line 1674 of file rospack.cpp.

◆ inStackage()

bool rospack::Rosstackage::inStackage ( std::string &  name)

Is the current working directory a stackage?

Parameters
nameIf in a stackage, then the stackage's name is written here.
Returns
True if the current working directory contains a manifest file

Definition at line 399 of file rospack.cpp.

◆ isStackage()

bool rospack::Rosstackage::isStackage ( const std::string &  path)
private

Definition at line 317 of file rospack.cpp.

◆ isSysPackage()

bool rospack::Rosstackage::isSysPackage ( const std::string &  pkgname)
private

Definition at line 1685 of file rospack.cpp.

◆ list()

void rospack::Rosstackage::list ( std::set< std::pair< std::string, std::string > > &  list)

List names and paths of all stackages.

Parameters
listPairs of (name,path) are written here.

Definition at line 506 of file rospack.cpp.

◆ listDuplicates()

void rospack::Rosstackage::listDuplicates ( std::vector< std::string > &  dups)

Identify duplicate stackages. Forces crawl.

Parameters
dupsNames of stackages that are found more than once while crawling are written here.

Definition at line 520 of file rospack.cpp.

◆ listDuplicatesWithPaths()

void rospack::Rosstackage::listDuplicatesWithPaths ( std::map< std::string, std::vector< std::string > > &  dups)

Identify duplicate stackages and provide their paths. Forces crawl.

Parameters
dupsNames of stackages that are found more than once while crawling are mapped to the found paths of these packages.

Definition at line 534 of file rospack.cpp.

◆ loadManifest()

void rospack::Rosstackage::loadManifest ( Stackage stackage)
private

Definition at line 1561 of file rospack.cpp.

◆ log()

void rospack::Rosstackage::log ( const std::string &  level,
const std::string &  msg,
bool  append_errno 
)
private

Definition at line 1191 of file rospack.cpp.

◆ logError()

void rospack::Rosstackage::logError ( const std::string &  msg,
bool  append_errno = false 
)

Log a error (usually goes to stderr).

Parameters
msgThe error.
append_errnoIf true, then append a colon, a space, and the return from 'sterror(errno)'.

Definition at line 276 of file rospack.cpp.

◆ logWarn()

void rospack::Rosstackage::logWarn ( const std::string &  msg,
bool  append_errno = false 
)

Log a warning (usually goes to stderr).

Parameters
msgThe warning.
append_errnoIf true, then append a colon, a space, and the return from 'sterror(errno)'.

Definition at line 270 of file rospack.cpp.

◆ plugins()

bool rospack::Rosstackage::plugins ( const std::string &  name,
const std::string &  attrib,
const std::string &  top,
std::vector< std::string > &  flags 
)

Compute exported plugins declared in packages that depend on a package. Forces crawl. Used by rosbuild and roslib.

Parameters
nameThe package to work on.
attribThe value of the 'attrib' attribute to search for.
topIf non-empty, then limit the reverse dependency search to packages that 'top' depends on. Otherwise, examine all packages that depend on 'name'.
flagsThe accumulated flags are written here.
Returns
True if the flags were computed, false otherwise.

Definition at line 1085 of file rospack.cpp.

◆ profile()

bool rospack::Rosstackage::profile ( const std::vector< std::string > &  search_path,
bool  zombie_only,
int  length,
std::vector< std::string > &  dirs 
)

Report on time taken to crawl for stackages. Intended for use in debugging misconfigured stackage trees. Forces crawl.

Parameters
search_pathDirectories to search; passed to crawl().
zombie_onlyIf false, then produce formatted output, with timing information. Example output:
Full tree crawl took 0.014954 seconds.
Directories marked with (*) contain no manifest.  You may
want to delete these directories.
To get just of list of directories without manifests,
re-run the profile with --zombie-only
-------------------------------------------------------------
0.013423   /opt/ros/electric/stacks
0.002989   /opt/ros/electric/stacks/ros_comm
If true, then produce a list of absolute paths that contain no stackages ("zombies"); these directories can likely be safely deleted. Example output:
/opt/ros/electric/stacks/pr2_controllers/trajectory_msgs
/opt/ros/electric/stacks/pr2_controllers/trajectory_msgs/msg
lengthLimit on how many directories to include in report (ordered in decreasing order of time taken to crawl).
dirsProfile output. Print this list to console, with newlines separating each element.

Definition at line 1325 of file rospack.cpp.

◆ readCache()

bool rospack::Rosstackage::readCache ( )
private

Definition at line 1975 of file rospack.cpp.

◆ reorder_paths()

bool rospack::Rosstackage::reorder_paths ( const std::string &  paths,
std::string &  reordered 
)

Reorder the paths according to the workspace chaining.

Parameters
pathsThe paths.
reorderedThe reordered paths are written here.
Returns
True if the pathswere reordered, false otherwise.

Definition at line 920 of file rospack.cpp.

◆ rosdeps()

bool rospack::Rosstackage::rosdeps ( const std::string &  name,
bool  direct,
std::set< std::string > &  rosdeps 
)

Compute rosdep entries that are declared in manifest of a package and its dependencies. Used by rosmake.

Parameters
nameThe package to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
rosdepsList of rosdep entries found in the package and its dependencies is written here.
Returns
True if the rosdep list is computed, false otherwise.

Definition at line 687 of file rospack.cpp.

◆ setQuiet()

void rospack::Rosstackage::setQuiet ( bool  quiet)

Control warning and error console output.

Parameters
quietIf true, then don't output any warnings or errors to console. If false, then output warnings and errors to stderr (default behavior).

Definition at line 311 of file rospack.cpp.

◆ usage()

virtual const char* rospack::Rosstackage::usage ( )
inlinevirtual

Usage string, to be overridden by derived classes.

Returns
Command-line usage statement.

Reimplemented in rospack::Rosstack, and rospack::Rospack.

Definition at line 217 of file rospack.h.

◆ validateCache()

FILE * rospack::Rosstackage::validateCache ( )
private

Definition at line 2105 of file rospack.cpp.

◆ vcs()

bool rospack::Rosstackage::vcs ( const std::string &  name,
bool  direct,
std::vector< std::string > &  vcs 
)

Compute vcs entries that are declared in manifest of a package and its dependencies. Was used by Hudson build scripts; might not be needed.

Parameters
nameThe package to work on.
directIf true, then compute only direct dependencies. If false, then compute full (including indirect) dependencies.
vcsList of vcs entries found in the package and its dependencies is written here.
Returns
True if the vcs list is computed, false otherwise.

Definition at line 761 of file rospack.cpp.

◆ writeCache()

void rospack::Rosstackage::writeCache ( )
private

Definition at line 2005 of file rospack.cpp.

Member Data Documentation

◆ cache_prefix_

std::string rospack::Rosstackage::cache_prefix_
private

Definition at line 145 of file rospack.h.

◆ crawled_

bool rospack::Rosstackage::crawled_
private

Definition at line 146 of file rospack.h.

◆ dups_

boost::unordered_map<std::string, std::vector<std::string> > rospack::Rosstackage::dups_
private

Definition at line 151 of file rospack.h.

◆ manifest_name_

std::string rospack::Rosstackage::manifest_name_
private

Definition at line 144 of file rospack.h.

◆ name_

std::string rospack::Rosstackage::name_
private

Definition at line 147 of file rospack.h.

◆ quiet_

bool rospack::Rosstackage::quiet_
private

Definition at line 149 of file rospack.h.

◆ search_paths_

std::vector<std::string> rospack::Rosstackage::search_paths_
private

Definition at line 150 of file rospack.h.

◆ stackages_

boost::unordered_map<std::string, Stackage*> rospack::Rosstackage::stackages_
private

Definition at line 152 of file rospack.h.

◆ tag_

std::string rospack::Rosstackage::tag_
private

Definition at line 148 of file rospack.h.


The documentation for this class was generated from the following files:


rospack
Author(s): Brian Gerkey, Morgan Quigley, Dirk Thomas
autogenerated on Mon Feb 28 2022 23:32:59