C# Class ToLuaExport, tolua

显示文件 Open project: topameng/tolua Class Usage Examples

Public Properties

Property Type Description
allTypes List
baseType Type
className string
eventSet HashSet
extendList List
extendMethod List
extendName string
extendType Type
isStaticClass bool
libClassName string
memberFilter List
type Type
wrapClassName string

Public Methods

Method Description
Clear ( ) : void
CombineTypeStr ( string space, string name ) : string
ConvertToLibSign ( string str ) : string
GenDelegates ( DelegateType, list ) : void
GenEventFunction ( Type t, StringBuilder sb ) : void
GenOverrideFunc ( string name ) : MethodInfo
GenOverrideFuncBody ( MethodInfo md, bool beIf ) : void
Generate ( string dir ) : void
GetBaseTypeStr ( Type t ) : string
GetNameSpace ( Type t, string &libName ) : string
GetTypeStr ( Type t ) : string
HasAttribute ( MemberInfo mb, Type atrtype ) : bool
IsByteBuffer ( MemberInfo mb ) : bool
IsByteBuffer ( Type type ) : bool
IsDelegateType ( Type t ) : bool
IsMemberFilter ( MemberInfo mi ) : bool
IsMemberFilter ( Type t ) : bool
IsObsolete ( MemberInfo mb ) : bool

Private Methods

Method Description
BeDropMethodType ( MethodInfo md ) : bool
BeginCodeGen ( ) : void
BeginTry ( ) : void
CallOpFunction ( string name, int count, string ret ) : void
CheckObject ( string head, Type type, string className, int pos ) : void
CheckObjectNull ( ) : void
Compare ( MethodBase lhs, MethodBase rhs ) : int
CompareMethod ( MethodBase l, MethodBase r ) : int
CompareParmsCount ( MethodBase l, MethodBase r ) : bool
DefaultConstruct ( ) : void
EndCodeGen ( string dir ) : void
EndTry ( ) : void
GenBaseOpFunction ( List list ) : void
GenConstructFunction ( ) : void
GenDelegateBody ( StringBuilder sb, Type t, string head, bool hasSelf = false ) : void
GenEnum ( ) : void
GenEventFunctions ( ) : void
GenFunction ( MethodInfo m ) : void
GenFunctions ( ) : void
GenGetEventStr ( string varName, Type varType ) : void
GenGetFieldStr ( string varName, Type varType, bool isStatic, bool isByteBuffer, bool beOverride = false ) : void
GenIndexFunc ( ) : void
GenItemPropertyFunction ( ) : void
GenLuaFunctionRetValue ( StringBuilder sb, Type t, string head, string name, bool beDefined = false ) : void
GenNewIndexFunc ( ) : void
GenOutFunction ( ) : void
GenParamTypes ( ParameterInfo p, MethodBase mb ) : string
GenPushStr ( Type t, string arg, string head, bool isByteBuffer = false ) : void
GenRegisterEventTypes ( ) : void
GenRegisterFuncItems ( ) : void
GenRegisterFunction ( ) : void
GenRegisterOpItems ( ) : void
GenRegisterVariables ( ) : void
GenSetEventStr ( string varName, Type varType, bool isStatic ) : void
GenSetFieldStr ( string varName, Type varType, bool isStatic, bool beOverride = false ) : void
GetCountStr ( int count ) : string
GetDefaultDelegateBody ( MethodInfo md ) : string
GetDelegateParams ( MethodInfo mi ) : string
GetDelegateTypeFromMethodParams ( MethodInfo m ) : void
GetGenericBaseType ( MethodBase md, Type t ) : Type
GetGenericNameSpace ( Type t, string &libName ) : string
GetMethodName ( MethodInfo md ) : string
GetMethodType ( MethodBase md, PropertyInfo &pi ) : int
GetOp ( string name ) : MetaOp
GetOptionalParamPos ( ParameterInfo infos ) : int
GetPushFunction ( Type t, bool isByteBuffer = false ) : string
GetRefBaseType ( Type argType ) : Type
GetReturnValue ( Type t ) : string
GetTypeOf ( Type t, string sep ) : string
HasDecimal ( ParameterInfo pi ) : bool
HasOptionalParam ( ParameterInfo infos ) : bool
InitCtorList ( ) : void
InitMethods ( ) : void
InitPropertyList ( ) : void
IsExtendFunction ( MethodBase mb ) : bool
IsGenericConstraintType ( Type t ) : bool
IsGenericConstraints ( Type constraints ) : bool
IsGenericMethod ( MethodInfo md ) : bool
IsGenericType ( MethodInfo md, Type t ) : bool
IsItemThis ( PropertyInfo info ) : bool
IsNeedOp ( string name ) : bool
IsNumberEnum ( Type t ) : bool
IsParams ( ParameterInfo param ) : bool
IsThisArray ( MethodInfo md, int count ) : bool
ProcessArg ( Type varType, string head, string arg, int stackPos, bool beCheckTypes = false, bool beParams = false, bool beOutArg = false ) : void
ProcessEditorExtend ( Type extendType, List list ) : void
ProcessExtendType ( Type extendType, List list, List extendList ) : void
ProcessExtends ( List list ) : void
ProcessParams ( MethodBase md, int tab, bool beConstruct, bool beCheckTypes = false ) : int
Push ( List list, MethodInfo r ) : void
RemoveChar ( string str, char c ) : string
SaveFile ( string file ) : void
ToLuaExport ( ) : System
ToObject ( string head, Type type, string className, int pos ) : void

