hoppy-std-0.1.0: C++ FFI generator - Standard library bindings

Safe HaskellNone
LanguageHaskell2010

Foreign.Hoppy.Generator.Std.Map

Description

Bindings for std::map.

Synopsis

Documentation

data Options Source

Options for instantiating the map classes.

Constructors

Options 

Fields

optMapClassFeatures :: [ClassFeature]

Additional features to add to the std::map class. Maps are always Assignable and Copyable.

optKeyConversion :: Maybe ValueConversion

How to convert values of the key type.

optValueConversion :: Maybe ValueConversion

How to convert values of the value type.

defaultOptions :: Options Source

The default options have no additional ClassFeatures.

data Contents Source

A set of instantiated map classes.

Constructors

Contents 

Fields

c_map :: Class
std::map<K, V>
c_iterator :: Class
std::map<K, V>::iterator
c_constIterator :: Class
std::map<K, V>::const_iterator

instantiate :: String -> Type -> Type -> Reqs -> Contents Source

instantiate className k v reqs creates a set of bindings for an instantiation of std::map<k, v> and associated types (e.g. iterators). In the result, the c_map class has an external name of className, and the iterator classes are further suffixed with "Iterator" and "ConstIterator" respectively.

instantiate' :: String -> Type -> Type -> Reqs -> Options -> Contents Source

instantiate with additional options.

toExports :: Contents -> [Export] Source

Converts an instantiation into a list of exports to be included in a module.