softwarecontainer  0.18.0-739e8d7 2017-05-04
softwarecontainer::ServiceManifestLoader Class Referenceabstract

Base class used for creating a service manifest loader. More...

#include <servicemanifestloader.h>

Inheritance diagram for softwarecontainer::ServiceManifestLoader:
[legend]

Public Member Functions

 ServiceManifestLoader (const std::string &source)
 Constructs a service manifest loader object and stores the source string. More...
 
virtual ~ServiceManifestLoader ()
 The destructor decref:s the json items in the stored content. More...
 
virtual std::vector< json_t * > loadContent ()=0
 Loads the json content of the service manifest(s) based on the source sent to the constructor. More...
 

Protected Attributes

std::vector< json_t * > m_content
 
const std::string m_source
 

Detailed Description

Base class used for creating a service manifest loader.

ConfigStore uses a loader derived from this class to load service manifests.

Definition at line 34 of file servicemanifestloader.h.

Constructor & Destructor Documentation

softwarecontainer::ServiceManifestLoader::ServiceManifestLoader ( const std::string &  source)
inline

Constructs a service manifest loader object and stores the source string.

Parameters
sourceThe source of the service manifest

Definition at line 44 of file servicemanifestloader.h.

44 : m_source(source) {}
virtual softwarecontainer::ServiceManifestLoader::~ServiceManifestLoader ( )
inlinevirtual

The destructor decref:s the json items in the stored content.

Definition at line 49 of file servicemanifestloader.h.

References loadContent().

49  {
50  for (json_t *item : m_content) {
51  json_decref(item);
52  }
53  }

Here is the call graph for this function:

Member Function Documentation

virtual std::vector<json_t *> softwarecontainer::ServiceManifestLoader::loadContent ( )
pure virtual

Loads the json content of the service manifest(s) based on the source sent to the constructor.

Returns
a vector of json_t corresponding to the content of the service manifest
Exceptions
ConfigStoreErrorif loading of the content was unsuccessful

Implemented in softwarecontainer::ServiceManifestFileLoader.

Referenced by ~ServiceManifestLoader().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: