Circus 0.0.1-alpha
C++ Serialization Framework
Loading...
Searching...
No Matches
circus::circ_variable Struct Reference

Represents a variable in Circus serialization. More...

#include <parser.hpp>

Public Types

typedef std::variant< char, std::string, int, float, double, std::vector< circ_variable >, std::unordered_map< std::string, circ_variable > > circ_type_var_t
 Variant holding possible Circus variable types.

Public Member Functions

circ_variableoperator[] (const std::string &key)
 Access nested variables by key, for objects.

Public Attributes

std::string key
 The key name associated with this variable.
circ_type_var_t value
 The value stored in this variable.

Detailed Description

Represents a variable in Circus serialization.

Supports primitive types, arrays, and nested objects.

Member Function Documentation

◆ operator[]()

circ_variable & circus::circ_variable::operator[] ( const std::string & key)
inline

Access nested variables by key, for objects.

Parameters
keyThe key to access inside the object.
Returns
Reference to nested circ_variable.
Note
This assumes the current variable holds an object.

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