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

Safe HaskellNone
LanguageHaskell2010

Foreign.Hoppy.Generator.Spec.ClassFeature

Contents

Description

Bindings for common class operations, such as copy construction.

Synopsis

Class features

data ClassFeature Source #

Sets of functionality that can be stamped onto a class with classAddFeatures.

Constructors

Assignable

Provides the assignment operator, Foo& Foo::operator=(const Foo&).

Comparable

Provides operators <, <=, >, >=, for example bool Foo::operator<(const Foo&). This feature does not automatically include Equatable.

Copyable

Provides copy construction, Foo::Foo(const Foo&).

Equatable

Provides operator== and operator!=, for example bool Foo::operator==(const Foo&).

classAddFeatures :: [ClassFeature] -> Class -> Class Source #

Adds the contents of a feature to a class. Does not check for overlap with existing class contents.