class InitVarSnippet::Constant

Overview

Initialises variable to a constant value. More…

#include <initVarSnippet.h>

class Constant: public InitVarSnippet::Base
{
public:
    // methods

    DECLARE_SNIPPET(
        InitVarSnippet::Constant,
        1
        );

    SET_CODE();
    virtual StringVec getParamNames() const;
};

Inherited Members

public:
    // typedefs

    typedef std::vector<std::string> StringVec;
    typedef std::vector<EGP> EGPVec;
    typedef std::vector<ParamVal> ParamValVec;
    typedef std::vector<DerivedParam> DerivedParamVec;

    // structs

    struct DerivedParam;
    struct EGP;
    struct ParamVal;

    // methods

    virtual ~Base();
    virtual StringVec getParamNames() const;
    virtual DerivedParamVec getDerivedParams() const;
    virtual std::string getCode() const;

Detailed Documentation

Initialises variable to a constant value.

This snippet takes 1 parameter:

  • value - The value to intialise the variable to

This snippet type is seldom used directly - Models::VarInit has an implicit constructor that, internally, creates one of these snippets

Methods

virtual StringVec getParamNames() const

Gets names of of (independent) model parameters.