Pacm module

Package

JSON-backed package metadata shared by local and remote package records.

Package

#include <icy/pacm/package.h>

Inherits: Value Subclassed by: LocalPackage, RemotePackage

JSON-backed package metadata shared by local and remote package records.

Public Methods

ReturnNameDescription
PackageConstructs an empty package.
PackageConstructs a package from an existing JSON value.
std::stringid virtual constReturns the package unique identifier.
std::stringname virtual constReturns the package display name.
std::stringtype virtual constReturns the package type (e.g. "plugin", "asset").
std::stringauthor virtual constReturns the package author string.
std::stringdescription virtual constReturns the package description string.
boolvalid virtual constReturns true if id, name and type are all non-empty.
json::ValuetoJson virtual constReturns a plain JSON copy of this package object.
voidprint virtual constDumps the JSON representation of this package to ost.

Package

Package()

Constructs an empty package.


Package

Package(const json::Value & src)

Constructs a package from an existing JSON value.

Parameters

  • src JSON object containing package fields.

id

virtual const

virtual std::string id() const

Returns the package unique identifier.


name

virtual const

virtual std::string name() const

Returns the package display name.


type

virtual const

virtual std::string type() const

Returns the package type (e.g. "plugin", "asset").


author

virtual const

virtual std::string author() const

Returns the package author string.


description

virtual const

virtual std::string description() const

Returns the package description string.


valid

virtual const

virtual bool valid() const

Returns true if id, name and type are all non-empty.


toJson

virtual const

virtual json::Value toJson() const

Returns a plain JSON copy of this package object.


print

virtual const

virtual void print(std::ostream & ost) const

Dumps the JSON representation of this package to ost.

Parameters

  • ost Output stream.