#include <Manifest.h>
Classes | |
struct | Asset |
Asset object. More... | |
struct | AssetDiff |
Object indicate the difference between two Assets. More... | |
Public Types | |
enum | DiffType { ADDED, DELETED, MODIFIED } |
The type of difference. More... | |
enum | DownloadState { UNSTARTED, DOWNLOADING, SUCCESSED } |
Public Member Functions | |
bool | isVersionLoaded () const |
Check whether the version informations have been fully loaded. More... | |
bool | isLoaded () const |
Check whether the manifest have been fully loaded. More... | |
const std::string & | getPackageUrl () const |
Gets remote package url. More... | |
local | getPackageUrl () |
Gets remote package url. More... | |
const std::string & | getManifestFileUrl () const |
Gets remote manifest file url. More... | |
const std::string & | getVersionFileUrl () const |
Gets remote version file url. More... | |
const std::string & | getVersion () const |
Gets manifest version. More... | |
std::vector< std::string > | getSearchPaths () const |
Get the search paths list related to the Manifest. More... | |
local | getSearchPaths () |
Get the search paths list related to the Manifest. More... | |
![]() | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Protected Member Functions | |
Manifest (const std::string &manifestUrl="") | |
Constructor for Manifest class. More... | |
void | loadJson (const std::string &url) |
Load the json file into local json object. More... | |
void | parseVersion (const std::string &versionUrl) |
Parse the version file information into this manifest. More... | |
void | parse (const std::string &manifestUrl) |
Parse the manifest file information into this manifest. More... | |
bool | versionEquals (const Manifest *b) const |
Check whether the version of this manifest equals to another. More... | |
std::unordered_map < std::string, AssetDiff > | genDiff (const Manifest *b) const |
Generate difference between this Manifest and another. More... | |
void | genResumeAssetsList (Downloader::DownloadUnits *units) const |
Generate resuming download assets list. More... | |
void | prependSearchPaths () |
Prepend all search paths to the FileUtils. More... | |
void | loadVersion (const rapidjson::Document &json) |
void | loadManifest (const rapidjson::Document &json) |
void | saveToFile (const std::string &filepath) |
Asset | parseAsset (const std::string &path, const rapidjson::Value &json) |
local | parseAsset ( local path, local json) |
void | clear () |
const std::vector< std::string > & | getGroups () const |
Gets all groups. More... | |
local | getGroups () |
Gets all groups. More... | |
const std::unordered_map < std::string, std::string > & | getGroupVerions () const |
Gets all groups version. More... | |
var | getGroupVerions () |
Gets all groups version. More... | |
local | getGroupVerions () |
Gets all groups version. More... | |
const std::string & | getGroupVersion (const std::string &group) const |
Gets version for the given group. More... | |
local | getGroupVersion ( local group) |
Gets version for the given group. More... | |
const std::unordered_map < std::string, Asset > & | getAssets () const |
Gets assets. More... | |
void | setAssetDownloadState (const std::string &key, const DownloadState &state) |
Set the download state for an asset. More... | |
var | setAssetDownloadState ( var key, var state) |
Set the download state for an asset. More... | |
local | setAssetDownloadState ( local key, local state) |
Set the download state for an asset. More... | |
![]() | |
Ref () | |
Constructor. More... | |
Ref () | |
Constructor. More... | |
Friends | |
class | AssetsManagerEx |
Additional Inherited Members | |
![]() | |
unsigned int | _referenceCount |
count of references More... | |
local | _referenceCount |
count of references More... | |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
protected |
Constructor for Manifest class.
manifestUrl | Url of the local manifest |
|
protected |
Constructor for Manifest class.
manifestUrl | Url of the local manifest |
|
protected |
Constructor for Manifest class.
manifestUrl | Url of the local manifest |
|
protected |
|
protected |
|
protected |
Generate difference between this Manifest and another.
b | The other manifest |
|
protected |
Generate difference between this Manifest and another.
b | The other manifest |
|
protected |
Generate difference between this Manifest and another.
b | The other manifest |
|
protected |
Generate resuming download assets list.
units | The download units reference to be modified by the generation result |
|
protected |
Generate resuming download assets list.
units | The download units reference to be modified by the generation result |
|
protected |
Generate resuming download assets list.
units | The download units reference to be modified by the generation result |
|
protected |
Gets assets.
|
protected |
Gets assets.
|
protected |
Gets assets.
|
protected |
Gets all groups.
|
protected |
Gets all groups.
|
protected |
Gets all groups.
|
protected |
Gets all groups version.
|
protected |
Gets all groups version.
|
protected |
Gets all groups version.
|
protected |
Gets version for the given group.
group | Key of the requested group |
|
protected |
Gets version for the given group.
group | Key of the requested group |
|
protected |
Gets version for the given group.
group | Key of the requested group |
const std::string& getManifestFileUrl |
( | ) | const |
Gets remote manifest file url.
var getManifestFileUrl | ( | ) |
Gets remote manifest file url.
local getManifestFileUrl | ( | ) |
Gets remote manifest file url.
const std::string& getPackageUrl | ( | ) | const |
Gets remote package url.
var getPackageUrl | ( | ) |
Gets remote package url.
local getPackageUrl | ( | ) |
Gets remote package url.
std::vector<std::string> getSearchPaths |
( | ) | const |
Get the search paths list related to the Manifest.
var getSearchPaths | ( | ) |
Get the search paths list related to the Manifest.
local getSearchPaths | ( | ) |
Get the search paths list related to the Manifest.
const std::string& getVersion | ( | ) | const |
Gets manifest version.
var getVersion | ( | ) |
Gets manifest version.
local getVersion | ( | ) |
Gets manifest version.
const std::string& getVersionFileUrl |
( | ) | const |
Gets remote version file url.
var getVersionFileUrl | ( | ) |
Gets remote version file url.
local getVersionFileUrl | ( | ) |
Gets remote version file url.
bool isLoaded | ( | ) | const |
Check whether the manifest have been fully loaded.
var isLoaded | ( | ) |
Check whether the manifest have been fully loaded.
local isLoaded | ( | ) |
Check whether the manifest have been fully loaded.
bool isVersionLoaded | ( | ) | const |
Check whether the version informations have been fully loaded.
var isVersionLoaded | ( | ) |
Check whether the version informations have been fully loaded.
local isVersionLoaded | ( | ) |
Check whether the version informations have been fully loaded.
|
protected |
Load the json file into local json object.
url | Url of the json file |
|
protected |
Load the json file into local json object.
url | Url of the json file |
|
protected |
Load the json file into local json object.
url | Url of the json file |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Parse the manifest file information into this manifest.
manifestUrl | Url of the local manifest |
|
protected |
Parse the manifest file information into this manifest.
manifestUrl | Url of the local manifest |
|
protected |
Parse the manifest file information into this manifest.
manifestUrl | Url of the local manifest |
|
protected |
|
protected |
|
protected |
|
protected |
Parse the version file information into this manifest.
versionUrl | Url of the local version file |
|
protected |
Parse the version file information into this manifest.
versionUrl | Url of the local version file |
|
protected |
Parse the version file information into this manifest.
versionUrl | Url of the local version file |
|
protected |
Prepend all search paths to the FileUtils.
|
protected |
Prepend all search paths to the FileUtils.
|
protected |
Prepend all search paths to the FileUtils.
|
protected |
|
protected |
|
protected |
|
protected |
Set the download state for an asset.
key | Key of the asset to set |
state | The current download state of the asset |
|
protected |
Set the download state for an asset.
key | Key of the asset to set |
state | The current download state of the asset |
|
protected |
Set the download state for an asset.
key | Key of the asset to set |
state | The current download state of the asset |
|
protected |
Check whether the version of this manifest equals to another.
b | The other manifest |
|
protected |
Check whether the version of this manifest equals to another.
b | The other manifest |
|
protected |
Check whether the version of this manifest equals to another.
b | The other manifest |
|
friend |
|
friend |
|
friend |