Package
#include <icy/pacm/package.h>
struct PackageDefined in src/pacm/include/icy/pacm/package.h:26
- Inherits
Value- Subclassed by
LocalPackage,RemotePackage
Public Methods
| Return | Name | Description |
|---|---|---|
Package | Constructs an empty package. | |
Package | Constructs a package from an existing JSON value. | |
~Package virtual noexcept | ||
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
| Parameter | Type | Description |
|---|---|---|
src | const json::Value & | JSON object containing package fields. |
~Package
virtual noexcept
virtual ~Package() noexceptDefined in src/pacm/include/icy/pacm/package.h:110
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
| Parameter | Type | Description |
|---|---|---|
ost | std::ostream & | Output stream. |
