struct Models::Base::Var

Overview

A variable has a name, a type and an access type. More…

#include <models.h>

struct Var
{
    // fields

    std::string name;
    std::string type;
    VarAccess access;

    // methods

    Var();

    Var(
        const std::string& n,
        const std::string& t,
        VarAccess a
        );

    Var(
        const std::string& n,
        const std::string& t
        );
};

Detailed Documentation

A variable has a name, a type and an access type.

Explicit constructors required as although, through the wonders of C++ aggregate initialization, access would default to VarAccess::READ_WRITE if not specified, this results in a -Wmissing-field-initializers warning on GCC and Clang