#include "VersionGraphCfg.h"
Public Member Functions | |
| VersionGraphCfg () | |
| VersionGraphCfg (const VersionGraphCfg &_other)=delete | |
| virtual | ~VersionGraphCfg () |
| VersionGraphCfg & | operator= (const VersionGraphCfg &_other)=delete |
| VersionGraphCfg & | operator= (VersionGraphCfg &&_other) noexcept |
| virtual void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override |
| Add the object contents to the provided JSON object. | |
| virtual void | setFromJsonObject (const ot::ConstJsonObject &_object) override |
| Set the object contents from the provided JSON object. | |
| void | setActiveVersionName (const std::string &_version) |
| const std::string & | getActiveVersionName (void) const |
| Returns the active version name. The active version is the currently active model version. | |
| void | setActiveBranchVersionName (const std::string &_version) |
| const std::string & | getActiveBranchVersionName (void) const |
| Returns the active branch version name. The active branch version is the currently active branch. All parent versions of this version are in the active branch. The first child a version in an active branch belongs to the active branch (after the active branch version, parent versions are handled by the parent). | |
| void | setRootVersion (const std::string &_name, const std::string &_label=std::string(), const std::string &_description=std::string()) |
| void | setRootVersion (VersionGraphVersionCfg *_version) |
| Set the provided version as the root version. The current root version will be. | |
| VersionGraphVersionCfg * | getRootVersion (void) |
| Returns the root version. The VersionGraphCfg keeps ownership of the version. | |
| const VersionGraphVersionCfg * | getRootVersion (void) const |
| Returns the root version. The VersionGraphCfg keeps ownership of the version. | |
| VersionGraphVersionCfg * | findVersion (const std::string &_version) |
| Returns the version with the given name. | |
| const VersionGraphVersionCfg * | findVersion (const std::string &_version) const |
| Returns the version with the given name. | |
| bool | versionStartingWithNameExists (const std::string &_prefix) |
| Returns true if a version with the given name prefix exists in any of the versions. | |
| void | removeVersion (const std::string &_version) |
| Removes the version and all of its childs if the version exists. | |
| void | clear (void) |
| \breif Clear the version graph. | |
Public Member Functions inherited from ot::Serializable | |
| Serializable () | |
| virtual | ~Serializable () |
| ot::VersionGraphCfg::VersionGraphCfg | ( | ) |
|
delete |
|
virtual |
|
overridevirtual |
Add the object contents to the provided JSON object.
| _object | Json object reference to write the data to. |
| _allocator | Allocator. |
Implements ot::Serializable.
| void ot::VersionGraphCfg::clear | ( | void | ) |
\breif Clear the version graph.
| ot::VersionGraphVersionCfg * ot::VersionGraphCfg::findVersion | ( | const std::string & | _version | ) |
Returns the version with the given name.
| const ot::VersionGraphVersionCfg * ot::VersionGraphCfg::findVersion | ( | const std::string & | _version | ) | const |
Returns the version with the given name.
|
inline |
Returns the active branch version name. The active branch version is the currently active branch. All parent versions of this version are in the active branch. The first child a version in an active branch belongs to the active branch (after the active branch version, parent versions are handled by the parent).
|
inline |
Returns the active version name. The active version is the currently active model version.
|
inline |
Returns the root version. The VersionGraphCfg keeps ownership of the version.
|
inline |
Returns the root version. The VersionGraphCfg keeps ownership of the version.
|
delete |
|
noexcept |
| void ot::VersionGraphCfg::removeVersion | ( | const std::string & | _version | ) |
Removes the version and all of its childs if the version exists.
|
inline |
|
inline |
|
overridevirtual |
Set the object contents from the provided JSON object.
| _object | The JSON object containing the information. |
| May | throw an exception if the provided object is not valid (members missing or invalid types). |
Implements ot::Serializable.
| void ot::VersionGraphCfg::setRootVersion | ( | const std::string & | _name, |
| const std::string & | _label = std::string(), | ||
| const std::string & | _description = std::string() ) |
| void ot::VersionGraphCfg::setRootVersion | ( | VersionGraphVersionCfg * | _version | ) |
Set the provided version as the root version. The current root version will be.
| bool ot::VersionGraphCfg::versionStartingWithNameExists | ( | const std::string & | _prefix | ) |
Returns true if a version with the given name prefix exists in any of the versions.