0.4.1
Loading...
Searching...
No Matches
NAV::Node::Kind Struct Reference

Kind information class. More...

Public Types

enum  Value : uint8_t {
  Blueprint ,
  Simple ,
  GroupBox
}
 Possible kinds of Nodes. More...
 

Public Member Functions

 Kind ()=default
 Default Constructor.
 
 Kind (const std::string &string)
 Constructor from std::string.
 
constexpr Kind (Value kind)
 Implicit Constructor from Value type.
 
 operator bool ()=delete
 Prevent usage: if(node)
 
 operator std::string () const
 std::string conversion operator
 
 operator Value () const
 Allow switch(Node::Value(kind)) and comparisons.
 
Kindoperator= (Value v)
 Assignment operator from Value type.
 

Private Attributes

Value value
 Value of the node kind.
 

Friends

constexpr bool operator!= (const Node::Kind &lhs, const Node::Kind &rhs)
 Inequal compares Node::Kind values.
 
constexpr bool operator!= (const Node::Kind &lhs, const Node::Kind::Value &rhs)
 Inequal compares Node::Kind values.
 
constexpr bool operator!= (const Node::Kind::Value &lhs, const Node::Kind &rhs)
 Inequal compares Node::Kind values.
 
constexpr bool operator== (const Node::Kind &lhs, const Node::Kind &rhs)
 Equal compares Node::Kind values.
 
constexpr bool operator== (const Node::Kind &lhs, const Node::Kind::Value &rhs)
 Equal compares Node::Kind values.
 
constexpr bool operator== (const Node::Kind::Value &lhs, const Node::Kind &rhs)
 Equal compares Node::Kind values.
 

Detailed Description

Kind information class.

Definition at line 95 of file Node.hpp.

Member Enumeration Documentation

◆ Value

enum NAV::Node::Kind::Value : uint8_t

Possible kinds of Nodes.

Enumerator
Blueprint 

Node with header.

Simple 

Node without header, which displays its name in the center of the content.

GroupBox 

Group box which can group other nodes and drag them together.

Definition at line 98 of file Node.hpp.

Constructor & Destructor Documentation

◆ Kind() [1/3]

NAV::Node::Kind::Kind ( )
default

Default Constructor.

◆ Kind() [2/3]

NAV::Node::Kind::Kind ( Value kind)
inlineconstexpr

Implicit Constructor from Value type.

Parameters
[in]kindValue type to construct from

Definition at line 110 of file Node.hpp.

◆ Kind() [3/3]

NAV::Node::Kind::Kind ( const std::string & string)
inlineexplicit

Constructor from std::string.

Parameters
[in]stringString representation of the type

Definition at line 116 of file Node.hpp.

Member Function Documentation

◆ operator bool()

NAV::Node::Kind::operator bool ( )
explicitdelete

Prevent usage: if(node)

◆ operator std::string()

NAV::Node::Kind::operator std::string ( ) const
inlineexplicit

std::string conversion operator

Returns
A std::string representation of the node kind

Definition at line 155 of file Node.hpp.

◆ operator Value()

NAV::Node::Kind::operator Value ( ) const
inlineexplicit

Allow switch(Node::Value(kind)) and comparisons.

Definition at line 133 of file Node.hpp.

◆ operator=()

Kind & NAV::Node::Kind::operator= ( Value v)
inline

Assignment operator from Value type.

Parameters
[in]vValue type to construct from
Returns
The Kind type from the value type

Definition at line 139 of file Node.hpp.

Friends And Related Symbol Documentation

◆ operator!= [1/3]

bool operator!= ( const Node::Kind & lhs,
const Node::Kind & rhs )
friend

Inequal compares Node::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 506 of file Node.hpp.

◆ operator!= [2/3]

bool operator!= ( const Node::Kind & lhs,
const Node::Kind::Value & rhs )
friend

Inequal compares Node::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 522 of file Node.hpp.

◆ operator!= [3/3]

bool operator!= ( const Node::Kind::Value & lhs,
const Node::Kind & rhs )
friend

Inequal compares Node::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 527 of file Node.hpp.

◆ operator== [1/3]

bool operator== ( const Node::Kind & lhs,
const Node::Kind & rhs )
friend

Equal compares Node::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 501 of file Node.hpp.

◆ operator== [2/3]

bool operator== ( const Node::Kind & lhs,
const Node::Kind::Value & rhs )
friend

Equal compares Node::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 512 of file Node.hpp.

◆ operator== [3/3]

bool operator== ( const Node::Kind::Value & lhs,
const Node::Kind & rhs )
friend

Equal compares Node::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 517 of file Node.hpp.

Field Documentation

◆ value

Value NAV::Node::Kind::value
private

Value of the node kind.

Definition at line 171 of file Node.hpp.


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