OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::VersionGraphVersionCfg Class Reference

#include "VersionGraphVersionCfg.h"

Inheritance diagram for ot::VersionGraphVersionCfg:
ot::Serializable

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 ()
 
VersionGraphVersionCfgoperator= (const VersionGraphVersionCfg &_other)
 
VersionGraphVersionCfgoperator= (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< VersionNumberTypegetVersionNumbers (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< VersionNumberTypegetVersionNumbers (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)
 

Member Typedef Documentation

◆ VersionNumberType

Constructor & Destructor Documentation

◆ VersionGraphVersionCfg() [1/4]

ot::VersionGraphVersionCfg::VersionGraphVersionCfg ( )

◆ VersionGraphVersionCfg() [2/4]

ot::VersionGraphVersionCfg::VersionGraphVersionCfg ( const std::string & _versionName,
const std::string & _label = std::string(),
const std::string & _description = std::string() )

Assignment constructor. ot::VersionGraphVersionCfg::getName.

◆ VersionGraphVersionCfg() [3/4]

ot::VersionGraphVersionCfg::VersionGraphVersionCfg ( const VersionGraphVersionCfg & _other)

◆ VersionGraphVersionCfg() [4/4]

ot::VersionGraphVersionCfg::VersionGraphVersionCfg ( VersionGraphVersionCfg && _other)
noexcept

◆ ~VersionGraphVersionCfg()

ot::VersionGraphVersionCfg::~VersionGraphVersionCfg ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::VersionGraphVersionCfg::addToJsonObject ( ot::JsonValue & _object,
ot::JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference to write the data to.
_allocatorAllocator.

Implements ot::Serializable.

◆ createBranchNodeFromBranch()

ot::VersionGraphVersionCfg ot::VersionGraphVersionCfg::createBranchNodeFromBranch ( const std::string & _branch)
static

◆ getBranchName()

std::string ot::VersionGraphVersionCfg::getBranchName ( void ) const

Returns the name of this versions branch. getName.

◆ getBranchNodeName()

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".

◆ getDescription()

const std::string & ot::VersionGraphVersionCfg::getDescription ( void ) const
inline

◆ getDirectParentIsHidden()

bool ot::VersionGraphVersionCfg::getDirectParentIsHidden ( void ) const
inline

If the direct parent is hidden the connection line will be displayed as a dashed line.

◆ getLabel()

const std::string & ot::VersionGraphVersionCfg::getLabel ( void ) const
inline

Returns the version label. The label will be displayed on the version if it is not empty.

◆ getName()

const std::string & ot::VersionGraphVersionCfg::getName ( void ) const
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:

  • <Version>
  • or
  • <Branch>.<Version>
  • or
  • <Branch>.<Version>.<Branch>.<Version> and so on.

◆ getParentVersion()

const std::string & ot::VersionGraphVersionCfg::getParentVersion ( void ) const
inline

◆ getVersionNumber() [1/2]

ot::VersionGraphVersionCfg::VersionNumberType ot::VersionGraphVersionCfg::getVersionNumber ( const std::string & _version)
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.

◆ getVersionNumber() [2/2]

VersionNumberType ot::VersionGraphVersionCfg::getVersionNumber ( void ) const
inline

◆ getVersionNumbers() [1/2]

std::vector< ot::VersionGraphVersionCfg::VersionNumberType > ot::VersionGraphVersionCfg::getVersionNumbers ( const std::string & _version)
static

◆ getVersionNumbers() [2/2]

std::vector< ot::VersionGraphVersionCfg::VersionNumberType > ot::VersionGraphVersionCfg::getVersionNumbers ( void ) const

◆ isOnActivePath() [1/2]

bool ot::VersionGraphVersionCfg::isOnActivePath ( const std::string & _activeBranchName) const

◆ isOnActivePath() [2/2]

bool ot::VersionGraphVersionCfg::isOnActivePath ( const std::string & _versionName,
const std::string & _activeBranchName )
static

◆ isValid() [1/2]

bool ot::VersionGraphVersionCfg::isValid ( const std::string & _versionName)
static

Returns true if the version name matches the version name syntax.

◆ isValid() [2/2]

bool ot::VersionGraphVersionCfg::isValid ( void ) const

◆ operator!=()

bool ot::VersionGraphVersionCfg::operator!= ( const std::string & _name) const

Returns true if the version name is not equal to the provided name.

◆ operator=() [1/2]

ot::VersionGraphVersionCfg & ot::VersionGraphVersionCfg::operator= ( const VersionGraphVersionCfg & _other)

◆ operator=() [2/2]

ot::VersionGraphVersionCfg & ot::VersionGraphVersionCfg::operator= ( VersionGraphVersionCfg && _other)
noexcept

◆ operator==()

bool ot::VersionGraphVersionCfg::operator== ( const std::string & _name) const

Returns true if the version name is equal to the provided name.

◆ setDescription()

void ot::VersionGraphVersionCfg::setDescription ( const std::string & _description)
inline

◆ setDirectParentIsHidden()

void ot::VersionGraphVersionCfg::setDirectParentIsHidden ( bool _isHidden)
inline

◆ setFromJsonObject()

void ot::VersionGraphVersionCfg::setFromJsonObject ( const ot::ConstJsonObject & _object)
overridevirtual

Set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information.
Exceptions
Maythrow an exception if the provided object is not valid (members missing or invalid types).

Implements ot::Serializable.

◆ setLabel()

void ot::VersionGraphVersionCfg::setLabel ( const std::string & _title)
inline
See also
getLabel

◆ setName()

void ot::VersionGraphVersionCfg::setName ( const std::string & _name)
inline
See also
getName

◆ setParentVersion()

void ot::VersionGraphVersionCfg::setParentVersion ( const std::string & _version)
inline

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