schema-salad-d ~master (2021-11-30T07:56:22Z)
Home
Dub
Repo
DispatchFun
salad
meta
Undocumented in source.
template
DispatchFun (
RetType
Types
...
) {
import
std
.
format
:
format
;
;
import
std
.
meta
:
anySatisfy
,
Filter
,
staticMap
;
;
import
std
.
traits
:
isArray
,
isIntegral
,
isSomeString
;
;
eponymoustemplate
isNonStringArray
(T)
;
alias
ArrayTypes
=
Filter
!(
isNonStringArray
,
Types
)
;
static if
(
ArrayTypes.length == 0
)
enum
ArrayStatement
;
static if
(!(
ArrayTypes.length == 0
))
enum
ArrayStatement
;
eponymoustemplate
isRecord
(T)
;
alias
RecordTypes
=
Filter
!(
isRecord
,
Types
)
;
static if
(
RecordTypes.length == 0
)
enum
RecordStatement
;
static if
(!(
RecordTypes.length == 0
))
enum
RecordStatement
;
eponymoustemplate
isEnum
(T)
;
alias
EnumTypes
=
Filter
!(
isEnum
,
Types
)
;
enum
hasString
;
static if
(
EnumTypes.length == 0
)
static if
(
hasString
)
enum
EnumStatement
;
static if
(
EnumTypes.length == 0
)
static if
(!(
hasString
))
enum
EnumStatement
;
static if
(!(
EnumTypes.length == 0
))
enum
EnumStatement
;
static if
(
Filter!(isIntegral, Types).length == 0
)
enum
NumStatement
;
static if
(!(
Filter!(isIntegral, Types).length == 0
))
enum
NumStatement
;
import
std
.
algorithm
:
filter
,
joiner
;
;
import
std
.
array
:
array
;
;
import
std
.
functional
:
not
;
;
import
std
.
range
:
empty
;
;
enum
FunBody
;
enum
DispatchFun
;
}
Members
Aliases
ArrayTypes
alias
ArrayTypes
=
Filter
!(
isNonStringArray
,
Types
)
Undocumented in source.
EnumTypes
alias
EnumTypes
=
Filter
!(
isEnum
,
Types
)
Undocumented in source.
RecordTypes
alias
RecordTypes
=
Filter
!(
isRecord
,
Types
)
Undocumented in source.
Enums
isEnum
eponymoustemplate
isEnum
(T)
Undocumented in source.
isNonStringArray
eponymoustemplate
isNonStringArray
(T)
Undocumented in source.
isRecord
eponymoustemplate
isRecord
(T)
Undocumented in source.
Manifest constants
ArrayStatement
enum
ArrayStatement
;
Undocumented in source.
ArrayStatement
enum
ArrayStatement
;
Undocumented in source.
DispatchFun
enum
DispatchFun
;
Undocumented in source.
EnumStatement
enum
EnumStatement
;
Undocumented in source.
EnumStatement
enum
EnumStatement
;
Undocumented in source.
EnumStatement
enum
EnumStatement
;
Undocumented in source.
FunBody
enum
FunBody
;
Undocumented in source.
NumStatement
enum
NumStatement
;
Undocumented in source.
NumStatement
enum
NumStatement
;
Undocumented in source.
RecordStatement
enum
RecordStatement
;
Undocumented in source.
RecordStatement
enum
RecordStatement
;
Undocumented in source.
hasString
enum
hasString
;
Undocumented in source.
Meta
Source
See Implementation
salad
meta
enums
hasIdentifier
isConstantMember
functions
ctorStr
stripLeftAll
mixin templates
genCtor
genIdentifier
genToString
structs
documentRoot
id
idMap
typeDSL
templates
ArrayDispatchStatement
Assign
Assign_
DispatchFun
DocumentRootType
EnumDispatchStatement
IdentifierType
RecordDispatchStatement