hoppy-generator-0.7.1: C++ FFI generator - Code generator

Safe HaskellNone
LanguageHaskell2010

Foreign.Hoppy.Generator.Spec.Variable

Contents

Description

Interface for defining bindings to C++ variables.

Synopsis

Data type

data Variable Source #

A C++ variable.

Use this data type's HasReqs instance to make the variable accessible.

Instances
Eq Variable Source # 
Instance details

Defined in Foreign.Hoppy.Generator.Spec.Variable

Show Variable Source # 
Instance details

Defined in Foreign.Hoppy.Generator.Spec.Variable

HasAddendum Variable Source # 
Instance details

Defined in Foreign.Hoppy.Generator.Spec.Variable

Exportable Variable Source # 
Instance details

Defined in Foreign.Hoppy.Generator.Spec.Variable

HasExtNames Variable Source # 
Instance details

Defined in Foreign.Hoppy.Generator.Spec.Variable

HasReqs Variable Source # 
Instance details

Defined in Foreign.Hoppy.Generator.Spec.Variable

Construction

makeVariable :: Identifier -> Maybe ExtName -> Type -> Variable Source #

Creates a binding for a C++ variable.

Properties

varExtName :: Variable -> ExtName Source #

The variable's external name.

varIdentifier :: Variable -> Identifier Source #

The identifier used to refer to the variable.

varType :: Variable -> Type Source #

The variable's type. This may be constT to indicate that the variable is read-only.

varReqs :: Variable -> Reqs Source #

Requirements for bindings to access this variable.

varAddendum :: Variable -> Addendum Source #

The variable's addendum.

varIsConst :: Variable -> Bool Source #

Returns whether the variable is constant, i.e. whether its type is constT ....

varGetterExtName :: Variable -> ExtName Source #

Returns the external name of the getter function for the variable.

varSetterExtName :: Variable -> ExtName Source #

Returns the external name of the setter function for the variable.