Belle II Software development
TypedVariable Class Reference

A variable with a specified data type. More...

#include <Types.h>

Inheritance diagram for TypedVariable:
Variable

Public Member Functions

 TypedVariable (const std::string &variableName, const VariableDataType &variableDataType)
 Constructs a new TypedVariable.
 
VariableDataType getDataType () const
 Retrieves the data type of this variable.
 
virtual std::string getName () const
 Retrieves the name of the variable.
 

Private Attributes

VariableDataType dataType
 The data type of the variable.
 
std::string name
 The name of the variable.
 

Detailed Description

A variable with a specified data type.

Definition at line 57 of file Types.h.

Constructor & Destructor Documentation

◆ TypedVariable()

TypedVariable ( const std::string & variableName,
const VariableDataType & variableDataType )
inline

Constructs a new TypedVariable.

Parameters
variableNameThe name of the variable.
variableDataTypeThe data type of the variable (e.g., c_double, c_int, c_bool).

Definition at line 64 of file Types.h.

65 : Variable(variableName)
66 , dataType{variableDataType}
67 {}

Member Function Documentation

◆ getDataType()

VariableDataType getDataType ( ) const
inline

Retrieves the data type of this variable.

Returns
The VariableDataType enum value.

Definition at line 73 of file Types.h.

73{ return dataType; }

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Retrieves the name of the variable.

Returns
The variable name as a std::string.

Definition at line 42 of file Types.h.

42{ return name; }

Member Data Documentation

◆ dataType

VariableDataType dataType
private

The data type of the variable.

Definition at line 76 of file Types.h.

◆ name

std::string name
privateinherited

The name of the variable.

Definition at line 50 of file Types.h.


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