Class CEnumValueNode#

Inheritance Relationships#

Base Type#

Class Documentation#

class CEnumValueNode : public CEntityValueNode#

Enum entity declaration value.

Public Functions

CEnumValueNode(CEntityPtr ptrEntity, const CValueNodePtr ptrParent)#

Constructor.

Parameters:
  • ptrEntity[in] Smart pointer to the entity implementing the type. Cannot be nullptr.

  • ptrParent[in] Smart pointer to the parent value. Can only be nullptr for upper most value level.

CEnumValueNode(const CEnumValueNode &rValueNode, CEntityPtr ptrEntity, const CValueNodePtr ptrParent)#

Copy constructor with new parent and entity.

Parameters:
  • rValueNode[in] Reference to the value node to copy from.

  • ptrEntity[in] Smart pointer to the entity implementing the type. Cannot be nullptr.

  • ptrParent[in] Smart pointer to the parent value. Cannot be nullptr.

virtual ~CEnumValueNode() override = default#

Default destructor.

Remark

This constructor needs to be virtual to allow derived classes to be destroyed correctly.

virtual CValueNodePtr CreateCopy(CEntityPtr ptrEntity, const CValueNodePtr ptrParent) const override#

Create a copy of the value. Overload of CEntityValueNode::CreateCopy.

Parameters:
  • ptrEntity[in] Smart pointer to the entity receiving the copy of the value node.

  • ptrParent[in] Smart pointer to the parent value. Cannot be nullptr.

Returns:

Returns a smart pointer of the copy of the value.

virtual void ProcessValueAssignment(const CTokenList &rlstExpression) override#

Process the assignment. Overload of CEntityValueNode::ProcessValueAssignment.

Parameters:

rlstExpression[in] Reference to the expression token list.

inline virtual bool IsDefined() const#

Is the value defined?

Returns:

Returns ‘true’ when the value is defined; ‘false’ otherwise.

const CConstVariant &Variant() const#

Get access to the assigned const variant of the enum entry.

Returns:

The const variant storing the value.

std::string String() const#

Get access to the assigned name string of the enum entry.

Returns:

The name string of the enum entry.