Documentation ¶
Index ¶
- Constants
- Variables
- func ArgMetaFFIType(arg *ArgDefinition) uint64
- func DefaultParamComparer(left *ArgDefinition, right *ArgDefinition) bool
- func IsMetaFFIType(metaffiType string) bool
- type ArgDefinition
- func NewArgArrayDefinition(name string, ffiType MetaFFIType, dimensions int) *ArgDefinition
- func NewArgArrayDefinitionWithAlias(name string, ffiType MetaFFIType, dimensions int, alias string) *ArgDefinition
- func NewArgDefinition(name string, ffiType MetaFFIType) *ArgDefinition
- func NewArgDefinitionWithAlias(name string, ffiType MetaFFIType, alias string) *ArgDefinition
- func (this *ArgDefinition) AppendComment(comment string)
- func (this *ArgDefinition) Duplicate() *ArgDefinition
- func (this *ArgDefinition) GetMetaFFITypeAlias() MetaFFITypeInfo
- func (this *ArgDefinition) GetTypeOrAlias() string
- func (this *ArgDefinition) IsAny() bool
- func (this *ArgDefinition) IsArray() bool
- func (this *ArgDefinition) IsBool() bool
- func (this *ArgDefinition) IsHandle() bool
- func (this *ArgDefinition) IsHandleTypeAlias() bool
- func (this *ArgDefinition) IsInteger() bool
- func (this *ArgDefinition) IsString() bool
- func (this *ArgDefinition) IsTypeAlias() bool
- func (this *ArgDefinition) SetAlias(alias string)
- func (this *ArgDefinition) SetTag(tag string, val string)
- type ClassDefinition
- func (this *ClassDefinition) AddConstructor(definition *ConstructorDefinition)
- func (this *ClassDefinition) AddField(f *FieldDefinition)
- func (this *ClassDefinition) AddMethod(def *MethodDefinition)
- func (this *ClassDefinition) AppendComment(comment string)
- func (this *ClassDefinition) SetEntityPath(key string, val string)
- func (this *ClassDefinition) SetTag(tag string, val string)
- type Commentable
- type ConstructorDefinition
- type EntityIDer
- type EntityPather
- type FieldDefinition
- func NewFieldArrayDefinitionWithAlias(cls *ClassDefinition, name string, ffiType MetaFFIType, dimensions int, ...) *FieldDefinition
- func NewFieldDefinition(cls *ClassDefinition, name string, ffiType MetaFFIType, getter string, ...) *FieldDefinition
- func NewFieldDefinitionWithAlias(cls *ClassDefinition, name string, ffiType MetaFFIType, alias string, ...) *FieldDefinition
- type FunctionDefinition
- func (this *FunctionDefinition) AddParameter(definition *ArgDefinition) *FunctionDefinition
- func (this *FunctionDefinition) AddReturnValues(definition *ArgDefinition) *FunctionDefinition
- func (this *FunctionDefinition) AppendComment(comment string)
- func (this *FunctionDefinition) Duplicate() *FunctionDefinition
- func (this *FunctionDefinition) EntityPathAsString(definition *IDLDefinition) string
- func (this *FunctionDefinition) EqualsSignature(f *FunctionDefinition, ...) bool
- func (this *FunctionDefinition) GetEntityIDName() string
- func (this *FunctionDefinition) GetEntityPath(key string) string
- func (this *FunctionDefinition) GetFirstIndexOfOptionalParameter() int
- func (this *FunctionDefinition) GetNameWithOverloadIndex() string
- func (this *FunctionDefinition) GetOverloadIndexIfExists() string
- func (this *FunctionDefinition) GetParametersMetaFFITypeInfo() []MetaFFITypeInfo
- func (this *FunctionDefinition) GetReturnValuesMetaFFITypeInfo() []MetaFFITypeInfo
- func (this *FunctionDefinition) IsMethod() bool
- func (this *FunctionDefinition) SetEntityPath(key string, val string)
- func (this *FunctionDefinition) SetTag(tag string, val string)
- type GlobalDefinition
- type IDLDefinition
- type MetaFFIType
- type MetaFFITypeInfo
- type MethodDefinition
- func (this *MethodDefinition) AddParameter(definition *ArgDefinition) *MethodDefinition
- func (this *MethodDefinition) AddReturnValues(definition *ArgDefinition) *MethodDefinition
- func (this *MethodDefinition) Duplicate() *MethodDefinition
- func (this *MethodDefinition) EntityPathAsString(definition *IDLDefinition) string
- func (this *MethodDefinition) GetEntityIDName() string
- func (this *MethodDefinition) GetParent() *ClassDefinition
- func (this *MethodDefinition) IsMethod() bool
- func (this *MethodDefinition) SetParent(parent *ClassDefinition)
- type MethodType
- type ModuleDefinition
- func (this *ModuleDefinition) AddClass(c *ClassDefinition)
- func (this *ModuleDefinition) AddClasses(cs []*ClassDefinition)
- func (this *ModuleDefinition) AddExternalResource(r string)
- func (this *ModuleDefinition) AddExternalResourceIfNotExist(r string)
- func (this *ModuleDefinition) AddFunction(f *FunctionDefinition)
- func (this *ModuleDefinition) AddFunctions(fs []*FunctionDefinition)
- func (this *ModuleDefinition) AddGlobal(g *GlobalDefinition)
- func (this *ModuleDefinition) AddGlobals(gs []*GlobalDefinition)
- func (this *ModuleDefinition) AppendComment(comment string)
- func (this *ModuleDefinition) GetCallablesByName(name string, searchFunctions bool, searchMethods bool, searchConstructors bool) (functions []*FunctionDefinition, methods []*MethodDefinition, ...)
- func (this *ModuleDefinition) GetCallablesWithOptionalParameters(searchFunctions bool, searchMethods bool, searchConstructors bool) (functions []*FunctionDefinition, methods []*MethodDefinition, ...)
- func (this *ModuleDefinition) GetEntityPathSet(key string) []string
- func (this *ModuleDefinition) GetOverloadedCallables(searchFunctions bool, searchMethods bool, searchConstructors bool) (functions [][]*FunctionDefinition, methods [][]*MethodDefinition, ...)
- func (this *ModuleDefinition) IsContainsClass(clsName string) bool
- func (this *ModuleDefinition) SetEntityPath(key string, val string)
- func (this *ModuleDefinition) SetTag(tag string, val string)
- type ReleaseDefinition
- type Taggable
Constants ¶
const ( FLOAT64 MetaFFIType = "float64" FLOAT32 MetaFFIType = "float32" INT8 MetaFFIType = "int8" INT16 MetaFFIType = "int16" INT32 MetaFFIType = "int32" INT64 MetaFFIType = "int64" UINT8 MetaFFIType = "uint8" UINT16 MetaFFIType = "uint16" UINT32 MetaFFIType = "uint32" UINT64 MetaFFIType = "uint64" BOOL MetaFFIType = "bool" CHAR8 MetaFFIType = "char8" CHAR16 MetaFFIType = "char16" CHAR32 MetaFFIType = "char32" STRING8 MetaFFIType = "string8" STRING16 MetaFFIType = "string16" STRING32 MetaFFIType = "string32" HANDLE MetaFFIType = "handle" ARRAY MetaFFIType = "array" ANY MetaFFIType = "any" // Parameter can receive any MetaFFI type SIZE MetaFFIType = "size" NULL MetaFFIType = "null" FLOAT64_ARRAY MetaFFIType = "float64_array" FLOAT32_ARRAY MetaFFIType = "float32_array" INT8_ARRAY MetaFFIType = "int8_array" INT16_ARRAY MetaFFIType = "int16_array" INT32_ARRAY MetaFFIType = "int32_array" INT64_ARRAY MetaFFIType = "int64_array" UINT8_ARRAY MetaFFIType = "uint8_array" UINT16_ARRAY MetaFFIType = "uint16_array" UINT32_ARRAY MetaFFIType = "uint32_array" UINT64_ARRAY MetaFFIType = "uint64_array" BOOL_ARRAY MetaFFIType = "bool_array" CHAR8_ARRAY MetaFFIType = "char8_array" CHAR16_ARRAY MetaFFIType = "char16_array" CHAR32_ARRAY MetaFFIType = "char32_array" STRING8_ARRAY MetaFFIType = "string8_array" STRING16_ARRAY MetaFFIType = "string16_array" STRING32_ARRAY MetaFFIType = "string32_array" HANDLE_ARRAY MetaFFIType = "handle_array" ANY_ARRAY MetaFFIType = "any_array" SIZE_ARRAY MetaFFIType = "size_array" METAFFI_TYPE_FLOAT64 = uint64(C.metaffi_float64_type) METAFFI_TYPE_FLOAT32 = uint64(C.metaffi_float32_type) METAFFI_TYPE_INT8 = uint64(C.metaffi_int8_type) METAFFI_TYPE_INT16 = uint64(C.metaffi_int16_type) METAFFI_TYPE_INT32 = uint64(C.metaffi_int32_type) METAFFI_TYPE_INT64 = uint64(C.metaffi_int64_type) METAFFI_TYPE_UINT8 = uint64(C.metaffi_uint8_type) METAFFI_TYPE_UINT16 = uint64(C.metaffi_uint16_type) METAFFI_TYPE_UINT32 = uint64(C.metaffi_uint32_type) METAFFI_TYPE_UINT64 = uint64(C.metaffi_uint64_type) METAFFI_TYPE_BOOL = uint64(C.metaffi_bool_type) METAFFI_TYPE_STRING8 = uint64(C.metaffi_string8_type) METAFFI_TYPE_STRING16 = uint64(C.metaffi_string16_type) METAFFI_TYPE_STRING32 = uint64(C.metaffi_string32_type) METAFFI_TYPE_CHAR8 = uint64(C.metaffi_char8_type) METAFFI_TYPE_CHAR8_ARRAY = uint64(C.metaffi_char8_array_type) METAFFI_TYPE_CHAR16 = uint64(C.metaffi_char16_type) METAFFI_TYPE_CHAR16_ARRAY = uint64(C.metaffi_char16_array_type) METAFFI_TYPE_CHAR32 = uint64(C.metaffi_char32_type) METAFFI_TYPE_CHAR32_ARRAY = uint64(C.metaffi_char32_array_type) METAFFI_TYPE_HANDLE = uint64(C.metaffi_handle_type) METAFFI_TYPE_ARRAY = uint64(C.metaffi_array_type) METAFFI_TYPE_SIZE = uint64(C.metaffi_size_type) METAFFI_TYPE_ANY = uint64(C.metaffi_any_type) METAFFI_TYPE_FLOAT64_ARRAY = uint64(C.metaffi_float64_array_type) METAFFI_TYPE_FLOAT32_ARRAY = uint64(C.metaffi_float32_array_type) METAFFI_TYPE_INT8_ARRAY = uint64(C.metaffi_int8_array_type) METAFFI_TYPE_INT16_ARRAY = uint64(C.metaffi_int16_array_type) METAFFI_TYPE_INT32_ARRAY = uint64(C.metaffi_int32_array_type) METAFFI_TYPE_INT64_ARRAY = uint64(C.metaffi_int64_array_type) METAFFI_TYPE_UINT8_ARRAY = uint64(C.metaffi_uint8_array_type) METAFFI_TYPE_UINT16_ARRAY = uint64(C.metaffi_uint16_array_type) METAFFI_TYPE_UINT32_ARRAY = uint64(C.metaffi_uint32_array_type) METAFFI_TYPE_UINT64_ARRAY = uint64(C.metaffi_uint64_array_type) METAFFI_TYPE_BOOL_ARRAY = uint64(C.metaffi_bool_array_type) METAFFI_TYPE_STRING8_ARRAY = uint64(C.metaffi_string8_array_type) METAFFI_TYPE_STRING16_ARRAY = uint64(C.metaffi_string16_array_type) METAFFI_TYPE_STRING32_ARRAY = uint64(C.metaffi_string32_array_type) METAFFI_TYPE_HANDLE_ARRAY = uint64(C.metaffi_handle_array_type) METAFFI_TYPE_SIZE_ARRAY = uint64(C.metaffi_size_array_type) METAFFI_TYPE_NULL = uint64(C.metaffi_null_type) METAFFI_TYPE_CALLABLE = uint64(C.metaffi_callable_type) )
Variables ¶
var TypeStringToEnumName = map[MetaFFIType]string{ FLOAT64: "FLOAT64", FLOAT32: "FLOAT32", INT8: "INT8", INT16: "INT16", INT32: "INT32", INT64: "INT64", UINT8: "UINT8", UINT16: "UINT16", UINT32: "UINT32", UINT64: "UINT64", BOOL: "BOOL", STRING8: "STRING8", STRING16: "STRING16", STRING32: "STRING32", CHAR8: "CHAR8", CHAR16: "CHAR16", CHAR32: "CHAR32", HANDLE: "HANDLE", ARRAY: "ARRAY", SIZE: "SIZE", ANY: "ANY", FLOAT64_ARRAY: "FLOAT64_ARRAY", FLOAT32_ARRAY: "FLOAT32_ARRAY", INT8_ARRAY: "INT8_ARRAY", INT16_ARRAY: "INT16_ARRAY", INT32_ARRAY: "INT32_ARRAY", INT64_ARRAY: "INT64_ARRAY", UINT8_ARRAY: "UINT8_ARRAY", UINT16_ARRAY: "UINT16_ARRAY", UINT32_ARRAY: "UINT32_ARRAY", UINT64_ARRAY: "UINT64_ARRAY", BOOL_ARRAY: "BOOL_ARRAY", STRING8_ARRAY: "STRING8_ARRAY", STRING16_ARRAY: "STRING16_ARRAY", STRING32_ARRAY: "STRING32_ARRAY", ANY_ARRAY: "ANY_ARRAY", HANDLE_ARRAY: "HANDLE_ARRAY", SIZE_ARRAY: "SIZE_ARRAY", }
var TypeStringToTypeEnum = map[MetaFFIType]uint64{ FLOAT64: uint64(C.metaffi_float64_type), FLOAT32: uint64(C.metaffi_float32_type), INT8: uint64(C.metaffi_int8_type), INT16: uint64(C.metaffi_int16_type), INT32: uint64(C.metaffi_int32_type), INT64: uint64(C.metaffi_int64_type), UINT8: uint64(C.metaffi_uint8_type), UINT16: uint64(C.metaffi_uint16_type), UINT32: uint64(C.metaffi_uint32_type), UINT64: uint64(C.metaffi_uint64_type), BOOL: uint64(C.metaffi_bool_type), STRING8: uint64(C.metaffi_string8_type), STRING16: uint64(C.metaffi_string16_type), STRING32: uint64(C.metaffi_string32_type), CHAR8: uint64(C.metaffi_char8_type), CHAR16: uint64(C.metaffi_char16_type), CHAR32: uint64(C.metaffi_char32_type), HANDLE: uint64(C.metaffi_handle_type), ARRAY: uint64(C.metaffi_array_type), SIZE: uint64(C.metaffi_size_type), ANY: uint64(C.metaffi_any_type), FLOAT64_ARRAY: uint64(C.metaffi_float64_array_type), FLOAT32_ARRAY: uint64(C.metaffi_float32_array_type), INT8_ARRAY: uint64(C.metaffi_int8_array_type), INT16_ARRAY: uint64(C.metaffi_int16_array_type), INT32_ARRAY: uint64(C.metaffi_int32_array_type), INT64_ARRAY: uint64(C.metaffi_int64_array_type), UINT8_ARRAY: uint64(C.metaffi_uint8_array_type), UINT16_ARRAY: uint64(C.metaffi_uint16_array_type), UINT32_ARRAY: uint64(C.metaffi_uint32_array_type), UINT64_ARRAY: uint64(C.metaffi_uint64_array_type), BOOL_ARRAY: uint64(C.metaffi_bool_array_type), STRING8_ARRAY: uint64(C.metaffi_string8_array_type), STRING16_ARRAY: uint64(C.metaffi_string16_array_type), STRING32_ARRAY: uint64(C.metaffi_string32_array_type), HANDLE_ARRAY: uint64(C.metaffi_handle_array_type), SIZE_ARRAY: uint64(C.metaffi_size_array_type), }
Functions ¶
func ArgMetaFFIType ¶
func ArgMetaFFIType(arg *ArgDefinition) uint64
func DefaultParamComparer ¶
func DefaultParamComparer(left *ArgDefinition, right *ArgDefinition) bool
--------------------------------------------------------------------
func IsMetaFFIType ¶
Types ¶
type ArgDefinition ¶
type ArgDefinition struct { Name string `json:"name"` Type MetaFFIType `json:"type"` TypeAlias string `json:"type_alias"` Comment string `json:"comment"` Tags map[string]string `json:"tags"` Dimensions int `json:"dimensions"` IsOptional bool `json:"is_optional"` }
func NewArgArrayDefinition ¶
func NewArgArrayDefinition(name string, ffiType MetaFFIType, dimensions int) *ArgDefinition
--------------------------------------------------------------------
func NewArgArrayDefinitionWithAlias ¶
func NewArgArrayDefinitionWithAlias(name string, ffiType MetaFFIType, dimensions int, alias string) *ArgDefinition
--------------------------------------------------------------------
func NewArgDefinition ¶
func NewArgDefinition(name string, ffiType MetaFFIType) *ArgDefinition
--------------------------------------------------------------------
func NewArgDefinitionWithAlias ¶
func NewArgDefinitionWithAlias(name string, ffiType MetaFFIType, alias string) *ArgDefinition
--------------------------------------------------------------------
func (*ArgDefinition) AppendComment ¶
func (this *ArgDefinition) AppendComment(comment string)
--------------------------------------------------------------------
func (*ArgDefinition) Duplicate ¶
func (this *ArgDefinition) Duplicate() *ArgDefinition
--------------------------------------------------------------------
func (*ArgDefinition) GetMetaFFITypeAlias ¶
func (this *ArgDefinition) GetMetaFFITypeAlias() MetaFFITypeInfo
--------------------------------------------------------------------
func (*ArgDefinition) GetTypeOrAlias ¶
func (this *ArgDefinition) GetTypeOrAlias() string
--------------------------------------------------------------------
func (*ArgDefinition) IsAny ¶
func (this *ArgDefinition) IsAny() bool
--------------------------------------------------------------------
func (*ArgDefinition) IsArray ¶
func (this *ArgDefinition) IsArray() bool
--------------------------------------------------------------------
func (*ArgDefinition) IsBool ¶
func (this *ArgDefinition) IsBool() bool
--------------------------------------------------------------------
func (*ArgDefinition) IsHandle ¶
func (this *ArgDefinition) IsHandle() bool
--------------------------------------------------------------------
func (*ArgDefinition) IsHandleTypeAlias ¶
func (this *ArgDefinition) IsHandleTypeAlias() bool
--------------------------------------------------------------------
func (*ArgDefinition) IsInteger ¶
func (this *ArgDefinition) IsInteger() bool
--------------------------------------------------------------------
func (*ArgDefinition) IsString ¶
func (this *ArgDefinition) IsString() bool
--------------------------------------------------------------------
func (*ArgDefinition) IsTypeAlias ¶
func (this *ArgDefinition) IsTypeAlias() bool
--------------------------------------------------------------------
func (*ArgDefinition) SetAlias ¶
func (this *ArgDefinition) SetAlias(alias string)
--------------------------------------------------------------------
func (*ArgDefinition) SetTag ¶
func (this *ArgDefinition) SetTag(tag string, val string)
--------------------------------------------------------------------
type ClassDefinition ¶
type ClassDefinition struct { Name string `json:"name"` Comment string `json:"comment"` Tags map[string]string `json:"tags"` EntityPath map[string]string `json:"entity_path"` Constructors []*ConstructorDefinition `json:"constructors"` Releaser *ReleaseDefinition `json:"release"` Methods []*MethodDefinition `json:"methods"` Fields []*FieldDefinition `json:"fields"` }
--------------------------------------------------------------------
func NewClassDefinition ¶
func NewClassDefinition(name string) *ClassDefinition
--------------------------------------------------------------------
func (*ClassDefinition) AddConstructor ¶
func (this *ClassDefinition) AddConstructor(definition *ConstructorDefinition)
--------------------------------------------------------------------
func (*ClassDefinition) AddField ¶
func (this *ClassDefinition) AddField(f *FieldDefinition)
--------------------------------------------------------------------
func (*ClassDefinition) AddMethod ¶
func (this *ClassDefinition) AddMethod(def *MethodDefinition)
--------------------------------------------------------------------
func (*ClassDefinition) AppendComment ¶
func (this *ClassDefinition) AppendComment(comment string)
--------------------------------------------------------------------
func (*ClassDefinition) SetEntityPath ¶ added in v0.2.1
func (this *ClassDefinition) SetEntityPath(key string, val string)
--------------------------------------------------------------------
func (*ClassDefinition) SetTag ¶
func (this *ClassDefinition) SetTag(tag string, val string)
--------------------------------------------------------------------
type Commentable ¶
type Commentable interface {
AppendComment(comment string)
}
-------------------------------------------------------------------- -------------------------------------------------------------------- --------------------------------------------------------------------
type ConstructorDefinition ¶
type ConstructorDefinition struct { FunctionDefinition // contains filtered or unexported fields }
--------------------------------------------------------------------
func NewConstructorDefinition ¶
func NewConstructorDefinition(name string) *ConstructorDefinition
--------------------------------------------------------------------
func NewConstructorDefinitionFromFunctionDefinition ¶
func NewConstructorDefinitionFromFunctionDefinition(f *FunctionDefinition) *ConstructorDefinition
--------------------------------------------------------------------
func (*ConstructorDefinition) Duplicate ¶
func (this *ConstructorDefinition) Duplicate() *ConstructorDefinition
--------------------------------------------------------------------
func (*ConstructorDefinition) GetParent ¶
func (this *ConstructorDefinition) GetParent() *ClassDefinition
--------------------------------------------------------------------
func (*ConstructorDefinition) IsMethod ¶
func (this *ConstructorDefinition) IsMethod() bool
--------------------------------------------------------------------
func (*ConstructorDefinition) SetParent ¶
func (this *ConstructorDefinition) SetParent(parent *ClassDefinition)
--------------------------------------------------------------------
type EntityIDer ¶
type EntityIDer interface {
GetEntityIDName() string
}
--------------------------------------------------------------------
type EntityPather ¶ added in v0.2.1
type EntityPather interface { SetEntityPath(key string, val string) GetEntityPath(key string) string }
-------------------------------------------------------------------- -------------------------------------------------------------------- --------------------------------------------------------------------
type FieldDefinition ¶
type FieldDefinition struct { ArgDefinition Getter *MethodDefinition `json:"getter"` Setter *MethodDefinition `json:"setter"` // contains filtered or unexported fields }
--------------------------------------------------------------------
func NewFieldArrayDefinitionWithAlias ¶
func NewFieldArrayDefinitionWithAlias(cls *ClassDefinition, name string, ffiType MetaFFIType, dimensions int, alias string, getter string, setter string, instanceRequired bool) *FieldDefinition
--------------------------------------------------------------------
func NewFieldDefinition ¶
func NewFieldDefinition(cls *ClassDefinition, name string, ffiType MetaFFIType, getter string, setter string, instanceRequired bool) *FieldDefinition
--------------------------------------------------------------------
func NewFieldDefinitionWithAlias ¶
func NewFieldDefinitionWithAlias(cls *ClassDefinition, name string, ffiType MetaFFIType, alias string, getter string, setter string, instanceRequired bool) *FieldDefinition
--------------------------------------------------------------------
func (*FieldDefinition) GetEntityIDName ¶
func (this *FieldDefinition) GetEntityIDName() string
--------------------------------------------------------------------
func (*FieldDefinition) SetParent ¶
func (this *FieldDefinition) SetParent(cls *ClassDefinition)
--------------------------------------------------------------------\
type FunctionDefinition ¶
type FunctionDefinition struct { Name string `json:"name"` Comment string `json:"comment"` Tags map[string]string `json:"tags"` EntityPath map[string]string `json:"entity_path"` Parameters []*ArgDefinition `json:"parameters"` ReturnValues []*ArgDefinition `json:"return_values"` OverloadIndex int32 `json:"overload_index"` }
func NewFunctionDefinition ¶
func NewFunctionDefinition(name string) *FunctionDefinition
--------------------------------------------------------------------
func (*FunctionDefinition) AddParameter ¶
func (this *FunctionDefinition) AddParameter(definition *ArgDefinition) *FunctionDefinition
--------------------------------------------------------------------
func (*FunctionDefinition) AddReturnValues ¶
func (this *FunctionDefinition) AddReturnValues(definition *ArgDefinition) *FunctionDefinition
--------------------------------------------------------------------
func (*FunctionDefinition) AppendComment ¶
func (this *FunctionDefinition) AppendComment(comment string)
--------------------------------------------------------------------
func (*FunctionDefinition) Duplicate ¶
func (this *FunctionDefinition) Duplicate() *FunctionDefinition
--------------------------------------------------------------------
func (*FunctionDefinition) EntityPathAsString ¶ added in v0.2.1
func (this *FunctionDefinition) EntityPathAsString(definition *IDLDefinition) string
--------------------------------------------------------------------
func (*FunctionDefinition) EqualsSignature ¶
func (this *FunctionDefinition) EqualsSignature(f *FunctionDefinition, paramComparer func(left *ArgDefinition, right *ArgDefinition) bool) bool
--------------------------------------------------------------------
func (*FunctionDefinition) GetEntityIDName ¶
func (this *FunctionDefinition) GetEntityIDName() string
--------------------------------------------------------------------
func (*FunctionDefinition) GetEntityPath ¶ added in v0.2.1
func (this *FunctionDefinition) GetEntityPath(key string) string
--------------------------------------------------------------------
func (*FunctionDefinition) GetFirstIndexOfOptionalParameter ¶
func (this *FunctionDefinition) GetFirstIndexOfOptionalParameter() int
--------------------------------------------------------------------
func (*FunctionDefinition) GetNameWithOverloadIndex ¶
func (this *FunctionDefinition) GetNameWithOverloadIndex() string
--------------------------------------------------------------------
func (*FunctionDefinition) GetOverloadIndexIfExists ¶
func (this *FunctionDefinition) GetOverloadIndexIfExists() string
--------------------------------------------------------------------
func (*FunctionDefinition) GetParametersMetaFFITypeInfo ¶
func (this *FunctionDefinition) GetParametersMetaFFITypeInfo() []MetaFFITypeInfo
--------------------------------------------------------------------
func (*FunctionDefinition) GetReturnValuesMetaFFITypeInfo ¶
func (this *FunctionDefinition) GetReturnValuesMetaFFITypeInfo() []MetaFFITypeInfo
--------------------------------------------------------------------
func (*FunctionDefinition) IsMethod ¶
func (this *FunctionDefinition) IsMethod() bool
--------------------------------------------------------------------
func (*FunctionDefinition) SetEntityPath ¶ added in v0.2.1
func (this *FunctionDefinition) SetEntityPath(key string, val string)
--------------------------------------------------------------------
func (*FunctionDefinition) SetTag ¶
func (this *FunctionDefinition) SetTag(tag string, val string)
--------------------------------------------------------------------
type GlobalDefinition ¶
type GlobalDefinition struct { ArgDefinition Getter *FunctionDefinition `json:"getter"` Setter *FunctionDefinition `json:"setter"` }
--------------------------------------------------------------------
func NewGlobalDefinition ¶
func NewGlobalDefinition(name string, ffiType MetaFFIType, getter string, setter string) *GlobalDefinition
--------------------------------------------------------------------
func NewGlobalDefinitionWithAlias ¶
func NewGlobalDefinitionWithAlias(name string, ffiType MetaFFIType, alias string, getter string, setter string) *GlobalDefinition
--------------------------------------------------------------------
func (*GlobalDefinition) GetEntityIDName ¶
func (this *GlobalDefinition) GetEntityIDName() string
--------------------------------------------------------------------
type IDLDefinition ¶
type IDLDefinition struct { IDLSource string `json:"idl_source"` IDLExtension string `json:"idl_extension"` IDLFilenameWithExtension string `json:"idl_filename_with_extension"` IDLFullPath string `json:"idl_full_path"` MetaFFIGuestLib string `json:"metaffi_guest_lib"` TargetLanguage string `json:"target_language"` Modules []*ModuleDefinition `json:"modules"` }
--------------------------------------------------------------------
func NewIDLDefinition ¶
func NewIDLDefinition(idlFullPath string, targetLanguage string) *IDLDefinition
--------------------------------------------------------------------
func NewIDLDefinitionFromJSON ¶
func NewIDLDefinitionFromJSON(idlDefinitionJson string) (*IDLDefinition, error)
--------------------------------------------------------------------
func (*IDLDefinition) AddModule ¶
func (this *IDLDefinition) AddModule(m *ModuleDefinition)
--------------------------------------------------------------------
func (*IDLDefinition) FinalizeConstruction ¶
func (this *IDLDefinition) FinalizeConstruction()
--------------------------------------------------------------------
func (*IDLDefinition) ReplaceKeywords ¶
func (this *IDLDefinition) ReplaceKeywords(mapping map[string]string)
-------------------------------------------------------------------- in case a name is a keyword, it must be replaced use this method to replace keywords
func (*IDLDefinition) String ¶
func (this *IDLDefinition) String() string
--------------------------------------------------------------------
func (*IDLDefinition) ToJSON ¶
func (this *IDLDefinition) ToJSON() (string, error)
--------------------------------------------------------------------
type MetaFFIType ¶
type MetaFFIType string
type MetaFFITypeInfo ¶
type MetaFFITypeInfo struct { StringType MetaFFIType Alias string Type uint64 Dimensions int }
func (*MetaFFITypeInfo) AsCMetaFFITypeInfo ¶
func (m *MetaFFITypeInfo) AsCMetaFFITypeInfo() C.struct_metaffi_type_info
func (*MetaFFITypeInfo) FillMetaFFITypeFromStringMetaFFIType ¶
func (this *MetaFFITypeInfo) FillMetaFFITypeFromStringMetaFFIType()
type MethodDefinition ¶
type MethodDefinition struct { FunctionDefinition InstanceRequired bool `json:"instance_required"` // contains filtered or unexported fields }
--------------------------------------------------------------------
func NewMethodDefinition ¶
func NewMethodDefinition(parent *ClassDefinition, name string, instanceRequired bool) *MethodDefinition
--------------------------------------------------------------------
func NewMethodDefinitionWithFunction ¶
func NewMethodDefinitionWithFunction(parent *ClassDefinition, function *FunctionDefinition, instanceRequired bool) *MethodDefinition
--------------------------------------------------------------------
func (*MethodDefinition) AddParameter ¶
func (this *MethodDefinition) AddParameter(definition *ArgDefinition) *MethodDefinition
--------------------------------------------------------------------
func (*MethodDefinition) AddReturnValues ¶
func (this *MethodDefinition) AddReturnValues(definition *ArgDefinition) *MethodDefinition
--------------------------------------------------------------------
func (*MethodDefinition) Duplicate ¶
func (this *MethodDefinition) Duplicate() *MethodDefinition
--------------------------------------------------------------------
func (*MethodDefinition) EntityPathAsString ¶ added in v0.2.1
func (this *MethodDefinition) EntityPathAsString(definition *IDLDefinition) string
--------------------------------------------------------------------
func (*MethodDefinition) GetEntityIDName ¶
func (this *MethodDefinition) GetEntityIDName() string
--------------------------------------------------------------------
func (*MethodDefinition) GetParent ¶
func (this *MethodDefinition) GetParent() *ClassDefinition
--------------------------------------------------------------------
func (*MethodDefinition) IsMethod ¶
func (this *MethodDefinition) IsMethod() bool
--------------------------------------------------------------------
func (*MethodDefinition) SetParent ¶
func (this *MethodDefinition) SetParent(parent *ClassDefinition)
--------------------------------------------------------------------
type MethodType ¶
type MethodType string
const ( FUNCTION MethodType = "function" METHOD MethodType = "method" CONSTRUCTOR MethodType = "constructor" DESTRUCTOR MethodType = "destructor" )
type ModuleDefinition ¶
type ModuleDefinition struct { Name string `json:"name"` Comment string `json:"comment"` Tags map[string]string `json:"tags"` Functions []*FunctionDefinition `json:"functions"` Classes []*ClassDefinition `json:"classes"` Globals []*GlobalDefinition `json:"globals"` ExternalResources []string `json:"external_resources"` }
func NewModuleDefinition ¶
func NewModuleDefinition(name string) *ModuleDefinition
--------------------------------------------------------------------
func (*ModuleDefinition) AddClass ¶
func (this *ModuleDefinition) AddClass(c *ClassDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) AddClasses ¶
func (this *ModuleDefinition) AddClasses(cs []*ClassDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) AddExternalResource ¶
func (this *ModuleDefinition) AddExternalResource(r string)
--------------------------------------------------------------------
func (*ModuleDefinition) AddExternalResourceIfNotExist ¶
func (this *ModuleDefinition) AddExternalResourceIfNotExist(r string)
--------------------------------------------------------------------
func (*ModuleDefinition) AddFunction ¶
func (this *ModuleDefinition) AddFunction(f *FunctionDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) AddFunctions ¶
func (this *ModuleDefinition) AddFunctions(fs []*FunctionDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) AddGlobal ¶
func (this *ModuleDefinition) AddGlobal(g *GlobalDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) AddGlobals ¶
func (this *ModuleDefinition) AddGlobals(gs []*GlobalDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) AppendComment ¶
func (this *ModuleDefinition) AppendComment(comment string)
--------------------------------------------------------------------
func (*ModuleDefinition) GetCallablesByName ¶
func (this *ModuleDefinition) GetCallablesByName(name string, searchFunctions bool, searchMethods bool, searchConstructors bool) (functions []*FunctionDefinition, methods []*MethodDefinition, constructors []*ConstructorDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) GetCallablesWithOptionalParameters ¶
func (this *ModuleDefinition) GetCallablesWithOptionalParameters(searchFunctions bool, searchMethods bool, searchConstructors bool) (functions []*FunctionDefinition, methods []*MethodDefinition, constructors []*ConstructorDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) GetEntityPathSet ¶ added in v0.2.1
func (this *ModuleDefinition) GetEntityPathSet(key string) []string
-------------------------------------------------------------------- get set of all contained function paths
func (*ModuleDefinition) GetOverloadedCallables ¶
func (this *ModuleDefinition) GetOverloadedCallables(searchFunctions bool, searchMethods bool, searchConstructors bool) (functions [][]*FunctionDefinition, methods [][]*MethodDefinition, constructors [][]*ConstructorDefinition)
--------------------------------------------------------------------
func (*ModuleDefinition) IsContainsClass ¶
func (this *ModuleDefinition) IsContainsClass(clsName string) bool
--------------------------------------------------------------------
func (*ModuleDefinition) SetEntityPath ¶ added in v0.2.1
func (this *ModuleDefinition) SetEntityPath(key string, val string)
--------------------------------------------------------------------
func (*ModuleDefinition) SetTag ¶
func (this *ModuleDefinition) SetTag(tag string, val string)
--------------------------------------------------------------------
type ReleaseDefinition ¶
type ReleaseDefinition struct {
MethodDefinition
}
--------------------------------------------------------------------
func NewReleaserDefinition ¶
func NewReleaserDefinition(parent *ClassDefinition, name string) *ReleaseDefinition
--------------------------------------------------------------------
func NewReleaserDefinitionFromFunctionDefinition ¶
func NewReleaserDefinitionFromFunctionDefinition(parent *ClassDefinition, f *FunctionDefinition) *ReleaseDefinition
--------------------------------------------------------------------
func (*ReleaseDefinition) IsMethod ¶
func (this *ReleaseDefinition) IsMethod() bool
--------------------------------------------------------------------