Gazebo Fuel_tools

API Reference

9.1.0
ModelIdentifier Class Reference

Defines how to identify a model. More...

#include <ModelIdentifier.hh>

Public Member Functions

 ModelIdentifier ()
 Constructor. More...
 
 ModelIdentifier (const ModelIdentifier &_orig)
 Copy Constructor. More...
 
 ~ModelIdentifier ()
 Destructor. More...
 
std::string AsPrettyString (const std::string &_prefix="") const
 Returns all the available model information as a string using colors for better human parsing. More...
 
std::string AsString (const std::string &_prefix="") const
 Returns all the model information as a string. Convenient for debugging. More...
 
std::string Description () const
 Returns the description of the model. More...
 
uint32_t DownloadCount () const
 Returns the number of downloads for the model. More...
 
unsigned int FileSize () const
 Returns the file size of the model in bytes. More...
 
std::string LicenseImageUrl () const
 Returns the license image URL. More...
 
std::string LicenseName () const
 Returns the license name. More...
 
std::string LicenseUrl () const
 Returns the license URL. More...
 
uint32_t LikeCount () const
 Returns the number of "likes" for the model. More...
 
std::time_t ModifyDate () const
 Returns the modify date of the model. More...
 
std::string Name () const
 Returns just the last part of the model name. More...
 
bool operator!= (const ModelIdentifier &_rhs) const
 Inequality operator. More...
 
ModelIdentifieroperator= (const ModelIdentifier &_orig)
 Assignment operator. More...
 
bool operator== (const ModelIdentifier &_rhs) const
 Equality operator. More...
 
std::string Owner () const
 Returns owner to attribute model to. More...
 
bool Private () const
 Returns the privacy setting of the model. More...
 
ServerConfigServer () const
 Returns server information to retrieve model from. More...
 
bool SetDescription (const std::string &_desc)
 Set the description of the model. More...
 
bool SetDownloadCount (const uint32_t _downloads)
 Set the number of downloads of the model. More...
 
bool SetFileSize (const unsigned int _filesize)
 Set the file size of the model in bytes. More...
 
bool SetLicenseImageUrl (const std::string &_url)
 Set the license image URL of the model. More...
 
bool SetLicenseName (const std::string &_name)
 Set the license name of the model. More...
 
bool SetLicenseUrl (const std::string &_url)
 Set the license URL of the model. More...
 
bool SetLikeCount (const uint32_t _likes)
 Set the number of "likes" of the model. More...
 
bool SetModifyDate (const std::time_t &_date)
 Set the modify date. More...
 
bool SetName (const std::string &_name)
 set the name of the model. More...
 
bool SetOwner (const std::string &_name)
 Set the owner of the model. More...
 
void SetPrivate (bool _private) const
 Set the privacy setting of the model. More...
 
bool SetServer (const ServerConfig &_server)
 Set the server from which this model comes. More...
 
bool SetTags (const std::vector< std::string > &_tags)
 Set the list of tags of the model. More...
 
bool SetUploadDate (const std::time_t &_date)
 Set the upload date. More...
 
bool SetVersion (const unsigned int _version)
 Set the model's version. Versions are integers counting from 1. More...
 
bool SetVersionStr (const std::string &_version)
 Set the model's version. Versions are integers counting from 1 or "tip" for the latest version. More...
 
std::vector< std::stringTags () const
 Returns the collection of tags. More...
 
std::string UniqueName () const
 Returns a unique name for the model. More...
 
std::time_t UploadDate () const
 Returns the upload date of the model. More...
 
gz::common::URI Url () const
 Returns a URL for the model. More...
 
unsigned int Version () const
 Returns the model's version as a number. Versions are integers counting from 1. Version zero means the tip. More...
 
std::string VersionStr () const
 Returns the model'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 model.

Constructor & Destructor Documentation

◆ ModelIdentifier() [1/2]

Constructor.

◆ ModelIdentifier() [2/2]

ModelIdentifier ( const ModelIdentifier _orig)

Copy Constructor.

Parameters
[in]_origModelIdentifier to copy.

◆ ~ModelIdentifier()

Destructor.

Member Function Documentation

◆ AsPrettyString()

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

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

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

◆ AsString()

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

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

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

◆ Description()

std::string Description ( ) const

Returns the description of the model.

Returns
Model description.

◆ DownloadCount()

uint32_t DownloadCount ( ) const

Returns the number of downloads for the model.

Returns
Number of downloads.

◆ FileSize()

unsigned int FileSize ( ) const

Returns the file size of the model in bytes.

Returns
Model file size in bytes.

◆ LicenseImageUrl()

std::string LicenseImageUrl ( ) const

