Gazebo Fuel_tools

API Reference

7.3.1
LocalCache Class Reference

Class for managing stuff in the local cache. More...

#include <LocalCache.hh>

Public Member Functions

 LocalCache (const ClientConfig *_config)
 Constructor. More...
 
virtual ~LocalCache ()
 destructor More...
 
virtual ModelIter AllModels ()
 Get all models in offline cache. More...
 
virtual WorldIter AllWorlds () const
 Get all worlds in offline cache. More...
 
virtual Model MatchingModel (const ModelIdentifier &_id)
 Get the first model matching all fields on an id. More...
 
virtual ModelIter MatchingModels (const ModelIdentifier &_id)
 Get all models partially matching an ID. More...
 
virtual bool MatchingWorld (WorldIdentifier &_id) const
 Get the first world matching all fields on an id. More...
 
virtual WorldIter MatchingWorlds (const WorldIdentifier &_id) const
 Get all worlds partially matching an ID. More...
 
virtual bool SaveModel (const ModelIdentifier &_id, const std::string &_data, const bool _overwrite)
 Add a model from packed data to the local cache. More...
 
virtual bool SaveWorld (WorldIdentifier &_id, const std::string &_data, const bool _overwrite)
 Add a world from packed data to the local cache. More...
 

Detailed Description

Class for managing stuff in the local cache.

Constructor & Destructor Documentation

◆ LocalCache()

LocalCache ( const ClientConfig _config)
explicit

Constructor.

Parameters
[in]_configThe configuration for the client

◆ ~LocalCache()

virtual ~LocalCache ( )
virtual

destructor

Member Function Documentation

◆ AllModels()

virtual ModelIter AllModels ( )
virtual

Get all models in offline cache.

Returns
Model iterator

◆ AllWorlds()

virtual WorldIter AllWorlds ( ) const
virtual

Get all worlds in offline cache.

Returns
World iterator

◆ MatchingModel()

virtual Model MatchingModel ( const ModelIdentifier _id)
virtual

Get the first model matching all fields on an id.

Parameters
[in]_idAn id with ServerUrl, Owner, and Name all set
Returns
A model which matches all of _id's parameters.

◆ MatchingModels()

virtual ModelIter MatchingModels ( const ModelIdentifier _id)
virtual

Get all models partially matching an ID.

Parameters
[in]_idAn id with at least one of ServerURL, Owner, and Name
Returns
An iterator with all models that match all fields that are set on _id.

◆ MatchingWorld()

virtual bool MatchingWorld ( WorldIdentifier _id) const
virtual

Get the first world matching all fields on an id.

Parameters
[in]_idAn id with ServerUrl, Owner, and Name all set
Returns
A world which matches all of _id's parameters.

◆ MatchingWorlds()

virtual WorldIter MatchingWorlds ( const WorldIdentifier _id) const
virtual

Get all worlds partially matching an ID.

Parameters
[in]_idAn id with at least one of ServerUrl, Owner, and Name
Returns
An iterator with all worlds that match all fields that are set on _id.

◆ SaveModel()

virtual bool SaveModel ( const ModelIdentifier _id,
const std::string _data,
const bool  _overwrite 
)
virtual

Add a model from packed data to the local cache.

Parameters
[in]_idA completely populated ID
[in]_dataCompressed content of the model
[in]_overwriteOverwrite model if already exists.
Returns
True if the model was successfully added to the local cache, and the model contains a model.config file.

◆ SaveWorld()

virtual bool SaveWorld ( WorldIdentifier _id,
const std::string _data,
const bool  _overwrite 
)
virtual

Add a world from packed data to the local cache.

Parameters
[out]_idA completely populated ID
[in]_dataCompressed content of the world
[in]_overwriteOverwrite world if already exists.
Returns
True if the world was successfully added to the local cache

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