Package
Package
#include <icy/pacm/package.h>struct PackageDefined in src/pacm/include/icy/pacm/package.h:26
Inherits:
ValueSubclassed by:LocalPackage,RemotePackage
JSON-backed package metadata shared by local and remote package records.
List of all members
| Name | Kind | Owner |
|---|---|---|
Package | function | Declared here |
Package | function | Declared here |
~Package | function | Declared here |
id | function | Declared here |
name | function | Declared here |
type | function | Declared here |
author | function | Declared here |
description | function | Declared here |
hasExtension | function | Declared here |
extension | function | Declared here |
valid | function | Declared here |
toJson | function | Declared here |
print | function | Declared here |
Public Methods
| Return | Name | Description |
|---|---|---|
Package | Constructs an empty package. | |
Package | Constructs a package from an existing JSON value. | |
std::string | id virtual const | Returns the package unique identifier. |
std::string | name virtual const | Returns the package display name. |
std::string | type virtual const | Returns the package type (e.g. "plugin", "asset"). |
std::string | author virtual const | Returns the package author string. |
std::string | description virtual const | Returns the package description string. |
bool | hasExtension virtual const | Returns true when the package has an "extension" object. |
Extension | extension virtual const | Returns a read-only view of the extension metadata. Throws if no extension object is present. |
bool | valid virtual const | Returns true if id, name and type are all non-empty. |
json::Value | toJson virtual const | Returns a plain JSON copy of this package object. |
void | print virtual const | Dumps the JSON representation of this package to ost. |
Package
Package()Defined in src/pacm/include/icy/pacm/package.h:105
Constructs an empty package.
Package
Package(const json::Value & src)Defined in src/pacm/include/icy/pacm/package.h:109
Constructs a package from an existing JSON value.
Parameters
srcJSON object containing package fields.
id
virtual const
virtual std::string id() constDefined in src/pacm/include/icy/pacm/package.h:113
Returns the package unique identifier.
name
virtual const
virtual std::string name() constDefined in src/pacm/include/icy/pacm/package.h:116
Returns the package display name.
type
virtual const
virtual std::string type() constDefined in src/pacm/include/icy/pacm/package.h:119
Returns the package type (e.g. "plugin", "asset").
author
virtual const
virtual std::string author() constDefined in src/pacm/include/icy/pacm/package.h:122
Returns the package author string.
description
virtual const
virtual std::string description() constDefined in src/pacm/include/icy/pacm/package.h:125
Returns the package description string.
hasExtension
virtual const
virtual bool hasExtension() constDefined in src/pacm/include/icy/pacm/package.h:128
Returns true when the package has an "extension" object.
extension
virtual const
virtual Extension extension() constDefined in src/pacm/include/icy/pacm/package.h:132
Returns a read-only view of the extension metadata. Throws if no extension object is present.
valid
virtual const
virtual bool valid() constDefined in src/pacm/include/icy/pacm/package.h:135
Returns true if id, name and type are all non-empty.
Reimplemented by
toJson
virtual const
virtual json::Value toJson() constDefined in src/pacm/include/icy/pacm/package.h:138
Returns a plain JSON copy of this package object.
virtual const
virtual void print(std::ostream & ost) constDefined in src/pacm/include/icy/pacm/package.h:142
Dumps the JSON representation of this package to ost.
Parameters
ostOutput stream.