Returns the license image URL.

Returns
License image URL.

◆ LicenseName()

std::string LicenseName ( ) const

Returns the license name.

Returns
License name.

◆ LicenseUrl()

std::string LicenseUrl ( ) const

Returns the license URL.

Returns
License URL.

◆ LikeCount()

uint32_t LikeCount ( ) const

Returns the number of "likes" for the model.

Returns
Number of "likes".

◆ ModifyDate()

std::time_t ModifyDate ( ) const

Returns the modify date of the model.

Returns
Model modify date.

◆ Name()

std::string Name ( ) const

Returns just the last part of the model name.

Returns
Model name.

◆ operator!=()

bool operator!= ( const ModelIdentifier _rhs) const

Inequality operator.

Parameters
[in]_rhsModelIdentifier to compare.
Returns
True if the ModelIdentifier names are not equal.

◆ operator=()

ModelIdentifier& operator= ( const ModelIdentifier _orig)

Assignment operator.

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

◆ operator==()

bool operator== ( const ModelIdentifier _rhs) const

Equality operator.

Parameters
[in]_rhsModelIdentifier to compare.
Returns
True if the ModelIdentifier names are equal.

◆ Owner()

std::string Owner ( ) const

Returns owner to attribute model to.

Returns
Owner name.

◆ Private()

bool Private ( ) const

Returns the privacy setting of the model.

Returns
True if the model is private, false if the model is public.

◆ Server()

ServerConfig& Server ( ) const

Returns server information to retrieve model from.

Returns
Server information.

◆ SetDescription()

bool SetDescription ( const std::string _desc)

Set the description of the model.

Parameters
[in]_descThe description
Returns
True if successful.

◆ SetDownloadCount()

bool SetDownloadCount ( const uint32_t  _downloads)

Set the number of downloads of the model.

Parameters
[in]_downloadsNumber of downloads.
Returns
True if successful.

◆ SetFileSize()

bool SetFileSize ( const unsigned int  _filesize)

Set the file size of the model in bytes.

Parameters
[in]_filesizeThe model's file size in bytes.
Returns
True if successful.

◆ SetLicenseImageUrl()

bool SetLicenseImageUrl ( const std::string _url)

Set the license image URL of the model.

Parameters
[in]_urlThe URL.
Returns
True if successful.

◆ SetLicenseName()

bool SetLicenseName ( const std::string _name)

Set the license name of the model.

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

◆ SetLicenseUrl()

bool SetLicenseUrl ( const std::string _url)

Set the license URL of the model.

Parameters
[in]_urlThe URL.
Returns
True if successful.

◆ SetLikeCount()

bool SetLikeCount ( const uint32_t  _likes)

Set the number of "likes" of the model.

Parameters
[in]_likesNumber of "likes".
Returns
True if successful.

◆ SetModifyDate()

bool SetModifyDate ( const std::time_t _date)

Set the modify date.

Returns
True if successful

◆ SetName()

bool SetName ( const std::string _name)

set the name of the model.

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

◆ SetOwner()

bool SetOwner ( const std::string _name)

Set the owner of the model.

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

◆ SetPrivate()

void SetPrivate ( bool  _private) const

Set the privacy setting of the model.

Parameters
[in]Trueindicates the model is private, false indicates the model is public.

◆ SetServer()

bool SetServer ( const ServerConfig _server)

Set the server from which this model comes.

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

◆ SetTags()

bool SetTags ( const std::vector< std::string > &  _tags)

Set the list of tags of the model.

Parameters
[in]_tagsThe tags.
Returns
True if successful.

◆ SetUploadDate()

bool SetUploadDate ( const std::time_t _date)

Set the upload date.

Parameters
[in]_dateUpload date.
Returns
True if successful.

◆ SetVersion()

bool SetVersion ( const unsigned int  _version)

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

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

◆ SetVersionStr()

bool SetVersionStr ( const std::string _version)

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

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

◆ Tags()

std::vector<std::string> Tags ( ) const

Returns the collection of tags.

Returns
The collection of tags.

◆ UniqueName()

std::string UniqueName ( ) const

Returns a unique name for the model.

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

◆ UploadDate()

std::time_t UploadDate ( ) const

Returns the upload date of the model.

Returns
Model upload date.

◆ Url()

gz::common::URI Url ( ) const

Returns a URL for the model.

Remarks
this is Server/Owner/Name.

◆ Version()

unsigned int Version ( ) const

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

Returns
Model's version.
See also
VersionStr
SetVersion

◆ VersionStr()

std::string VersionStr ( ) const

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

Returns
Model's version.
See also
Version
SetVersionStr

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