C# Class IronPython.Modules.ModuleOps

Provides helper functions which need to be called from generated code to implement various portions of modules.
Show file Open project: jschementi/iron Class Usage Examples

Public Methods

Method Description
CallbackException ( Exception e, CodeContext context ) : void
CharToString ( byte c ) : string
CheckCDataType ( object o, object type ) : CTypes.CData
CheckFunctionId ( CTypes func, int id ) : bool
CheckNativeArgument ( object o, object type ) : CTypes.CData
CheckSimpleCDataType ( object o, object type ) : CTypes.CData
CreateCData ( IntPtr dataAddress, IronPython.Runtime.Types.PythonType type ) : object
CreateCFunction ( IntPtr address, IronPython.Runtime.Types.PythonType type ) : object
CreateMemoryHolder ( IntPtr data, int size ) : object
CreateNativeWrapper ( IronPython.Runtime.Types.PythonType type, object holder ) : object
CreateSubclassInstance ( object type, object instance ) : object
DoErrorCheck ( object errCheckFunc, object result, object func, object arguments ) : object
EnsureString ( object o ) : string
GetBoolean ( object value, object type ) : byte
GetBytes ( System.Bytes bytes ) : byte[]
GetChar ( object value, object type ) : byte
GetCharPointer ( object value ) : IntPtr
GetDouble ( object value, object type ) : double
GetDoubleBits ( object value ) : long
GetFunctionPointerValue ( object o, object type ) : IntPtr
GetObject ( object value ) : IntPtr
GetPointer ( object value ) : IntPtr
GetSignedByte ( object value, object type ) : byte
GetSignedInt ( object value, object type ) : int
GetSignedLong ( object value, object type ) : int
GetSignedLongLong ( object value, object type ) : long
GetSignedShort ( object value, object type ) : short
GetSingle ( object value, object type ) : float
GetSingleBits ( object value ) : int
GetUnsignedByte ( object value, object type ) : byte
GetUnsignedInt ( object value, object type ) : int
GetUnsignedLong ( object value, object type ) : int
GetUnsignedLongLong ( object value, object type ) : long
GetUnsignedShort ( object value, object type ) : short
GetVariantBool ( object value, object type ) : int
GetWChar ( object value, object type ) : char
GetWCharPointer ( object value ) : IntPtr
IntPtrToObject ( IntPtr address ) : object
StringToChar ( string s ) : char
StringToHGlobalAnsi ( string str ) : IntPtr
StringToHGlobalUni ( string str ) : IntPtr
TryCheckBytes ( object o ) : byte[]
TryCheckCDataPointerType ( object o, object type ) : CTypes.CData
TryCheckCharArray ( object o ) : CTypes._Array
TryCheckWCharArray ( object o ) : CTypes._Array
WCharToString ( char c ) : string

Private Methods

Method Description
ArgumentError ( object type, string expected, object got ) : Exception

Method Details

CallbackException() public static method

public static CallbackException ( Exception e, CodeContext context ) : void
e System.Exception
context CodeContext
return void

CharToString() public static method

public static CharToString ( byte c ) : string
c byte
return string

CheckCDataType() public static method

public static CheckCDataType ( object o, object type ) : CTypes.CData
o object
type object
return CTypes.CData

CheckFunctionId() public static method

public static CheckFunctionId ( CTypes func, int id ) : bool
func CTypes
id int
return bool

CheckNativeArgument() public static method

public static CheckNativeArgument ( object o, object type ) : CTypes.CData
o object
type object
return CTypes.CData

CheckSimpleCDataType() public static method

public static CheckSimpleCDataType ( object o, object type ) : CTypes.CData
o object
type object
return CTypes.CData

CreateCData() public static method

public static CreateCData ( IntPtr dataAddress, IronPython.Runtime.Types.PythonType type ) : object
dataAddress System.IntPtr
type IronPython.Runtime.Types.PythonType
return object

CreateCFunction() public static method

public static CreateCFunction ( IntPtr address, IronPython.Runtime.Types.PythonType type ) : object
address System.IntPtr
type IronPython.Runtime.Types.PythonType
return object

CreateMemoryHolder() public static method

public static CreateMemoryHolder ( IntPtr data, int size ) : object
data System.IntPtr
size int
return object

CreateNativeWrapper() public static method

