Package::Asset
Asset
#include <icy/pacm/package.h>struct AssetDefined in src/pacm/include/icy/pacm/package.h:60
Archive asset metadata for a specific package build.
List of all members
| Name | Kind | Owner |
|---|---|---|
root | variable | Declared here |
Asset | function | Declared here |
Asset | function | Declared here |
~Asset | function | Declared here |
fileName | function | Declared here |
version | function | Declared here |
sdkVersion | function | Declared here |
checksum | function | Declared here |
url | function | Declared here |
fileSize | function | Declared here |
valid | function | Declared here |
print | function | Declared here |
operator= | function | Declared here |
operator== | function | Declared here |
Public Attributes
| Return | Name | Description |
|---|---|---|
json::Value & | root |
root
json::Value & rootDefined in src/pacm/include/icy/pacm/package.h:101
Public Methods
| Return | Name | Description |
|---|---|---|
Asset | ||
Asset | Defaulted constructor. | |
std::string | fileName virtual const | Returns the archive file name (e.g. "my-plugin-1.0.0.zip"). |
std::string | version virtual const | Returns the package version string (e.g. "1.0.0"). |
std::string | sdkVersion virtual const | Returns the SDK version this asset was built against (e.g. "2.0.0"). |
std::string | checksum virtual const | Returns the asset checksum string, or empty if none is set. |
std::string | url virtual const | Returns the download URL from the mirror list at index. |
int | fileSize virtual const | Returns the uncompressed file size in bytes, or 0 if not set. |
bool | valid virtual const | Returns true if the asset has the minimum required fields (file-name, version, mirrors). |
void | print virtual const | Writes the raw JSON of this asset to ost. |
Asset & | operator= virtual | Copies the backing JSON node from r. |
bool | operator== virtual const | Returns true if file name, version and checksum all match r. |
Asset
Asset(json::Value & src)Defined in src/pacm/include/icy/pacm/package.h:63
Parameters
srcJSON object node that backs this asset.
Asset
Asset(const Asset &) = defaultDefined in src/pacm/include/icy/pacm/package.h:64
Defaulted constructor.
fileName
virtual const
virtual std::string fileName() constDefined in src/pacm/include/icy/pacm/package.h:68
Returns the archive file name (e.g. "my-plugin-1.0.0.zip").
version
virtual const
virtual std::string version() constDefined in src/pacm/include/icy/pacm/package.h:71
Returns the package version string (e.g. "1.0.0").
sdkVersion
virtual const
virtual std::string sdkVersion() constDefined in src/pacm/include/icy/pacm/package.h:74
Returns the SDK version this asset was built against (e.g. "2.0.0").
checksum
virtual const
virtual std::string checksum() constDefined in src/pacm/include/icy/pacm/package.h:77
Returns the asset checksum string, or empty if none is set.
url
virtual const
virtual std::string url(int index = 0) constDefined in src/pacm/include/icy/pacm/package.h:81
Returns the download URL from the mirror list at index.
Parameters
indexZero-based index into the mirrors array.
fileSize
virtual const
virtual int fileSize() constDefined in src/pacm/include/icy/pacm/package.h:84
Returns the uncompressed file size in bytes, or 0 if not set.
valid
virtual const
virtual bool valid() constDefined in src/pacm/include/icy/pacm/package.h:88
Returns true if the asset has the minimum required fields (file-name, version, mirrors).
virtual const
virtual void print(std::ostream & ost) constDefined in src/pacm/include/icy/pacm/package.h:92
Writes the raw JSON of this asset to ost.
Parameters
ostOutput stream.
operator=
virtual
virtual Asset & operator=(const Asset & r)Defined in src/pacm/include/icy/pacm/package.h:96
Copies the backing JSON node from r.
Parameters
rSource asset to copy from.
operator==
virtual const
virtual bool operator==(const Asset & r) constDefined in src/pacm/include/icy/pacm/package.h:99
Returns true if file name, version and checksum all match r.
