objective-lol 0.0.1__cp312-cp312-win_amd64.whl → 0.0.2__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- objective_lol/_api.cp312-win_amd64.h +82 -82
- objective_lol/_api.cp312-win_amd64.pyd +0 -0
- objective_lol/api.c +941 -941
- objective_lol/api.go +510 -510
- objective_lol/api.py +520 -520
- objective_lol/api_go.h +82 -82
- objective_lol/build.py +68 -68
- {objective_lol-0.0.1.dist-info → objective_lol-0.0.2.dist-info}/METADATA +17 -1
- objective_lol-0.0.2.dist-info/RECORD +14 -0
- objective_lol-0.0.1.dist-info/RECORD +0 -14
- {objective_lol-0.0.1.dist-info → objective_lol-0.0.2.dist-info}/WHEEL +0 -0
- {objective_lol-0.0.1.dist-info → objective_lol-0.0.2.dist-info}/top_level.txt +0 -0
objective_lol/api.py
CHANGED
@@ -741,9 +741,9 @@ TimeoutErrorType = "timeout"
|
|
741
741
|
|
742
742
|
# ---- Structs ---
|
743
743
|
|
744
|
-
# Python type for struct api.
|
745
|
-
class
|
746
|
-
"""
|
744
|
+
# Python type for struct api.GoValue
|
745
|
+
class GoValue(go.GoClass):
|
746
|
+
""""""
|
747
747
|
def __init__(self, *args, **kwargs):
|
748
748
|
"""
|
749
749
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -757,29 +757,96 @@ class VMError(go.GoClass):
|
|
757
757
|
self.handle = args[0].handle
|
758
758
|
_api.IncRef(self.handle)
|
759
759
|
else:
|
760
|
-
self.handle = _api.
|
760
|
+
self.handle = _api.api_GoValue_CTor()
|
761
|
+
_api.IncRef(self.handle)
|
762
|
+
def __del__(self):
|
763
|
+
_api.DecRef(self.handle)
|
764
|
+
def __str__(self):
|
765
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
766
|
+
sv = 'api.GoValue{'
|
767
|
+
first = True
|
768
|
+
for v in pr:
|
769
|
+
if callable(v[1]):
|
770
|
+
continue
|
771
|
+
if first:
|
772
|
+
first = False
|
773
|
+
else:
|
774
|
+
sv += ', '
|
775
|
+
sv += v[0] + '=' + str(v[1])
|
776
|
+
return sv + '}'
|
777
|
+
def __repr__(self):
|
778
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
779
|
+
sv = 'api.GoValue ( '
|
780
|
+
for v in pr:
|
781
|
+
if not callable(v[1]):
|
782
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
783
|
+
return sv + ')'
|
784
|
+
def ID(self):
|
785
|
+
"""ID() str"""
|
786
|
+
return _api.api_GoValue_ID(self.handle)
|
787
|
+
def MarshalJSON(self):
|
788
|
+
"""MarshalJSON() []int, str"""
|
789
|
+
return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
|
790
|
+
def Type(self):
|
791
|
+
"""Type() str"""
|
792
|
+
return _api.api_GoValue_Type(self.handle)
|
793
|
+
def Int(self):
|
794
|
+
"""Int() long, str"""
|
795
|
+
return _api.api_GoValue_Int(self.handle)
|
796
|
+
def Float(self):
|
797
|
+
"""Float() float, str"""
|
798
|
+
return _api.api_GoValue_Float(self.handle)
|
799
|
+
def String(self):
|
800
|
+
"""String() str, str"""
|
801
|
+
return _api.api_GoValue_String(self.handle)
|
802
|
+
def Bool(self):
|
803
|
+
"""Bool() bool, str"""
|
804
|
+
return _api.api_GoValue_Bool(self.handle)
|
805
|
+
def Slice(self):
|
806
|
+
"""Slice() []object, str"""
|
807
|
+
return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
|
808
|
+
def Map(self):
|
809
|
+
"""Map() object, str"""
|
810
|
+
return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
|
811
|
+
def Object(self):
|
812
|
+
"""Object() object, str"""
|
813
|
+
return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
|
814
|
+
|
815
|
+
# Python type for struct api.SourceLocation
|
816
|
+
class SourceLocation(go.GoClass):
|
817
|
+
"""SourceLocation represents a location in source code\n"""
|
818
|
+
def __init__(self, *args, **kwargs):
|
819
|
+
"""
|
820
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
821
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
822
|
+
in which case a new Go object is constructed first
|
823
|
+
"""
|
824
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
825
|
+
self.handle = kwargs['handle']
|
826
|
+
_api.IncRef(self.handle)
|
827
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
828
|
+
self.handle = args[0].handle
|
829
|
+
_api.IncRef(self.handle)
|
830
|
+
else:
|
831
|
+
self.handle = _api.api_SourceLocation_CTor()
|
761
832
|
_api.IncRef(self.handle)
|
762
833
|
if 0 < len(args):
|
763
|
-
self.
|
764
|
-
if "
|
765
|
-
self.
|
834
|
+
self.Filename = args[0]
|
835
|
+
if "Filename" in kwargs:
|
836
|
+
self.Filename = kwargs["Filename"]
|
766
837
|
if 1 < len(args):
|
767
|
-
self.
|
768
|
-
if "
|
769
|
-
self.
|
838
|
+
self.Line = args[1]
|
839
|
+
if "Line" in kwargs:
|
840
|
+
self.Line = kwargs["Line"]
|
770
841
|
if 2 < len(args):
|
771
|
-
self.
|
772
|
-
if "
|
773
|
-
self.
|
774
|
-
if 4 < len(args):
|
775
|
-
self.Duration = args[4]
|
776
|
-
if "Duration" in kwargs:
|
777
|
-
self.Duration = kwargs["Duration"]
|
842
|
+
self.Column = args[2]
|
843
|
+
if "Column" in kwargs:
|
844
|
+
self.Column = kwargs["Column"]
|
778
845
|
def __del__(self):
|
779
846
|
_api.DecRef(self.handle)
|
780
847
|
def __str__(self):
|
781
848
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
782
|
-
sv = 'api.
|
849
|
+
sv = 'api.SourceLocation{'
|
783
850
|
first = True
|
784
851
|
for v in pr:
|
785
852
|
if callable(v[1]):
|
@@ -792,83 +859,255 @@ class VMError(go.GoClass):
|
|
792
859
|
return sv + '}'
|
793
860
|
def __repr__(self):
|
794
861
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
795
|
-
sv = 'api.
|
862
|
+
sv = 'api.SourceLocation ( '
|
796
863
|
for v in pr:
|
797
864
|
if not callable(v[1]):
|
798
865
|
sv += v[0] + '=' + str(v[1]) + ', '
|
799
866
|
return sv + ')'
|
800
867
|
@property
|
801
|
-
def
|
802
|
-
return _api.
|
803
|
-
@
|
804
|
-
def
|
868
|
+
def Filename(self):
|
869
|
+
return _api.api_SourceLocation_Filename_Get(self.handle)
|
870
|
+
@Filename.setter
|
871
|
+
def Filename(self, value):
|
805
872
|
if isinstance(value, go.GoClass):
|
806
|
-
_api.
|
873
|
+
_api.api_SourceLocation_Filename_Set(self.handle, value.handle)
|
807
874
|
else:
|
808
|
-
_api.
|
875
|
+
_api.api_SourceLocation_Filename_Set(self.handle, value)
|
809
876
|
@property
|
810
|
-
def
|
811
|
-
return _api.
|
812
|
-
@
|
813
|
-
def
|
877
|
+
def Line(self):
|
878
|
+
return _api.api_SourceLocation_Line_Get(self.handle)
|
879
|
+
@Line.setter
|
880
|
+
def Line(self, value):
|
814
881
|
if isinstance(value, go.GoClass):
|
815
|
-
_api.
|
882
|
+
_api.api_SourceLocation_Line_Set(self.handle, value.handle)
|
816
883
|
else:
|
817
|
-
_api.
|
884
|
+
_api.api_SourceLocation_Line_Set(self.handle, value)
|
818
885
|
@property
|
819
|
-
def
|
820
|
-
return
|
821
|
-
@
|
822
|
-
def
|
886
|
+
def Column(self):
|
887
|
+
return _api.api_SourceLocation_Column_Get(self.handle)
|
888
|
+
@Column.setter
|
889
|
+
def Column(self, value):
|
823
890
|
if isinstance(value, go.GoClass):
|
824
|
-
_api.
|
891
|
+
_api.api_SourceLocation_Column_Set(self.handle, value.handle)
|
825
892
|
else:
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
def
|
832
|
-
|
833
|
-
|
893
|
+
_api.api_SourceLocation_Column_Set(self.handle, value)
|
894
|
+
|
895
|
+
# Python type for struct api.UnknownFunctionHandler
|
896
|
+
class UnknownFunctionHandler(go.GoClass):
|
897
|
+
""""""
|
898
|
+
def __init__(self, *args, **kwargs):
|
899
|
+
"""
|
900
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
901
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
902
|
+
in which case a new Go object is constructed first
|
903
|
+
"""
|
904
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
905
|
+
self.handle = kwargs['handle']
|
906
|
+
_api.IncRef(self.handle)
|
907
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
908
|
+
self.handle = args[0].handle
|
909
|
+
_api.IncRef(self.handle)
|
834
910
|
else:
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
def
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
911
|
+
self.handle = _api.api_UnknownFunctionHandler_CTor()
|
912
|
+
_api.IncRef(self.handle)
|
913
|
+
def __del__(self):
|
914
|
+
_api.DecRef(self.handle)
|
915
|
+
def __str__(self):
|
916
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
917
|
+
sv = 'api.UnknownFunctionHandler{'
|
918
|
+
first = True
|
919
|
+
for v in pr:
|
920
|
+
if callable(v[1]):
|
921
|
+
continue
|
922
|
+
if first:
|
923
|
+
first = False
|
924
|
+
else:
|
925
|
+
sv += ', '
|
926
|
+
sv += v[0] + '=' + str(v[1])
|
927
|
+
return sv + '}'
|
928
|
+
def __repr__(self):
|
929
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
930
|
+
sv = 'api.UnknownFunctionHandler ( '
|
931
|
+
for v in pr:
|
932
|
+
if not callable(v[1]):
|
933
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
934
|
+
return sv + ')'
|
935
|
+
|
936
|
+
# Python type for struct api.VM
|
937
|
+
class VM(go.GoClass):
|
938
|
+
"""VM represents an Objective-LOL virtual machine instance\n"""
|
939
|
+
def __init__(self, *args, **kwargs):
|
940
|
+
"""
|
941
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
942
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
943
|
+
in which case a new Go object is constructed first
|
944
|
+
"""
|
945
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
946
|
+
self.handle = kwargs['handle']
|
947
|
+
_api.IncRef(self.handle)
|
948
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
949
|
+
self.handle = args[0].handle
|
950
|
+
_api.IncRef(self.handle)
|
951
|
+
else:
|
952
|
+
self.handle = _api.api_VM_CTor()
|
953
|
+
_api.IncRef(self.handle)
|
954
|
+
def __del__(self):
|
955
|
+
_api.DecRef(self.handle)
|
956
|
+
def __str__(self):
|
957
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
958
|
+
sv = 'api.VM{'
|
959
|
+
first = True
|
960
|
+
for v in pr:
|
961
|
+
if callable(v[1]):
|
962
|
+
continue
|
963
|
+
if first:
|
964
|
+
first = False
|
965
|
+
else:
|
966
|
+
sv += ', '
|
967
|
+
sv += v[0] + '=' + str(v[1])
|
968
|
+
return sv + '}'
|
969
|
+
def __repr__(self):
|
970
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
971
|
+
sv = 'api.VM ( '
|
972
|
+
for v in pr:
|
973
|
+
if not callable(v[1]):
|
974
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
975
|
+
return sv + ')'
|
976
|
+
def GetCompatibilityShim(self):
|
977
|
+
"""GetCompatibilityShim() object
|
844
978
|
|
845
|
-
|
979
|
+
GetCompatibilityShim returns a compatibility shim for the VM
|
846
980
|
"""
|
847
|
-
return _api.
|
848
|
-
def
|
849
|
-
"""
|
981
|
+
return VMCompatibilityShim(handle=_api.api_VM_GetCompatibilityShim(self.handle))
|
982
|
+
def Execute(self, code):
|
983
|
+
"""Execute(str code) object, str
|
984
|
+
|
985
|
+
Execute executes Objective-LOL code from a string
|
986
|
+
"""
|
987
|
+
return ExecutionResult(handle=_api.api_VM_Execute(self.handle, code))
|
988
|
+
def ExecuteWithContext(self, ctx, code):
|
989
|
+
"""ExecuteWithContext(object ctx, str code) object, str
|
990
|
+
|
991
|
+
ExecuteWithContext executes code with a context for cancellation/timeout
|
992
|
+
"""
|
993
|
+
return ExecutionResult(handle=_api.api_VM_ExecuteWithContext(self.handle, ctx.handle, code))
|
994
|
+
def NewObjectInstance(self, className):
|
995
|
+
"""NewObjectInstance(str className) object, str"""
|
996
|
+
return GoValue(handle=_api.api_VM_NewObjectInstance(self.handle, className))
|
997
|
+
def Call(self, functionName, args):
|
998
|
+
"""Call(str functionName, []object args) object, str
|
999
|
+
|
1000
|
+
Call calls an Objective-LOL function with the given arguments
|
1001
|
+
"""
|
1002
|
+
return GoValue(handle=_api.api_VM_Call(self.handle, functionName, args.handle))
|
1003
|
+
def CallMethod(self, object, methodName, args):
|
1004
|
+
"""CallMethod(object object, str methodName, []object args) object, str
|
1005
|
+
|
1006
|
+
CallMethod calls a method on an Objective-LOL object
|
1007
|
+
"""
|
1008
|
+
return GoValue(handle=_api.api_VM_CallMethod(self.handle, object.handle, methodName, args.handle))
|
1009
|
+
def DefineVariable(self, name, value, constant):
|
1010
|
+
"""DefineVariable(str name, object value, bool constant) str
|
850
1011
|
|
851
|
-
|
1012
|
+
DefineVariable defines a global variable in the VM
|
852
1013
|
"""
|
853
|
-
return _api.
|
854
|
-
def
|
855
|
-
"""
|
1014
|
+
return _api.api_VM_DefineVariable(self.handle, name, value.handle, constant)
|
1015
|
+
def SetVariable(self, variableName, value):
|
1016
|
+
"""SetVariable(str variableName, object value) str
|
856
1017
|
|
857
|
-
|
1018
|
+
SetVariable sets a variable in the global environment
|
858
1019
|
"""
|
859
|
-
return _api.
|
860
|
-
def
|
861
|
-
"""
|
1020
|
+
return _api.api_VM_SetVariable(self.handle, variableName, value.handle)
|
1021
|
+
def GetVariable(self, variableName):
|
1022
|
+
"""GetVariable(str variableName) object, str
|
862
1023
|
|
863
|
-
|
1024
|
+
Get gets a variable from the global environment
|
864
1025
|
"""
|
865
|
-
return _api.
|
866
|
-
def
|
867
|
-
"""
|
1026
|
+
return GoValue(handle=_api.api_VM_GetVariable(self.handle, variableName))
|
1027
|
+
def DefineClass(self, classDef):
|
1028
|
+
"""DefineClass(object classDef) str"""
|
1029
|
+
return _api.api_VM_DefineClass(self.handle, classDef.handle)
|
1030
|
+
|
1031
|
+
# Python type for struct api.VMCompatibilityShim
|
1032
|
+
class VMCompatibilityShim(go.GoClass):
|
1033
|
+
"""VMCompatibilityShim is a shim to provide compatibility for external\nlanguages that cannot interact with the standard VM interface through\nGo types. Message passing is done through JSON strings.\n"""
|
1034
|
+
def __init__(self, *args, **kwargs):
|
1035
|
+
"""
|
1036
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
1037
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
1038
|
+
in which case a new Go object is constructed first
|
1039
|
+
"""
|
1040
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
1041
|
+
self.handle = kwargs['handle']
|
1042
|
+
_api.IncRef(self.handle)
|
1043
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1044
|
+
self.handle = args[0].handle
|
1045
|
+
_api.IncRef(self.handle)
|
1046
|
+
else:
|
1047
|
+
self.handle = _api.api_VMCompatibilityShim_CTor()
|
1048
|
+
_api.IncRef(self.handle)
|
1049
|
+
def __del__(self):
|
1050
|
+
_api.DecRef(self.handle)
|
1051
|
+
def __str__(self):
|
1052
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1053
|
+
sv = 'api.VMCompatibilityShim{'
|
1054
|
+
first = True
|
1055
|
+
for v in pr:
|
1056
|
+
if callable(v[1]):
|
1057
|
+
continue
|
1058
|
+
if first:
|
1059
|
+
first = False
|
1060
|
+
else:
|
1061
|
+
sv += ', '
|
1062
|
+
sv += v[0] + '=' + str(v[1])
|
1063
|
+
return sv + '}'
|
1064
|
+
def __repr__(self):
|
1065
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1066
|
+
sv = 'api.VMCompatibilityShim ( '
|
1067
|
+
for v in pr:
|
1068
|
+
if not callable(v[1]):
|
1069
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
1070
|
+
return sv + ')'
|
1071
|
+
def DefineFunction(self, id, name, argc, function):
|
1072
|
+
"""DefineFunction(str id, str name, int argc, callable function) str
|
868
1073
|
|
869
|
-
|
1074
|
+
DefineFunction defines a global function with maximum compatibility,
|
1075
|
+
wrapping arguments and return values as JSON strings.
|
1076
|
+
An optional id cookie is passed back to the function to identify it.
|
1077
|
+
jsonArgs is a JSON array string of the arguments.
|
1078
|
+
The function should return a JSON object string with "result" and "error" fields.
|
870
1079
|
"""
|
871
|
-
return _api.
|
1080
|
+
return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
|
1081
|
+
def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
|
1082
|
+
"""BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
|
1083
|
+
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
|
1084
|
+
def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
|
1085
|
+
"""BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
|
1086
|
+
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
|
1087
|
+
def BuildNewClassMethod(self, method, id, function):
|
1088
|
+
"""BuildNewClassMethod(object method, str id, callable function) object"""
|
1089
|
+
return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
|
1090
|
+
def BuildNewUnknownFunctionHandler(self, id, function):
|
1091
|
+
"""BuildNewUnknownFunctionHandler(str id, callable function) object"""
|
1092
|
+
return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
|
1093
|
+
def IsClassDefined(self, name):
|
1094
|
+
"""IsClassDefined(str name) bool"""
|
1095
|
+
return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
|
1096
|
+
def LookupObject(self, id):
|
1097
|
+
"""LookupObject(str id) object, str"""
|
1098
|
+
return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
|
1099
|
+
def GetObjectMRO(self, id):
|
1100
|
+
"""GetObjectMRO(str id) []str, str"""
|
1101
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
|
1102
|
+
def GetObjectImmediateFunctions(self, id):
|
1103
|
+
"""GetObjectImmediateFunctions(str id) []str, str"""
|
1104
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
|
1105
|
+
def GetObjectImmediateVariables(self, id):
|
1106
|
+
"""GetObjectImmediateVariables(str id) []str, str"""
|
1107
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
|
1108
|
+
def AddVariableToObject(self, id, variable):
|
1109
|
+
"""AddVariableToObject(str id, object variable) str"""
|
1110
|
+
return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
|
872
1111
|
|
873
1112
|
# Python type for struct api.ClassDefinition
|
874
1113
|
class ClassDefinition(go.GoClass):
|
@@ -998,160 +1237,13 @@ class ClassDefinition(go.GoClass):
|
|
998
1237
|
@UnknownFunctionHandler.setter
|
999
1238
|
def UnknownFunctionHandler(self, value):
|
1000
1239
|
if isinstance(value, go.GoClass):
|
1001
|
-
_api.api_ClassDefinition_UnknownFunctionHandler_Set(self.handle, value.handle)
|
1002
|
-
else:
|
1003
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1004
|
-
|
1005
|
-
# Python type for struct api.ClassMethod
|
1006
|
-
class ClassMethod(go.GoClass):
|
1007
|
-
""""""
|
1008
|
-
def __init__(self, *args, **kwargs):
|
1009
|
-
"""
|
1010
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1011
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1012
|
-
in which case a new Go object is constructed first
|
1013
|
-
"""
|
1014
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
1015
|
-
self.handle = kwargs['handle']
|
1016
|
-
_api.IncRef(self.handle)
|
1017
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1018
|
-
self.handle = args[0].handle
|
1019
|
-
_api.IncRef(self.handle)
|
1020
|
-
else:
|
1021
|
-
self.handle = _api.api_ClassMethod_CTor()
|
1022
|
-
_api.IncRef(self.handle)
|
1023
|
-
if 0 < len(args):
|
1024
|
-
self.Name = args[0]
|
1025
|
-
if "Name" in kwargs:
|
1026
|
-
self.Name = kwargs["Name"]
|
1027
|
-
if 1 < len(args):
|
1028
|
-
self.Argc = args[1]
|
1029
|
-
if "Argc" in kwargs:
|
1030
|
-
self.Argc = kwargs["Argc"]
|
1031
|
-
def __del__(self):
|
1032
|
-
_api.DecRef(self.handle)
|
1033
|
-
def __str__(self):
|
1034
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1035
|
-
sv = 'api.ClassMethod{'
|
1036
|
-
first = True
|
1037
|
-
for v in pr:
|
1038
|
-
if callable(v[1]):
|
1039
|
-
continue
|
1040
|
-
if first:
|
1041
|
-
first = False
|
1042
|
-
else:
|
1043
|
-
sv += ', '
|
1044
|
-
sv += v[0] + '=' + str(v[1])
|
1045
|
-
return sv + '}'
|
1046
|
-
def __repr__(self):
|
1047
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1048
|
-
sv = 'api.ClassMethod ( '
|
1049
|
-
for v in pr:
|
1050
|
-
if not callable(v[1]):
|
1051
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
1052
|
-
return sv + ')'
|
1053
|
-
@property
|
1054
|
-
def Name(self):
|
1055
|
-
return _api.api_ClassMethod_Name_Get(self.handle)
|
1056
|
-
@Name.setter
|
1057
|
-
def Name(self, value):
|
1058
|
-
if isinstance(value, go.GoClass):
|
1059
|
-
_api.api_ClassMethod_Name_Set(self.handle, value.handle)
|
1060
|
-
else:
|
1061
|
-
_api.api_ClassMethod_Name_Set(self.handle, value)
|
1062
|
-
@property
|
1063
|
-
def Argc(self):
|
1064
|
-
return _api.api_ClassMethod_Argc_Get(self.handle)
|
1065
|
-
@Argc.setter
|
1066
|
-
def Argc(self, value):
|
1067
|
-
if isinstance(value, go.GoClass):
|
1068
|
-
_api.api_ClassMethod_Argc_Set(self.handle, value.handle)
|
1069
|
-
else:
|
1070
|
-
_api.api_ClassMethod_Argc_Set(self.handle, value)
|
1071
|
-
|
1072
|
-
# Python type for struct api.SourceLocation
|
1073
|
-
class SourceLocation(go.GoClass):
|
1074
|
-
"""SourceLocation represents a location in source code\n"""
|
1075
|
-
def __init__(self, *args, **kwargs):
|
1076
|
-
"""
|
1077
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1078
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1079
|
-
in which case a new Go object is constructed first
|
1080
|
-
"""
|
1081
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
1082
|
-
self.handle = kwargs['handle']
|
1083
|
-
_api.IncRef(self.handle)
|
1084
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1085
|
-
self.handle = args[0].handle
|
1086
|
-
_api.IncRef(self.handle)
|
1087
|
-
else:
|
1088
|
-
self.handle = _api.api_SourceLocation_CTor()
|
1089
|
-
_api.IncRef(self.handle)
|
1090
|
-
if 0 < len(args):
|
1091
|
-
self.Filename = args[0]
|
1092
|
-
if "Filename" in kwargs:
|
1093
|
-
self.Filename = kwargs["Filename"]
|
1094
|
-
if 1 < len(args):
|
1095
|
-
self.Line = args[1]
|
1096
|
-
if "Line" in kwargs:
|
1097
|
-
self.Line = kwargs["Line"]
|
1098
|
-
if 2 < len(args):
|
1099
|
-
self.Column = args[2]
|
1100
|
-
if "Column" in kwargs:
|
1101
|
-
self.Column = kwargs["Column"]
|
1102
|
-
def __del__(self):
|
1103
|
-
_api.DecRef(self.handle)
|
1104
|
-
def __str__(self):
|
1105
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1106
|
-
sv = 'api.SourceLocation{'
|
1107
|
-
first = True
|
1108
|
-
for v in pr:
|
1109
|
-
if callable(v[1]):
|
1110
|
-
continue
|
1111
|
-
if first:
|
1112
|
-
first = False
|
1113
|
-
else:
|
1114
|
-
sv += ', '
|
1115
|
-
sv += v[0] + '=' + str(v[1])
|
1116
|
-
return sv + '}'
|
1117
|
-
def __repr__(self):
|
1118
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1119
|
-
sv = 'api.SourceLocation ( '
|
1120
|
-
for v in pr:
|
1121
|
-
if not callable(v[1]):
|
1122
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
1123
|
-
return sv + ')'
|
1124
|
-
@property
|
1125
|
-
def Filename(self):
|
1126
|
-
return _api.api_SourceLocation_Filename_Get(self.handle)
|
1127
|
-
@Filename.setter
|
1128
|
-
def Filename(self, value):
|
1129
|
-
if isinstance(value, go.GoClass):
|
1130
|
-
_api.api_SourceLocation_Filename_Set(self.handle, value.handle)
|
1131
|
-
else:
|
1132
|
-
_api.api_SourceLocation_Filename_Set(self.handle, value)
|
1133
|
-
@property
|
1134
|
-
def Line(self):
|
1135
|
-
return _api.api_SourceLocation_Line_Get(self.handle)
|
1136
|
-
@Line.setter
|
1137
|
-
def Line(self, value):
|
1138
|
-
if isinstance(value, go.GoClass):
|
1139
|
-
_api.api_SourceLocation_Line_Set(self.handle, value.handle)
|
1140
|
-
else:
|
1141
|
-
_api.api_SourceLocation_Line_Set(self.handle, value)
|
1142
|
-
@property
|
1143
|
-
def Column(self):
|
1144
|
-
return _api.api_SourceLocation_Column_Get(self.handle)
|
1145
|
-
@Column.setter
|
1146
|
-
def Column(self, value):
|
1147
|
-
if isinstance(value, go.GoClass):
|
1148
|
-
_api.api_SourceLocation_Column_Set(self.handle, value.handle)
|
1240
|
+
_api.api_ClassDefinition_UnknownFunctionHandler_Set(self.handle, value.handle)
|
1149
1241
|
else:
|
1150
|
-
|
1242
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1151
1243
|
|
1152
|
-
# Python type for struct api.
|
1153
|
-
class
|
1154
|
-
"""
|
1244
|
+
# Python type for struct api.ClassMethod
|
1245
|
+
class ClassMethod(go.GoClass):
|
1246
|
+
""""""
|
1155
1247
|
def __init__(self, *args, **kwargs):
|
1156
1248
|
"""
|
1157
1249
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1165,13 +1257,21 @@ class VM(go.GoClass):
|
|
1165
1257
|
self.handle = args[0].handle
|
1166
1258
|
_api.IncRef(self.handle)
|
1167
1259
|
else:
|
1168
|
-
self.handle = _api.
|
1260
|
+
self.handle = _api.api_ClassMethod_CTor()
|
1169
1261
|
_api.IncRef(self.handle)
|
1262
|
+
if 0 < len(args):
|
1263
|
+
self.Name = args[0]
|
1264
|
+
if "Name" in kwargs:
|
1265
|
+
self.Name = kwargs["Name"]
|
1266
|
+
if 1 < len(args):
|
1267
|
+
self.Argc = args[1]
|
1268
|
+
if "Argc" in kwargs:
|
1269
|
+
self.Argc = kwargs["Argc"]
|
1170
1270
|
def __del__(self):
|
1171
1271
|
_api.DecRef(self.handle)
|
1172
1272
|
def __str__(self):
|
1173
1273
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1174
|
-
sv = 'api.
|
1274
|
+
sv = 'api.ClassMethod{'
|
1175
1275
|
first = True
|
1176
1276
|
for v in pr:
|
1177
1277
|
if callable(v[1]):
|
@@ -1184,69 +1284,33 @@ class VM(go.GoClass):
|
|
1184
1284
|
return sv + '}'
|
1185
1285
|
def __repr__(self):
|
1186
1286
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1187
|
-
sv = 'api.
|
1287
|
+
sv = 'api.ClassMethod ( '
|
1188
1288
|
for v in pr:
|
1189
1289
|
if not callable(v[1]):
|
1190
1290
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1191
1291
|
return sv + ')'
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
return
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
def NewObjectInstance(self, className):
|
1211
|
-
"""NewObjectInstance(str className) object, str"""
|
1212
|
-
return GoValue(handle=_api.api_VM_NewObjectInstance(self.handle, className))
|
1213
|
-
def Call(self, functionName, args):
|
1214
|
-
"""Call(str functionName, []object args) object, str
|
1215
|
-
|
1216
|
-
Call calls an Objective-LOL function with the given arguments
|
1217
|
-
"""
|
1218
|
-
return GoValue(handle=_api.api_VM_Call(self.handle, functionName, args.handle))
|
1219
|
-
def CallMethod(self, object, methodName, args):
|
1220
|
-
"""CallMethod(object object, str methodName, []object args) object, str
|
1221
|
-
|
1222
|
-
CallMethod calls a method on an Objective-LOL object
|
1223
|
-
"""
|
1224
|
-
return GoValue(handle=_api.api_VM_CallMethod(self.handle, object.handle, methodName, args.handle))
|
1225
|
-
def DefineVariable(self, name, value, constant):
|
1226
|
-
"""DefineVariable(str name, object value, bool constant) str
|
1227
|
-
|
1228
|
-
DefineVariable defines a global variable in the VM
|
1229
|
-
"""
|
1230
|
-
return _api.api_VM_DefineVariable(self.handle, name, value.handle, constant)
|
1231
|
-
def SetVariable(self, variableName, value):
|
1232
|
-
"""SetVariable(str variableName, object value) str
|
1233
|
-
|
1234
|
-
SetVariable sets a variable in the global environment
|
1235
|
-
"""
|
1236
|
-
return _api.api_VM_SetVariable(self.handle, variableName, value.handle)
|
1237
|
-
def GetVariable(self, variableName):
|
1238
|
-
"""GetVariable(str variableName) object, str
|
1239
|
-
|
1240
|
-
Get gets a variable from the global environment
|
1241
|
-
"""
|
1242
|
-
return GoValue(handle=_api.api_VM_GetVariable(self.handle, variableName))
|
1243
|
-
def DefineClass(self, classDef):
|
1244
|
-
"""DefineClass(object classDef) str"""
|
1245
|
-
return _api.api_VM_DefineClass(self.handle, classDef.handle)
|
1292
|
+
@property
|
1293
|
+
def Name(self):
|
1294
|
+
return _api.api_ClassMethod_Name_Get(self.handle)
|
1295
|
+
@Name.setter
|
1296
|
+
def Name(self, value):
|
1297
|
+
if isinstance(value, go.GoClass):
|
1298
|
+
_api.api_ClassMethod_Name_Set(self.handle, value.handle)
|
1299
|
+
else:
|
1300
|
+
_api.api_ClassMethod_Name_Set(self.handle, value)
|
1301
|
+
@property
|
1302
|
+
def Argc(self):
|
1303
|
+
return _api.api_ClassMethod_Argc_Get(self.handle)
|
1304
|
+
@Argc.setter
|
1305
|
+
def Argc(self, value):
|
1306
|
+
if isinstance(value, go.GoClass):
|
1307
|
+
_api.api_ClassMethod_Argc_Set(self.handle, value.handle)
|
1308
|
+
else:
|
1309
|
+
_api.api_ClassMethod_Argc_Set(self.handle, value)
|
1246
1310
|
|
1247
|
-
# Python type for struct api.
|
1248
|
-
class
|
1249
|
-
"""
|
1311
|
+
# Python type for struct api.ClassVariable
|
1312
|
+
class ClassVariable(go.GoClass):
|
1313
|
+
""""""
|
1250
1314
|
def __init__(self, *args, **kwargs):
|
1251
1315
|
"""
|
1252
1316
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1260,13 +1324,25 @@ class VMCompatibilityShim(go.GoClass):
|
|
1260
1324
|
self.handle = args[0].handle
|
1261
1325
|
_api.IncRef(self.handle)
|
1262
1326
|
else:
|
1263
|
-
self.handle = _api.
|
1327
|
+
self.handle = _api.api_ClassVariable_CTor()
|
1264
1328
|
_api.IncRef(self.handle)
|
1329
|
+
if 0 < len(args):
|
1330
|
+
self.Name = args[0]
|
1331
|
+
if "Name" in kwargs:
|
1332
|
+
self.Name = kwargs["Name"]
|
1333
|
+
if 1 < len(args):
|
1334
|
+
self.Value = args[1]
|
1335
|
+
if "Value" in kwargs:
|
1336
|
+
self.Value = kwargs["Value"]
|
1337
|
+
if 2 < len(args):
|
1338
|
+
self.Locked = args[2]
|
1339
|
+
if "Locked" in kwargs:
|
1340
|
+
self.Locked = kwargs["Locked"]
|
1265
1341
|
def __del__(self):
|
1266
1342
|
_api.DecRef(self.handle)
|
1267
1343
|
def __str__(self):
|
1268
1344
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1269
|
-
sv = 'api.
|
1345
|
+
sv = 'api.ClassVariable{'
|
1270
1346
|
first = True
|
1271
1347
|
for v in pr:
|
1272
1348
|
if callable(v[1]):
|
@@ -1279,51 +1355,38 @@ class VMCompatibilityShim(go.GoClass):
|
|
1279
1355
|
return sv + '}'
|
1280
1356
|
def __repr__(self):
|
1281
1357
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1282
|
-
sv = 'api.
|
1358
|
+
sv = 'api.ClassVariable ( '
|
1283
1359
|
for v in pr:
|
1284
1360
|
if not callable(v[1]):
|
1285
1361
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1286
1362
|
return sv + ')'
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
def
|
1298
|
-
|
1299
|
-
|
1300
|
-
def
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
def
|
1307
|
-
|
1308
|
-
|
1309
|
-
def
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
|
1315
|
-
def GetObjectMRO(self, id):
|
1316
|
-
"""GetObjectMRO(str id) []str, str"""
|
1317
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
|
1318
|
-
def GetObjectImmediateFunctions(self, id):
|
1319
|
-
"""GetObjectImmediateFunctions(str id) []str, str"""
|
1320
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
|
1321
|
-
def GetObjectImmediateVariables(self, id):
|
1322
|
-
"""GetObjectImmediateVariables(str id) []str, str"""
|
1323
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
|
1324
|
-
def AddVariableToObject(self, id, variable):
|
1325
|
-
"""AddVariableToObject(str id, object variable) str"""
|
1326
|
-
return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
|
1363
|
+
@property
|
1364
|
+
def Name(self):
|
1365
|
+
return _api.api_ClassVariable_Name_Get(self.handle)
|
1366
|
+
@Name.setter
|
1367
|
+
def Name(self, value):
|
1368
|
+
if isinstance(value, go.GoClass):
|
1369
|
+
_api.api_ClassVariable_Name_Set(self.handle, value.handle)
|
1370
|
+
else:
|
1371
|
+
_api.api_ClassVariable_Name_Set(self.handle, value)
|
1372
|
+
@property
|
1373
|
+
def Value(self):
|
1374
|
+
return GoValue(handle=_api.api_ClassVariable_Value_Get(self.handle))
|
1375
|
+
@Value.setter
|
1376
|
+
def Value(self, value):
|
1377
|
+
if isinstance(value, go.GoClass):
|
1378
|
+
_api.api_ClassVariable_Value_Set(self.handle, value.handle)
|
1379
|
+
else:
|
1380
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1381
|
+
@property
|
1382
|
+
def Locked(self):
|
1383
|
+
return _api.api_ClassVariable_Locked_Get(self.handle)
|
1384
|
+
@Locked.setter
|
1385
|
+
def Locked(self, value):
|
1386
|
+
if isinstance(value, go.GoClass):
|
1387
|
+
_api.api_ClassVariable_Locked_Set(self.handle, value.handle)
|
1388
|
+
else:
|
1389
|
+
_api.api_ClassVariable_Locked_Set(self.handle, value)
|
1327
1390
|
|
1328
1391
|
# Python type for struct api.VMConfig
|
1329
1392
|
class VMConfig(go.GoClass):
|
@@ -1428,9 +1491,9 @@ class VMConfig(go.GoClass):
|
|
1428
1491
|
"""
|
1429
1492
|
return _api.api_VMConfig_Validate(self.handle)
|
1430
1493
|
|
1431
|
-
# Python type for struct api.
|
1432
|
-
class
|
1433
|
-
""""""
|
1494
|
+
# Python type for struct api.VMError
|
1495
|
+
class VMError(go.GoClass):
|
1496
|
+
"""VMError represents errors that can occur in the VM API\n"""
|
1434
1497
|
def __init__(self, *args, **kwargs):
|
1435
1498
|
"""
|
1436
1499
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1444,25 +1507,29 @@ class ClassVariable(go.GoClass):
|
|
1444
1507
|
self.handle = args[0].handle
|
1445
1508
|
_api.IncRef(self.handle)
|
1446
1509
|
else:
|
1447
|
-
self.handle = _api.
|
1510
|
+
self.handle = _api.api_VMError_CTor()
|
1448
1511
|
_api.IncRef(self.handle)
|
1449
1512
|
if 0 < len(args):
|
1450
|
-
self.
|
1451
|
-
if "
|
1452
|
-
self.
|
1513
|
+
self.Type = args[0]
|
1514
|
+
if "Type" in kwargs:
|
1515
|
+
self.Type = kwargs["Type"]
|
1453
1516
|
if 1 < len(args):
|
1454
|
-
self.
|
1455
|
-
if "
|
1456
|
-
self.
|
1517
|
+
self.Message = args[1]
|
1518
|
+
if "Message" in kwargs:
|
1519
|
+
self.Message = kwargs["Message"]
|
1457
1520
|
if 2 < len(args):
|
1458
|
-
self.
|
1459
|
-
if "
|
1460
|
-
self.
|
1521
|
+
self.Source = args[2]
|
1522
|
+
if "Source" in kwargs:
|
1523
|
+
self.Source = kwargs["Source"]
|
1524
|
+
if 4 < len(args):
|
1525
|
+
self.Duration = args[4]
|
1526
|
+
if "Duration" in kwargs:
|
1527
|
+
self.Duration = kwargs["Duration"]
|
1461
1528
|
def __del__(self):
|
1462
1529
|
_api.DecRef(self.handle)
|
1463
1530
|
def __str__(self):
|
1464
1531
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1465
|
-
sv = 'api.
|
1532
|
+
sv = 'api.VMError{'
|
1466
1533
|
first = True
|
1467
1534
|
for v in pr:
|
1468
1535
|
if callable(v[1]):
|
@@ -1475,38 +1542,83 @@ class ClassVariable(go.GoClass):
|
|
1475
1542
|
return sv + '}'
|
1476
1543
|
def __repr__(self):
|
1477
1544
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1478
|
-
sv = 'api.
|
1545
|
+
sv = 'api.VMError ( '
|
1479
1546
|
for v in pr:
|
1480
1547
|
if not callable(v[1]):
|
1481
1548
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1482
1549
|
return sv + ')'
|
1483
1550
|
@property
|
1484
|
-
def
|
1485
|
-
return _api.
|
1486
|
-
@
|
1487
|
-
def
|
1551
|
+
def Type(self):
|
1552
|
+
return _api.api_VMError_Type_Get(self.handle)
|
1553
|
+
@Type.setter
|
1554
|
+
def Type(self, value):
|
1488
1555
|
if isinstance(value, go.GoClass):
|
1489
|
-
_api.
|
1556
|
+
_api.api_VMError_Type_Set(self.handle, value.handle)
|
1490
1557
|
else:
|
1491
|
-
_api.
|
1558
|
+
_api.api_VMError_Type_Set(self.handle, value)
|
1492
1559
|
@property
|
1493
|
-
def
|
1494
|
-
return
|
1495
|
-
@
|
1496
|
-
def
|
1560
|
+
def Message(self):
|
1561
|
+
return _api.api_VMError_Message_Get(self.handle)
|
1562
|
+
@Message.setter
|
1563
|
+
def Message(self, value):
|
1497
1564
|
if isinstance(value, go.GoClass):
|
1498
|
-
_api.
|
1565
|
+
_api.api_VMError_Message_Set(self.handle, value.handle)
|
1566
|
+
else:
|
1567
|
+
_api.api_VMError_Message_Set(self.handle, value)
|
1568
|
+
@property
|
1569
|
+
def Source(self):
|
1570
|
+
return SourceLocation(handle=_api.api_VMError_Source_Get(self.handle))
|
1571
|
+
@Source.setter
|
1572
|
+
def Source(self, value):
|
1573
|
+
if isinstance(value, go.GoClass):
|
1574
|
+
_api.api_VMError_Source_Set(self.handle, value.handle)
|
1499
1575
|
else:
|
1500
1576
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1501
1577
|
@property
|
1502
|
-
def
|
1503
|
-
return _api.
|
1504
|
-
@
|
1505
|
-
def
|
1578
|
+
def Duration(self):
|
1579
|
+
return _api.api_VMError_Duration_Get(self.handle)
|
1580
|
+
@Duration.setter
|
1581
|
+
def Duration(self, value):
|
1506
1582
|
if isinstance(value, go.GoClass):
|
1507
|
-
_api.
|
1583
|
+
_api.api_VMError_Duration_Set(self.handle, value.handle)
|
1508
1584
|
else:
|
1509
|
-
_api.
|
1585
|
+
_api.api_VMError_Duration_Set(self.handle, value)
|
1586
|
+
def Error(self):
|
1587
|
+
"""Error() str"""
|
1588
|
+
return _api.api_VMError_Error(self.handle)
|
1589
|
+
def Unwrap(self):
|
1590
|
+
"""Unwrap() str"""
|
1591
|
+
return _api.api_VMError_Unwrap(self.handle)
|
1592
|
+
def IsCompileError(self):
|
1593
|
+
"""IsCompileError() bool
|
1594
|
+
|
1595
|
+
IsCompileError returns true if the error is a compilation error
|
1596
|
+
"""
|
1597
|
+
return _api.api_VMError_IsCompileError(self.handle)
|
1598
|
+
def IsRuntimeError(self):
|
1599
|
+
"""IsRuntimeError() bool
|
1600
|
+
|
1601
|
+
IsRuntimeError returns true if the error is a runtime error
|
1602
|
+
"""
|
1603
|
+
return _api.api_VMError_IsRuntimeError(self.handle)
|
1604
|
+
def IsTimeoutError(self):
|
1605
|
+
"""IsTimeoutError() bool
|
1606
|
+
|
1607
|
+
IsTimeoutError returns true if the error is a timeout error
|
1608
|
+
"""
|
1609
|
+
return _api.api_VMError_IsTimeoutError(self.handle)
|
1610
|
+
def IsConversionError(self):
|
1611
|
+
"""IsConversionError() bool
|
1612
|
+
|
1613
|
+
IsConversionError returns true if the error is a type conversion error
|
1614
|
+
"""
|
1615
|
+
return _api.api_VMError_IsConversionError(self.handle)
|
1616
|
+
def IsConfigError(self):
|
1617
|
+
"""IsConfigError() bool
|
1618
|
+
|
1619
|
+
IsConfigError returns true if the error is a configuration error
|
1620
|
+
"""
|
1621
|
+
return _api.api_VMError_IsConfigError(self.handle)
|
1510
1622
|
|
1511
1623
|
# Python type for struct api.ExecutionResult
|
1512
1624
|
class ExecutionResult(go.GoClass):
|
@@ -1594,118 +1706,6 @@ class ExecutionResult(go.GoClass):
|
|
1594
1706
|
else:
|
1595
1707
|
_api.api_ExecutionResult_Output_Set(self.handle, value)
|
1596
1708
|
|
1597
|
-
# Python type for struct api.GoValue
|
1598
|
-
class GoValue(go.GoClass):
|
1599
|
-
""""""
|
1600
|
-
def __init__(self, *args, **kwargs):
|
1601
|
-
"""
|
1602
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1603
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1604
|
-
in which case a new Go object is constructed first
|
1605
|
-
"""
|
1606
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
1607
|
-
self.handle = kwargs['handle']
|
1608
|
-
_api.IncRef(self.handle)
|
1609
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1610
|
-
self.handle = args[0].handle
|
1611
|
-
_api.IncRef(self.handle)
|
1612
|
-
else:
|
1613
|
-
self.handle = _api.api_GoValue_CTor()
|
1614
|
-
_api.IncRef(self.handle)
|
1615
|
-
def __del__(self):
|
1616
|
-
_api.DecRef(self.handle)
|
1617
|
-
def __str__(self):
|
1618
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1619
|
-
sv = 'api.GoValue{'
|
1620
|
-
first = True
|
1621
|
-
for v in pr:
|
1622
|
-
if callable(v[1]):
|
1623
|
-
continue
|
1624
|
-
if first:
|
1625
|
-
first = False
|
1626
|
-
else:
|
1627
|
-
sv += ', '
|
1628
|
-
sv += v[0] + '=' + str(v[1])
|
1629
|
-
return sv + '}'
|
1630
|
-
def __repr__(self):
|
1631
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1632
|
-
sv = 'api.GoValue ( '
|
1633
|
-
for v in pr:
|
1634
|
-
if not callable(v[1]):
|
1635
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
1636
|
-
return sv + ')'
|
1637
|
-
def ID(self):
|
1638
|
-
"""ID() str"""
|
1639
|
-
return _api.api_GoValue_ID(self.handle)
|
1640
|
-
def MarshalJSON(self):
|
1641
|
-
"""MarshalJSON() []int, str"""
|
1642
|
-
return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
|
1643
|
-
def Type(self):
|
1644
|
-
"""Type() str"""
|
1645
|
-
return _api.api_GoValue_Type(self.handle)
|
1646
|
-
def Int(self):
|
1647
|
-
"""Int() long, str"""
|
1648
|
-
return _api.api_GoValue_Int(self.handle)
|
1649
|
-
def Float(self):
|
1650
|
-
"""Float() float, str"""
|
1651
|
-
return _api.api_GoValue_Float(self.handle)
|
1652
|
-
def String(self):
|
1653
|
-
"""String() str, str"""
|
1654
|
-
return _api.api_GoValue_String(self.handle)
|
1655
|
-
def Bool(self):
|
1656
|
-
"""Bool() bool, str"""
|
1657
|
-
return _api.api_GoValue_Bool(self.handle)
|
1658
|
-
def Slice(self):
|
1659
|
-
"""Slice() []object, str"""
|
1660
|
-
return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
|
1661
|
-
def Map(self):
|
1662
|
-
"""Map() object, str"""
|
1663
|
-
return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
|
1664
|
-
def Object(self):
|
1665
|
-
"""Object() object, str"""
|
1666
|
-
return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
|
1667
|
-
|
1668
|
-
# Python type for struct api.UnknownFunctionHandler
|
1669
|
-
class UnknownFunctionHandler(go.GoClass):
|
1670
|
-
""""""
|
1671
|
-
def __init__(self, *args, **kwargs):
|
1672
|
-
"""
|
1673
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1674
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1675
|
-
in which case a new Go object is constructed first
|
1676
|
-
"""
|
1677
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
1678
|
-
self.handle = kwargs['handle']
|
1679
|
-
_api.IncRef(self.handle)
|
1680
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1681
|
-
self.handle = args[0].handle
|
1682
|
-
_api.IncRef(self.handle)
|
1683
|
-
else:
|
1684
|
-
self.handle = _api.api_UnknownFunctionHandler_CTor()
|
1685
|
-
_api.IncRef(self.handle)
|
1686
|
-
def __del__(self):
|
1687
|
-
_api.DecRef(self.handle)
|
1688
|
-
def __str__(self):
|
1689
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1690
|
-
sv = 'api.UnknownFunctionHandler{'
|
1691
|
-
first = True
|
1692
|
-
for v in pr:
|
1693
|
-
if callable(v[1]):
|
1694
|
-
continue
|
1695
|
-
if first:
|
1696
|
-
first = False
|
1697
|
-
else:
|
1698
|
-
sv += ', '
|
1699
|
-
sv += v[0] + '=' + str(v[1])
|
1700
|
-
return sv + '}'
|
1701
|
-
def __repr__(self):
|
1702
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1703
|
-
sv = 'api.UnknownFunctionHandler ( '
|
1704
|
-
for v in pr:
|
1705
|
-
if not callable(v[1]):
|
1706
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
1707
|
-
return sv + ')'
|
1708
|
-
|
1709
1709
|
|
1710
1710
|
# ---- Slices ---
|
1711
1711
|
|
@@ -1714,12 +1714,51 @@ class UnknownFunctionHandler(go.GoClass):
|
|
1714
1714
|
|
1715
1715
|
|
1716
1716
|
# ---- Constructors ---
|
1717
|
-
def
|
1718
|
-
"""
|
1717
|
+
def ToGoValue(val):
|
1718
|
+
"""ToGoValue(object val) object, str
|
1719
1719
|
|
1720
|
-
|
1720
|
+
ToGoValue converts an Objective-LOL value to a Go value
|
1721
1721
|
"""
|
1722
|
-
return
|
1722
|
+
return GoValue(handle=_api.api_ToGoValue(val.handle))
|
1723
|
+
def WrapString(value):
|
1724
|
+
"""WrapString(str value) object"""
|
1725
|
+
return GoValue(handle=_api.api_WrapString(value))
|
1726
|
+
def WrapBool(value):
|
1727
|
+
"""WrapBool(bool value) object"""
|
1728
|
+
return GoValue(handle=_api.api_WrapBool(value))
|
1729
|
+
def WrapFloat(value):
|
1730
|
+
"""WrapFloat(float value) object"""
|
1731
|
+
return GoValue(handle=_api.api_WrapFloat(value))
|
1732
|
+
def WrapInt(value):
|
1733
|
+
"""WrapInt(long value) object"""
|
1734
|
+
return GoValue(handle=_api.api_WrapInt(value))
|
1735
|
+
def WrapObject(value):
|
1736
|
+
"""WrapObject(object value) object"""
|
1737
|
+
return GoValue(handle=_api.api_WrapObject(value.handle))
|
1738
|
+
def WrapAny(value):
|
1739
|
+
"""WrapAny(str value) object"""
|
1740
|
+
return GoValue(handle=_api.api_WrapAny(value))
|
1741
|
+
def NewVM(config):
|
1742
|
+
"""NewVM(object config) object, str
|
1743
|
+
|
1744
|
+
NewVM creates a new VM instance with the given config
|
1745
|
+
"""
|
1746
|
+
return VM(handle=_api.api_NewVM(config.handle))
|
1747
|
+
def NewClassDefinition():
|
1748
|
+
"""NewClassDefinition() object"""
|
1749
|
+
return ClassDefinition(handle=_api.api_NewClassDefinition())
|
1750
|
+
def DefaultConfig():
|
1751
|
+
"""DefaultConfig() object
|
1752
|
+
|
1753
|
+
DefaultConfig returns a default configuration
|
1754
|
+
"""
|
1755
|
+
return VMConfig(handle=_api.api_DefaultConfig())
|
1756
|
+
def NewRuntimeError(message, source):
|
1757
|
+
"""NewRuntimeError(str message, object source) object
|
1758
|
+
|
1759
|
+
NewRuntimeError creates a new runtime error
|
1760
|
+
"""
|
1761
|
+
return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
|
1723
1762
|
def NewCompileError(message, source):
|
1724
1763
|
"""NewCompileError(str message, object source) object
|
1725
1764
|
|
@@ -1732,60 +1771,24 @@ def NewConfigError(message, wrapped):
|
|
1732
1771
|
NewConfigError creates a new configuration error
|
1733
1772
|
"""
|
1734
1773
|
return VMError(handle=_api.api_NewConfigError(message, wrapped))
|
1735
|
-
def
|
1736
|
-
"""
|
1774
|
+
def NewConversionError(message, wrapped):
|
1775
|
+
"""NewConversionError(str message, str wrapped) object
|
1737
1776
|
|
1738
|
-
|
1777
|
+
NewConversionError creates a new type conversion error
|
1739
1778
|
"""
|
1740
|
-
return VMError(handle=_api.
|
1779
|
+
return VMError(handle=_api.api_NewConversionError(message, wrapped))
|
1741
1780
|
def NewTimeoutError(duration):
|
1742
1781
|
"""NewTimeoutError(long duration) object
|
1743
1782
|
|
1744
1783
|
NewTimeoutError creates a new timeout error
|
1745
1784
|
"""
|
1746
1785
|
return VMError(handle=_api.api_NewTimeoutError(duration))
|
1747
|
-
def NewClassDefinition():
|
1748
|
-
"""NewClassDefinition() object"""
|
1749
|
-
return ClassDefinition(handle=_api.api_NewClassDefinition())
|
1750
|
-
def NewVM(config):
|
1751
|
-
"""NewVM(object config) object, str
|
1752
|
-
|
1753
|
-
NewVM creates a new VM instance with the given config
|
1754
|
-
"""
|
1755
|
-
return VM(handle=_api.api_NewVM(config.handle))
|
1756
|
-
def DefaultConfig():
|
1757
|
-
"""DefaultConfig() object
|
1758
|
-
|
1759
|
-
DefaultConfig returns a default configuration
|
1760
|
-
"""
|
1761
|
-
return VMConfig(handle=_api.api_DefaultConfig())
|
1762
|
-
def WrapAny(value):
|
1763
|
-
"""WrapAny(str value) object"""
|
1764
|
-
return GoValue(handle=_api.api_WrapAny(value))
|
1765
|
-
def WrapInt(value):
|
1766
|
-
"""WrapInt(long value) object"""
|
1767
|
-
return GoValue(handle=_api.api_WrapInt(value))
|
1768
|
-
def WrapString(value):
|
1769
|
-
"""WrapString(str value) object"""
|
1770
|
-
return GoValue(handle=_api.api_WrapString(value))
|
1771
|
-
def WrapFloat(value):
|
1772
|
-
"""WrapFloat(float value) object"""
|
1773
|
-
return GoValue(handle=_api.api_WrapFloat(value))
|
1774
|
-
def WrapObject(value):
|
1775
|
-
"""WrapObject(object value) object"""
|
1776
|
-
return GoValue(handle=_api.api_WrapObject(value.handle))
|
1777
|
-
def ToGoValue(val):
|
1778
|
-
"""ToGoValue(object val) object, str
|
1779
|
-
|
1780
|
-
ToGoValue converts an Objective-LOL value to a Go value
|
1781
|
-
"""
|
1782
|
-
return GoValue(handle=_api.api_ToGoValue(val.handle))
|
1783
|
-
def WrapBool(value):
|
1784
|
-
"""WrapBool(bool value) object"""
|
1785
|
-
return GoValue(handle=_api.api_WrapBool(value))
|
1786
1786
|
|
1787
1787
|
|
1788
1788
|
# ---- Functions ---
|
1789
|
+
def LookupObject(id):
|
1790
|
+
"""LookupObject(str id) object, str"""
|
1791
|
+
return go.Ptr_environment_ObjectInstance(handle=_api.api_LookupObject(id))
|
1789
1792
|
def ConvertArguments(args):
|
1790
1793
|
"""ConvertArguments([]object args) []object, str
|
1791
1794
|
|
@@ -1798,8 +1801,5 @@ def FromGoValue(val):
|
|
1798
1801
|
FromGoValue converts a Go value to an Objective-LOL value
|
1799
1802
|
"""
|
1800
1803
|
return go.environment_Value(handle=_api.api_FromGoValue(val.handle))
|
1801
|
-
def LookupObject(id):
|
1802
|
-
"""LookupObject(str id) object, str"""
|
1803
|
-
return go.Ptr_environment_ObjectInstance(handle=_api.api_LookupObject(id))
|
1804
1804
|
|
1805
1805
|
|