Method Details

Clear() public static method

public static Clear ( ) : void
return void

CombineTypeStr() public static method

public static CombineTypeStr ( string space, string name ) : string
space string
name string
return string

ConvertToLibSign() public static method

public static ConvertToLibSign ( string str ) : string
str string
return string

GenDelegates() public static method

public static GenDelegates ( DelegateType, list ) : void
list DelegateType,
return void

GenEventFunction() public static method

public static GenEventFunction ( Type t, StringBuilder sb ) : void
t Type
sb StringBuilder
return void

GenOverrideFunc() public static method

public static GenOverrideFunc ( string name ) : MethodInfo
name string
return MethodInfo

GenOverrideFuncBody() public static method

public static GenOverrideFuncBody ( MethodInfo md, bool beIf ) : void
md MethodInfo
beIf bool
return void

Generate() public static method

public static Generate ( string dir ) : void
dir string
return void

GetBaseTypeStr() public static method

public static GetBaseTypeStr ( Type t ) : string
t Type
return string

GetNameSpace() public static method

public static GetNameSpace ( Type t, string &libName ) : string
t Type
libName string
return string

GetTypeStr() public static method

public static GetTypeStr ( Type t ) : string
t Type
return string

HasAttribute() public static method

public static HasAttribute ( MemberInfo mb, Type atrtype ) : bool
mb MemberInfo
atrtype Type
return bool

IsByteBuffer() public static method

public static IsByteBuffer ( MemberInfo mb ) : bool
mb MemberInfo
return bool

IsByteBuffer() public static method

public static IsByteBuffer ( Type type ) : bool
type Type
return bool

IsDelegateType() public static method

public static IsDelegateType ( Type t ) : bool
t Type
return bool

IsMemberFilter() public static method

public static IsMemberFilter ( MemberInfo mi ) : bool
mi MemberInfo
return bool

IsMemberFilter() public static method

public static IsMemberFilter ( Type t ) : bool
t Type
return bool

IsObsolete() public static method

public static IsObsolete ( MemberInfo mb ) : bool
mb MemberInfo
return bool

Property Details

allTypes public_oe static_oe property

public static List allTypes
return List

baseType public_oe static_oe property

public static Type baseType
return Type

className public_oe static_oe property

public static string className
return string

eventSet public_oe static_oe property

public static HashSet eventSet
return HashSet

extendList public_oe static_oe property

public static List extendList
return List

extendMethod public_oe static_oe property

public static List extendMethod
return List

extendName public_oe static_oe property

public static string extendName
return string

extendType public_oe static_oe property

public static Type extendType
return Type

isStaticClass public_oe static_oe property

public static bool isStaticClass
return bool

libClassName public_oe static_oe property

public static string libClassName
return string

memberFilter public_oe static_oe property

public static List memberFilter
return List

type public_oe static_oe property

public static Type type
return Type

wrapClassName public_oe static_oe property

public static string wrapClassName
return string