Gazebo Fuel_tools

API Reference

4.9.1
WorldIdentifier Class Reference

Defines how to identify a world. More...

#include <WorldIdentifier.hh>

Public Member Functions

 WorldIdentifier ()
 Constructor. More...
 
 WorldIdentifier (const WorldIdentifier &_orig)
 Copy Constructor. More...
 
 ~WorldIdentifier ()
 Destructor. More...
 
std::string AsPrettyString (const std::string &_prefix="") const
 Returns all the available world information as a string using colors for better human parsing. More...
 
std::string AsString (const std::string &_prefix="") const
 Returns all the world information as a string. Convenient for debugging. More...
 
std::string LocalPath () const
 Returns a path to the world on disk if it is already cached. More...
 
std::string Name () const
 Returns the world name. More...
 
WorldIdentifieroperator= (const WorldIdentifier &_orig)
 Assignment operator. More...
 
bool operator== (const WorldIdentifier &_rhs) const
 Equality operator. More...
 
std::string Owner () const
 Returns owner to attribute world to. More...
 
ServerConfigServer () const
 Returns server information to retrieve world from. More...
 
bool SetLocalPath (const std::string &_path)
 Sets the path of the world in the local cache. More...
 
bool SetName (const std::string &_name)
 Set the name of the world. More...
 
bool SetOwner (const std::string &_name)
 Set the owner of the world. More...
 
bool SetServer (const ServerConfig &_server)
 Set the server from which this world comes. More...
 
bool SetVersion (const unsigned int _version)
 Set the world's version. Versions are integers counting from 1. More...
 
bool SetVersionStr (const std::string &_version)
 Set the world's version. Versions are integers counting from 1 or "tip" for the latest version. More...
 
std::string UniqueName () const
 Returns a unique name for the world. More...
 
unsigned int Version () const
 Returns the world's version as a number. Versions are integers counting from 1. Version zero means the tip. More...
 
std::string VersionStr () const
 Returns the world's version as a string. Versions are integers counting from 1. The strings "tip" or "" mean the latest version. More...
 

Detailed Description

Defines how to identify a world.

Constructor & Destructor Documentation

◆ WorldIdentifier() [1/2]

Constructor.

◆ WorldIdentifier() [2/2]

WorldIdentifier ( const WorldIdentifier _orig)

Copy Constructor.

Parameters
[in]_origWorldIdentifier to copy.

◆ ~WorldIdentifier()

Destructor.

Member Function Documentation

◆ AsPrettyString()

std::string AsPrettyString ( const std::string _prefix = "") const

Returns all the available world information as a string using colors for better human parsing.

Parameters
[in]_prefixOptional prefix for every line of the string.
Returns
World information string

◆ AsString()

std::string AsString ( const std::string _prefix = "") const

Returns all the world information as a string. Convenient for debugging.

Parameters
[in]_prefixOptional prefix for every line of the string.
Returns
World information string

◆ LocalPath()

std::string LocalPath ( ) const

Returns a path to the world on disk if it is already cached.

Returns
Path, or empty string if the path has not been set
See also
SetLocalPath

◆ Name()

std::string Name ( ) const

Returns the world name.

Returns
World name.

◆ operator=()

WorldIdentifier& operator= ( const WorldIdentifier _orig)

Assignment operator.

Parameters
[in]_origWorldIdentifier to copy.
Returns
Reference to this object.

◆ operator==()

bool operator== ( const WorldIdentifier _rhs) const

Equality operator.

Parameters
[in]_rhsWorldIdentifier to compare.
Returns
True if the WorldIdentifier names are equal.

◆ Owner()

std::string Owner ( ) const

Returns owner to attribute world to.

Returns
Owner name.

◆ Server()

ServerConfig& Server ( ) const

Returns server information to retrieve world from.

Returns
Server information.

◆ SetLocalPath()

bool SetLocalPath ( const std::string _path)

Sets the path of the world in the local cache.

Parameters
[in]Localpath to world.
See also
LocalPath

◆ SetName()

bool SetName ( const std::string _name)

Set the name of the world.

Parameters
[in]_nameThe name to set.
Returns
True if successful.

◆ SetOwner()

bool SetOwner ( const std::string _name)

Set the owner of the world.

Parameters
[in]_nameThe name to set. Must be ascii and pass [-_a-z0-9]+
Returns
true if successful

◆ SetServer()

bool SetServer ( const ServerConfig _server)

Set the server from which this world comes.

Parameters
[in]_serverThe server to retrieve the world from.
Returns
True if successful.

◆ SetVersion()

bool SetVersion ( const unsigned int  _version)

Set the world's version. Versions are integers counting from 1.

Parameters
[in]_versionThe world's version
Returns
True if successful.
See also
Version
SetVersionStr

◆ SetVersionStr()

bool SetVersionStr ( const std::string _version)

Set the world's version. Versions are integers counting from 1 or "tip" for the latest version.

Parameters
[in]_versionThe world's version
Returns
True if successful.
See also
VersionStr
SetVersion

◆ UniqueName()

std::string UniqueName ( ) const

Returns a unique name for the world.

Remarks
this is Server/Owner/Name.
Returns
Unique world name.

◆ Version()

unsigned int Version ( ) const

Returns the world's version as a number. Versions are integers counting from 1. Version zero means the tip.

Returns
World's version.
See also
VersionStr
SetVersion

◆ VersionStr()

std::string VersionStr ( ) const

Returns the world's version as a string. Versions are integers counting from 1. The strings "tip" or "" mean the latest version.

Returns
World's version.
See also
Version
SetVersionStr

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