Documentation
¶
Index ¶
- func ByteToHex(data byte) string
- func PError(err string)
- func PWarning(n int, info string)
- func SetTypeMap(tm map[string]string)
- func TBaseName(tbase TBase) string
- type EReq
- type IAnnotation
- type IBaseType
- type IConst
- type IConstValue
- type IContainer
- type IDoc
- type IEnum
- type IEnumValue
- type IField
- type IFunction
- type IList
- type IMap
- type IProgram
- type IScope
- type IService
- type ISet
- type IStruct
- type IType
- type ITypedef
- type TAnnotation
- type TBase
- type TConstValueType
- type TFieldId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTypeMap ¶
Types ¶
type IAnnotation ¶
type IBaseType ¶
type IBaseType interface { IType GetBase() TBase SetStringList(val bool) IsStringList() bool SetBinary(val bool) SetStringEnum(val bool) IsStringEnum() bool AddStringEnumVal(val string) GetStringEnumVals() []string }
func NewTBaseType ¶
type IConst ¶
type IConst interface { IDoc GetType() IType GetName() string GetValue() IConstValue }
type IConstValue ¶
type IConstValue interface { SetString(val string) GetString() string SetInteger(val int64) GetInteger() int64 SetDouble(val float64) GetDouble() float64 SetMap() AddMap(key, val IConstValue) GetMap() map[IConstValue]IConstValue SetList() AddList(val IConstValue) GetList() []IConstValue SetIdentifier(val string) GetIdentifier() string GetIdentifierName() (string, error) GetIdentifierWithParent() (string, error) SetEnum(val IEnum) SetEnumVal(val IEnumValue) GetEnumVal() IEnumValue GetType() TConstValueType }
func NewConstValue ¶
func NewConstValue() IConstValue
func NewIntConstValue ¶
func NewIntConstValue(v int64) IConstValue
func NewStringConstValue ¶
func NewStringConstValue(v string) IConstValue
type IContainer ¶
type IEnum ¶
type IEnum interface { IType Append(val IEnumValue) GetConstants() []IEnumValue GetConstantByName(name string) IEnumValue GetConstantByValue(val int64) IEnumValue GetMinValue() IEnumValue GetMaxValue() IEnumValue }
type IEnumValue ¶
type IEnumValue interface { IDoc IAnnotation GetName() string GetValue() int }
func NewTEnumValue ¶
func NewTEnumValue(name string, val int) IEnumValue
type IField ¶
type IField interface { IDoc IAnnotation GetType() IType GetName() string GetKey() int SetReq(req EReq) GetReq() EReq SetValue(val IConstValue) GetValue() IConstValue SetXsdOptional(op bool) GetXsdOptional() bool SetXsdNillAble(able bool) GetXsdNillAble() bool SetXsdAttrs(attr IStruct) GetXsdAttr() IStruct SetReference(ref bool) GetReference() bool }
type IFunction ¶
type IList ¶
type IList interface { IContainer GetElemType() IType }
type IMap ¶
type IMap interface { IContainer GetKeyType() IType GetValueType() IType }
type IProgram ¶
type IProgram interface { IDoc GetPath() string GetOutPath() string IsOutputPathAbsolute() bool GetName() string GetNamespace() string GetIncludePrefix() string GetTypedefs() []ITypedef GetEnums() []IEnum GetConsts() []IConst GetStruct() []IStruct GetExceptions() []IStruct GetObjs() []IStruct GetService() []IService GetNamespacesMap() map[string]string AddTypedef(def ITypedef) AddEnum(en IEnum) AddConst(ct IConst) AddStruct(st IStruct) AddException(xp IStruct) AddService(sv IService) GetIncludes() []IProgram SetOutPath(path string, absolute bool) IsUniqueTypename(tp IType) bool SetNamespace(name string) Scope() IScope AddInclude(prog IProgram) AddIncludeNew(path, includeSite string) GetIncludeProgs() []IProgram SetPrefix(prefix string) SetNamespaceLang(lang, namespace string) GetNamespaceLang(language string) string GetAllNamespace() map[string]string SetNamespaceAnnotations(language string, annotations map[string]string) GetNamespaceAnnotations(language string) map[string]string GetAllNamespaceAnnotations() map[string]map[string]string AddCppInclude(path string) GetCppInclude() []string AddCInclude(path string) GetCInclude() []string }
func NewProgram ¶
func NewProgramFile ¶
type IScope ¶
type IService ¶
type IService interface { IType IsService() bool SetExtends(extends IService) AddFunction(function IFunction) GetFunctions() []IFunction GetExtends() IService }
func NewTService ¶
type ISet ¶
type ISet interface { IContainer GetElemType() IType }
type IStruct ¶
type IStruct interface { IType SetException(is bool) SetUnion(is bool) SetXsdAll(all bool) GetXsdAll() bool Append(field IField) bool GetMembers() []IField GetSortedMembers() []IField IsException() bool IsUnion() bool GetFieldByName(name string) IField }
func NewTStruct ¶
type IType ¶
type IType interface { IDoc IAnnotation SetName(name_ string) GetName() string IsVoid() bool IsBaseType() bool IsString() bool IsBinary() bool IsBool() bool IsTypedef() bool IsEnum() bool IsStruct() bool IsXExcption() bool IsContainer() bool IsList() bool IsSet() bool IsMap() bool IsSerivce() bool GetProgram() IProgram GetTrueType() IType ByteToHex(data byte) string }
func NewTypeDefault ¶
func NewTypeDefault() IType
func NewTypeName ¶
func NewTypeProgram ¶
type TAnnotation ¶
type TConstValueType ¶
type TConstValueType int
const ( CV_UNKNOWN TConstValueType = iota CV_INTEGER CV_DOUBLE CV_STRING CV_MAP CV_LIST CV_IDENTIFIER CV_ENUM )
Click to show internal directories.
Click to hide internal directories.