public static CreateNativeWrapper ( IronPython.Runtime.Types.PythonType type, object holder ) : object
type IronPython.Runtime.Types.PythonType
holder object
return object

CreateSubclassInstance() public static method

public static CreateSubclassInstance ( object type, object instance ) : object
type object
instance object
return object

DoErrorCheck() public static method

public static DoErrorCheck ( object errCheckFunc, object result, object func, object arguments ) : object
errCheckFunc object
result object
func object
arguments object
return object

EnsureString() public static method

public static EnsureString ( object o ) : string
o object
return string

GetBoolean() public static method

public static GetBoolean ( object value, object type ) : byte
value object
type object
return byte

GetBytes() public static method

public static GetBytes ( System.Bytes bytes ) : byte[]
bytes System.Bytes
return byte[]

GetChar() public static method

public static GetChar ( object value, object type ) : byte
value object
type object
return byte

GetCharPointer() public static method

public static GetCharPointer ( object value ) : IntPtr
value object
return System.IntPtr

GetDouble() public static method

public static GetDouble ( object value, object type ) : double
value object
type object
return double

GetDoubleBits() public static method

public static GetDoubleBits ( object value ) : long
value object
return long

GetFunctionPointerValue() public static method

public static GetFunctionPointerValue ( object o, object type ) : IntPtr
o object
type object
return System.IntPtr

GetObject() public static method

public static GetObject ( object value ) : IntPtr
value object
return System.IntPtr

GetPointer() public static method

public static GetPointer ( object value ) : IntPtr
value object
return System.IntPtr

GetSignedByte() public static method

public static GetSignedByte ( object value, object type ) : byte
value object
type object
return byte

GetSignedInt() public static method

public static GetSignedInt ( object value, object type ) : int
value object
type object
return int

GetSignedLong() public static method

public static GetSignedLong ( object value, object type ) : int
value object
type object
return int

GetSignedLongLong() public static method

public static GetSignedLongLong ( object value, object type ) : long
value object
type object
return long

GetSignedShort() public static method

public static GetSignedShort ( object value, object type ) : short
value object
type object
return short

GetSingle() public static method

public static GetSingle ( object value, object type ) : float
value object
type object
return float

GetSingleBits() public static method

public static GetSingleBits ( object value ) : int
value object
return int

GetUnsignedByte() public static method

public static GetUnsignedByte ( object value, object type ) : byte
value object
type object
return byte

GetUnsignedInt() public static method

public static GetUnsignedInt ( object value, object type ) : int
value object
type object
return int

GetUnsignedLong() public static method

public static GetUnsignedLong ( object value, object type ) : int
value object
type object
return int

GetUnsignedLongLong() public static method

public static GetUnsignedLongLong ( object value, object type ) : long
value object
type object
return long

GetUnsignedShort() public static method

public static GetUnsignedShort ( object value, object type ) : short
value object
type object
return short

GetVariantBool() public static method

public static GetVariantBool ( object value, object type ) : int
value object
type object
return int

GetWChar() public static method

public static GetWChar ( object value, object type ) : char
value object
type object
return char

GetWCharPointer() public static method

public static GetWCharPointer ( object value ) : IntPtr
value object
return System.IntPtr

IntPtrToObject() public static method

public static IntPtrToObject ( IntPtr address ) : object
address System.IntPtr
return object

StringToChar() public static method

public static StringToChar ( string s ) : char
s string
return char

StringToHGlobalAnsi() public static method

public static StringToHGlobalAnsi ( string str ) : IntPtr
str string
return System.IntPtr

StringToHGlobalUni() public static method

public static StringToHGlobalUni ( string str ) : IntPtr
str string
return System.IntPtr

TryCheckBytes() public static method

public static TryCheckBytes ( object o ) : byte[]
o object
return byte[]

TryCheckCDataPointerType() public static method

public static TryCheckCDataPointerType ( object o, object type ) : CTypes.CData
o object
type object
return CTypes.CData

TryCheckCharArray() public static method

public static TryCheckCharArray ( object o ) : CTypes._Array
o object
return CTypes._Array

TryCheckWCharArray() public static method

public static TryCheckWCharArray ( object o ) : CTypes._Array
o object
return CTypes._Array

WCharToString() public static method

public static WCharToString ( char c ) : string
c char
return string