#include "VersionGraphVersionCfg.h"
Public Types | |
typedef long | VersionNumberType |
Public Member Functions | |
VersionGraphVersionCfg () | |
VersionGraphVersionCfg (const std::string &_versionName, const std::string &_label=std::string(), const std::string &_description=std::string()) | |
Assignment constructor. ot::VersionGraphVersionCfg::getName. | |
VersionGraphVersionCfg (const VersionGraphVersionCfg &_other) | |
VersionGraphVersionCfg (VersionGraphVersionCfg &&_other) noexcept | |
virtual | ~VersionGraphVersionCfg () |
VersionGraphVersionCfg & | operator= (const VersionGraphVersionCfg &_other) |
VersionGraphVersionCfg & | operator= (VersionGraphVersionCfg &&_other) noexcept |
bool | operator== (const std::string &_name) const |
Returns true if the version name is equal to the provided name. | |
bool | operator!= (const std::string &_name) const |
Returns true if the version name is not equal to the provided name. | |
void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override |
Add the object contents to the provided JSON object. | |
void | setFromJsonObject (const ot::ConstJsonObject &_object) override |
Set the object contents from the provided JSON object. | |
void | setName (const std::string &_name) |
const std::string & | getName (void) const |
Returns the version name. The name is used to identify the version in a graph. The name will be displayed on the version. The name must follow the following syntax: | |
std::string | getBranchName (void) const |
Returns the name of this versions branch. getName. | |
std::string | getBranchNodeName (void) const |
Returns the name of the branch node. If this version is "2.1.1" the branch node is version "2". | |
void | setLabel (const std::string &_title) |
const std::string & | getLabel (void) const |
Returns the version label. The label will be displayed on the version if it is not empty. | |
void | setDescription (const std::string &_description) |
const std::string & | getDescription (void) const |
void | setParentVersion (const std::string &_version) |
const std::string & | getParentVersion (void) const |
void | setDirectParentIsHidden (bool _isHidden) |
bool | getDirectParentIsHidden (void) const |
If the direct parent is hidden the connection line will be displayed as a dashed line. | |
VersionNumberType | getVersionNumber (void) const |
getVersionNumber | |
std::vector< VersionNumberType > | getVersionNumbers (void) const |
bool | isValid (void) const |
bool | isOnActivePath (const std::string &_activeBranchName) const |
Public Member Functions inherited from ot::Serializable | |
Serializable () | |
virtual | ~Serializable () |
Static Public Member Functions | |
static VersionGraphVersionCfg | createBranchNodeFromBranch (const std::string &_branch) |
static VersionNumberType | getVersionNumber (const std::string &_version) |
Returns the number of the version of the versions branch. Will only take into account the version number of the last branch. For example: "11.22.3" will have the value 3. | |
static std::vector< VersionNumberType > | getVersionNumbers (const std::string &_version) |
static bool | isValid (const std::string &_versionName) |
Returns true if the version name matches the version name syntax. | |
static bool | isOnActivePath (const std::string &_versionName, const std::string &_activeBranchName) |
typedef long ot::VersionGraphVersionCfg::VersionNumberType |
ot::VersionGraphVersionCfg::VersionGraphVersionCfg | ( | ) |
ot::VersionGraphVersionCfg::VersionGraphVersionCfg | ( | const std::string & | _versionName, |
const std::string & | _label = std::string(), | ||
const std::string & | _description = std::string() ) |
Assignment constructor. ot::VersionGraphVersionCfg::getName.
ot::VersionGraphVersionCfg::VersionGraphVersionCfg | ( | const VersionGraphVersionCfg & | _other | ) |
|
noexcept |
|
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.
|
static |
std::string ot::VersionGraphVersionCfg::getBranchName | ( | void | ) | const |
Returns the name of this versions branch. getName.
std::string ot::VersionGraphVersionCfg::getBranchNodeName | ( | void | ) | const |
Returns the name of the branch node. If this version is "2.1.1" the branch node is version "2".
|
inline |
|
inline |
If the direct parent is hidden the connection line will be displayed as a dashed line.
|
inline |
Returns the version label. The label will be displayed on the version if it is not empty.
|
inline |
Returns the version name. The name is used to identify the version in a graph. The name will be displayed on the version.
The name must follow the following syntax:
|
inline |
|
static |
Returns the number of the version of the versions branch. Will only take into account the version number of the last branch. For example:
"11.22.3" will have the value 3.
|
inline |
|
static |
std::vector< ot::VersionGraphVersionCfg::VersionNumberType > ot::VersionGraphVersionCfg::getVersionNumbers | ( | void | ) | const |
bool ot::VersionGraphVersionCfg::isOnActivePath | ( | const std::string & | _activeBranchName | ) | const |
|
static |
|
static |
Returns true if the version name matches the version name syntax.
bool ot::VersionGraphVersionCfg::isValid | ( | void | ) | const |
bool ot::VersionGraphVersionCfg::operator!= | ( | const std::string & | _name | ) | const |
Returns true if the version name is not equal to the provided name.
ot::VersionGraphVersionCfg & ot::VersionGraphVersionCfg::operator= | ( | const VersionGraphVersionCfg & | _other | ) |
|
noexcept |
bool ot::VersionGraphVersionCfg::operator== | ( | const std::string & | _name | ) | const |
Returns true if the version name is equal to the provided name.
|
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.
|
inline |
|
inline |
|
inline |