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()
      
  | 
  explicit | 
Constructor.
- Parameters
 - 
  
[in] _config The configuration for the client  
◆ ~LocalCache()
      
  | 
  virtual | 
destructor
Member Function Documentation
◆ AllModels()
◆ AllWorlds()
      
  | 
  virtual | 
Get all worlds in offline cache.
- Returns
 - World iterator
 
◆ MatchingModel()
      
  | 
  virtual | 
Get the first model matching all fields on an id.
- Parameters
 - 
  
[in] _id An id with ServerUrl, Owner, and Name all set  
- Returns
 - A model which matches all of _id's parameters.
 
◆ MatchingModels()
      
  | 
  virtual | 
Get all models partially matching an ID.
- Parameters
 - 
  
[in] _id An 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 | 
Get the first world matching all fields on an id.
- Parameters
 - 
  
[in] _id An id with ServerUrl, Owner, and Name all set  
- Returns
 - A world which matches all of _id's parameters.
 
◆ MatchingWorlds()
      
  | 
  virtual | 
Get all worlds partially matching an ID.
- Parameters
 - 
  
[in] _id An 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 | 
Add a model from packed data to the local cache.
- Parameters
 - 
  
[in] _id A completely populated ID [in] _data Compressed content of the model [in] _overwrite Overwrite 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 | 
Add a world from packed data to the local cache.
- Parameters
 - 
  
[out] _id A completely populated ID [in] _data Compressed content of the world [in] _overwrite Overwrite 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: