Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module for computed data for an interface.
Synopsis
- data ComputedInterfaceData = ComputedInterfaceData {}
- data EvaluatedEnumData = EvaluatedEnumData {}
- type EvaluatedEnumValueMap = Map [String] Integer
- getEvaluatedEnumData :: HasCallStack => ComputedInterfaceData -> ExtName -> EvaluatedEnumData
- data NumericTypeInfo
- numType :: NumericTypeInfo -> Type
- numBytes :: NumericTypeInfo -> Int
- numMinBound :: NumericTypeInfo -> Integer
- numMaxBound :: NumericTypeInfo -> Integer
- findNumericTypeInfo :: Type -> Maybe NumericTypeInfo
- pickNumericType :: Int -> Integer -> Integer -> Maybe NumericTypeInfo
Documentation
data ComputedInterfaceData Source #
Holds "computed data" for an interface. This is data that is calculated by Hoppy, beyond what is directly specified in the interface.
ComputedInterfaceData | |
|
data EvaluatedEnumData Source #
Information about the enum that has been completed beyond what the interface definition provides, possibly by building actual C++ code.
EvaluatedEnumData | |
|
Instances
Read EvaluatedEnumData Source # | |
Defined in Foreign.Hoppy.Generator.Spec.Computed | |
Show EvaluatedEnumData Source # | |
Defined in Foreign.Hoppy.Generator.Spec.Computed showsPrec :: Int -> EvaluatedEnumData -> ShowS # show :: EvaluatedEnumData -> String # showList :: [EvaluatedEnumData] -> ShowS # |
type EvaluatedEnumValueMap = Map [String] Integer Source #
Contains the numeric values for each of the entries in a C++ enum.
getEvaluatedEnumData :: HasCallStack => ComputedInterfaceData -> ExtName -> EvaluatedEnumData Source #
Returns the map containing the calculated values for all entries in the
enum with the given ExtName
. This requires hooks to have been run.
Numeric types
data NumericTypeInfo Source #
Bound information about numeric types.
Instances
Read NumericTypeInfo Source # | |
Defined in Foreign.Hoppy.Generator.Spec.Computed | |
Show NumericTypeInfo Source # | |
Defined in Foreign.Hoppy.Generator.Spec.Computed showsPrec :: Int -> NumericTypeInfo -> ShowS # show :: NumericTypeInfo -> String # showList :: [NumericTypeInfo] -> ShowS # |
numType :: NumericTypeInfo -> Type Source #
The numeric data type described by the record.
numBytes :: NumericTypeInfo -> Int Source #
The number of bytes in a value of the type.
numMinBound :: NumericTypeInfo -> Integer Source #
The lowest (most negative) value representable by the type.
numMaxBound :: NumericTypeInfo -> Integer Source #
The highest (most positive) value representable by the type.
findNumericTypeInfo :: Type -> Maybe NumericTypeInfo Source #
Searches the list of known numeric types usable for enum values, and returns the record for the given type.
pickNumericType :: Int -> Integer -> Integer -> Maybe NumericTypeInfo Source #
Selects the preferred numeric type for holding numeric values in the given range.