objective-lol 0.0.1__cp311-cp311-macosx_11_0_arm64.whl → 0.0.2__cp311-cp311-macosx_11_0_arm64.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.py CHANGED
@@ -741,9 +741,9 @@ TimeoutErrorType = "timeout"
741
741
 
742
742
  # ---- Structs ---
743
743
 
744
- # Python type for struct api.ClassMethod
745
- class ClassMethod(go.GoClass):
746
- """"""
744
+ # Python type for struct api.SourceLocation
745
+ class SourceLocation(go.GoClass):
746
+ """SourceLocation represents a location in source code\n"""
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,21 +757,25 @@ class ClassMethod(go.GoClass):
757
757
  self.handle = args[0].handle
758
758
  _api.IncRef(self.handle)
759
759
  else:
760
- self.handle = _api.api_ClassMethod_CTor()
760
+ self.handle = _api.api_SourceLocation_CTor()
761
761
  _api.IncRef(self.handle)
762
762
  if 0 < len(args):
763
- self.Name = args[0]
764
- if "Name" in kwargs:
765
- self.Name = kwargs["Name"]
763
+ self.Filename = args[0]
764
+ if "Filename" in kwargs:
765
+ self.Filename = kwargs["Filename"]
766
766
  if 1 < len(args):
767
- self.Argc = args[1]
768
- if "Argc" in kwargs:
769
- self.Argc = kwargs["Argc"]
767
+ self.Line = args[1]
768
+ if "Line" in kwargs:
769
+ self.Line = kwargs["Line"]
770
+ if 2 < len(args):
771
+ self.Column = args[2]
772
+ if "Column" in kwargs:
773
+ self.Column = kwargs["Column"]
770
774
  def __del__(self):
771
775
  _api.DecRef(self.handle)
772
776
  def __str__(self):
773
777
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
774
- sv = 'api.ClassMethod{'
778
+ sv = 'api.SourceLocation{'
775
779
  first = True
776
780
  for v in pr:
777
781
  if callable(v[1]):
@@ -784,33 +788,42 @@ class ClassMethod(go.GoClass):
784
788
  return sv + '}'
785
789
  def __repr__(self):
786
790
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
787
- sv = 'api.ClassMethod ( '
791
+ sv = 'api.SourceLocation ( '
788
792
  for v in pr:
789
793
  if not callable(v[1]):
790
794
  sv += v[0] + '=' + str(v[1]) + ', '
791
795
  return sv + ')'
792
796
  @property
793
- def Name(self):
794
- return _api.api_ClassMethod_Name_Get(self.handle)
795
- @Name.setter
796
- def Name(self, value):
797
+ def Filename(self):
798
+ return _api.api_SourceLocation_Filename_Get(self.handle)
799
+ @Filename.setter
800
+ def Filename(self, value):
797
801
  if isinstance(value, go.GoClass):
798
- _api.api_ClassMethod_Name_Set(self.handle, value.handle)
802
+ _api.api_SourceLocation_Filename_Set(self.handle, value.handle)
799
803
  else:
800
- _api.api_ClassMethod_Name_Set(self.handle, value)
804
+ _api.api_SourceLocation_Filename_Set(self.handle, value)
801
805
  @property
802
- def Argc(self):
803
- return _api.api_ClassMethod_Argc_Get(self.handle)
804
- @Argc.setter
805
- def Argc(self, value):
806
+ def Line(self):
807
+ return _api.api_SourceLocation_Line_Get(self.handle)
808
+ @Line.setter
809
+ def Line(self, value):
806
810
  if isinstance(value, go.GoClass):
807
- _api.api_ClassMethod_Argc_Set(self.handle, value.handle)
811
+ _api.api_SourceLocation_Line_Set(self.handle, value.handle)
808
812
  else:
809
- _api.api_ClassMethod_Argc_Set(self.handle, value)
813
+ _api.api_SourceLocation_Line_Set(self.handle, value)
814
+ @property
815
+ def Column(self):
816
+ return _api.api_SourceLocation_Column_Get(self.handle)
817
+ @Column.setter
818
+ def Column(self, value):
819
+ if isinstance(value, go.GoClass):
820
+ _api.api_SourceLocation_Column_Set(self.handle, value.handle)
821
+ else:
822
+ _api.api_SourceLocation_Column_Set(self.handle, value)
810
823
 
811
- # Python type for struct api.ExecutionResult
812
- class ExecutionResult(go.GoClass):
813
- """ExecutionResult represents the result of executing Objective-LOL code\n"""
824
+ # Python type for struct api.UnknownFunctionHandler
825
+ class UnknownFunctionHandler(go.GoClass):
826
+ """"""
814
827
  def __init__(self, *args, **kwargs):
815
828
  """
816
829
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -824,25 +837,13 @@ class ExecutionResult(go.GoClass):
824
837
  self.handle = args[0].handle
825
838
  _api.IncRef(self.handle)
826
839
  else:
827
- self.handle = _api.api_ExecutionResult_CTor()
840
+ self.handle = _api.api_UnknownFunctionHandler_CTor()
828
841
  _api.IncRef(self.handle)
829
- if 0 < len(args):
830
- self.Value = args[0]
831
- if "Value" in kwargs:
832
- self.Value = kwargs["Value"]
833
- if 1 < len(args):
834
- self.RawValue = args[1]
835
- if "RawValue" in kwargs:
836
- self.RawValue = kwargs["RawValue"]
837
- if 2 < len(args):
838
- self.Output = args[2]
839
- if "Output" in kwargs:
840
- self.Output = kwargs["Output"]
841
842
  def __del__(self):
842
843
  _api.DecRef(self.handle)
843
844
  def __str__(self):
844
845
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
845
- sv = 'api.ExecutionResult{'
846
+ sv = 'api.UnknownFunctionHandler{'
846
847
  first = True
847
848
  for v in pr:
848
849
  if callable(v[1]):
@@ -855,48 +856,15 @@ class ExecutionResult(go.GoClass):
855
856
  return sv + '}'
856
857
  def __repr__(self):
857
858
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
858
- sv = 'api.ExecutionResult ( '
859
+ sv = 'api.UnknownFunctionHandler ( '
859
860
  for v in pr:
860
861
  if not callable(v[1]):
861
862
  sv += v[0] + '=' + str(v[1]) + ', '
862
863
  return sv + ')'
863
- @property
864
- def Value(self):
865
- """Return value from the execution (e.g., from MAIN function)
866
- """
867
- return GoValue(handle=_api.api_ExecutionResult_Value_Get(self.handle))
868
- @Value.setter
869
- def Value(self, value):
870
- if isinstance(value, go.GoClass):
871
- _api.api_ExecutionResult_Value_Set(self.handle, value.handle)
872
- else:
873
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
874
- @property
875
- def RawValue(self):
876
- """Raw Objective-LOL value (for advanced use)
877
- """
878
- return go.environment_Value(handle=_api.api_ExecutionResult_RawValue_Get(self.handle))
879
- @RawValue.setter
880
- def RawValue(self, value):
881
- if isinstance(value, go.GoClass):
882
- _api.api_ExecutionResult_RawValue_Set(self.handle, value.handle)
883
- else:
884
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
885
- @property
886
- def Output(self):
887
- """Output captured during execution (if configured)
888
- """
889
- return _api.api_ExecutionResult_Output_Get(self.handle)
890
- @Output.setter
891
- def Output(self, value):
892
- if isinstance(value, go.GoClass):
893
- _api.api_ExecutionResult_Output_Set(self.handle, value.handle)
894
- else:
895
- _api.api_ExecutionResult_Output_Set(self.handle, value)
896
864
 
897
- # Python type for struct api.UnknownFunctionHandler
898
- class UnknownFunctionHandler(go.GoClass):
899
- """"""
865
+ # Python type for struct api.VMCompatibilityShim
866
+ class VMCompatibilityShim(go.GoClass):
867
+ """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"""
900
868
  def __init__(self, *args, **kwargs):
901
869
  """
902
870
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -910,13 +878,13 @@ class UnknownFunctionHandler(go.GoClass):
910
878
  self.handle = args[0].handle
911
879
  _api.IncRef(self.handle)
912
880
  else:
913
- self.handle = _api.api_UnknownFunctionHandler_CTor()
881
+ self.handle = _api.api_VMCompatibilityShim_CTor()
914
882
  _api.IncRef(self.handle)
915
883
  def __del__(self):
916
884
  _api.DecRef(self.handle)
917
885
  def __str__(self):
918
886
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
919
- sv = 'api.UnknownFunctionHandler{'
887
+ sv = 'api.VMCompatibilityShim{'
920
888
  first = True
921
889
  for v in pr:
922
890
  if callable(v[1]):
@@ -929,11 +897,51 @@ class UnknownFunctionHandler(go.GoClass):
929
897
  return sv + '}'
930
898
  def __repr__(self):
931
899
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
932
- sv = 'api.UnknownFunctionHandler ( '
900
+ sv = 'api.VMCompatibilityShim ( '
933
901
  for v in pr:
934
902
  if not callable(v[1]):
935
903
  sv += v[0] + '=' + str(v[1]) + ', '
936
904
  return sv + ')'
905
+ def DefineFunction(self, id, name, argc, function):
906
+ """DefineFunction(str id, str name, int argc, callable function) str
907
+
908
+ DefineFunction defines a global function with maximum compatibility,
909
+ wrapping arguments and return values as JSON strings.
910
+ An optional id cookie is passed back to the function to identify it.
911
+ jsonArgs is a JSON array string of the arguments.
912
+ The function should return a JSON object string with "result" and "error" fields.
913
+ """
914
+ return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
915
+ def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
916
+ """BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
917
+ return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
918
+ def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
919
+ """BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
920
+ return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
921
+ def BuildNewClassMethod(self, method, id, function):
922
+ """BuildNewClassMethod(object method, str id, callable function) object"""
923
+ return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
924
+ def BuildNewUnknownFunctionHandler(self, id, function):
925
+ """BuildNewUnknownFunctionHandler(str id, callable function) object"""
926
+ return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
927
+ def IsClassDefined(self, name):
928
+ """IsClassDefined(str name) bool"""
929
+ return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
930
+ def LookupObject(self, id):
931
+ """LookupObject(str id) object, str"""
932
+ return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
933
+ def GetObjectMRO(self, id):
934
+ """GetObjectMRO(str id) []str, str"""
935
+ return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
936
+ def GetObjectImmediateFunctions(self, id):
937
+ """GetObjectImmediateFunctions(str id) []str, str"""
938
+ return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
939
+ def GetObjectImmediateVariables(self, id):
940
+ """GetObjectImmediateVariables(str id) []str, str"""
941
+ return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
942
+ def AddVariableToObject(self, id, variable):
943
+ """AddVariableToObject(str id, object variable) str"""
944
+ return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
937
945
 
938
946
  # Python type for struct api.VMConfig
939
947
  class VMConfig(go.GoClass):
@@ -1038,9 +1046,9 @@ class VMConfig(go.GoClass):
1038
1046
  """
1039
1047
  return _api.api_VMConfig_Validate(self.handle)
1040
1048
 
1041
- # Python type for struct api.ClassDefinition
1042
- class ClassDefinition(go.GoClass):
1043
- """"""
1049
+ # Python type for struct api.VM
1050
+ class VM(go.GoClass):
1051
+ """VM represents an Objective-LOL virtual machine instance\n"""
1044
1052
  def __init__(self, *args, **kwargs):
1045
1053
  """
1046
1054
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1054,41 +1062,13 @@ class ClassDefinition(go.GoClass):
1054
1062
  self.handle = args[0].handle
1055
1063
  _api.IncRef(self.handle)
1056
1064
  else:
1057
- self.handle = _api.api_ClassDefinition_CTor()
1065
+ self.handle = _api.api_VM_CTor()
1058
1066
  _api.IncRef(self.handle)
1059
- if 0 < len(args):
1060
- self.Name = args[0]
1061
- if "Name" in kwargs:
1062
- self.Name = kwargs["Name"]
1063
- if 1 < len(args):
1064
- self.PublicVariables = args[1]
1065
- if "PublicVariables" in kwargs:
1066
- self.PublicVariables = kwargs["PublicVariables"]
1067
- if 2 < len(args):
1068
- self.PrivateVariables = args[2]
1069
- if "PrivateVariables" in kwargs:
1070
- self.PrivateVariables = kwargs["PrivateVariables"]
1071
- if 3 < len(args):
1072
- self.SharedVariables = args[3]
1073
- if "SharedVariables" in kwargs:
1074
- self.SharedVariables = kwargs["SharedVariables"]
1075
- if 4 < len(args):
1076
- self.PublicMethods = args[4]
1077
- if "PublicMethods" in kwargs:
1078
- self.PublicMethods = kwargs["PublicMethods"]
1079
- if 5 < len(args):
1080
- self.PrivateMethods = args[5]
1081
- if "PrivateMethods" in kwargs:
1082
- self.PrivateMethods = kwargs["PrivateMethods"]
1083
- if 6 < len(args):
1084
- self.UnknownFunctionHandler = args[6]
1085
- if "UnknownFunctionHandler" in kwargs:
1086
- self.UnknownFunctionHandler = kwargs["UnknownFunctionHandler"]
1087
1067
  def __del__(self):
1088
1068
  _api.DecRef(self.handle)
1089
1069
  def __str__(self):
1090
1070
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1091
- sv = 'api.ClassDefinition{'
1071
+ sv = 'api.VM{'
1092
1072
  first = True
1093
1073
  for v in pr:
1094
1074
  if callable(v[1]):
@@ -1101,262 +1081,7 @@ class ClassDefinition(go.GoClass):
1101
1081
  return sv + '}'
1102
1082
  def __repr__(self):
1103
1083
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1104
- sv = 'api.ClassDefinition ( '
1105
- for v in pr:
1106
- if not callable(v[1]):
1107
- sv += v[0] + '=' + str(v[1]) + ', '
1108
- return sv + ')'
1109
- @property
1110
- def Name(self):
1111
- return _api.api_ClassDefinition_Name_Get(self.handle)
1112
- @Name.setter
1113
- def Name(self, value):
1114
- if isinstance(value, go.GoClass):
1115
- _api.api_ClassDefinition_Name_Set(self.handle, value.handle)
1116
- else:
1117
- _api.api_ClassDefinition_Name_Set(self.handle, value)
1118
- @property
1119
- def PublicVariables(self):
1120
- return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PublicVariables_Get(self.handle))
1121
- @PublicVariables.setter
1122
- def PublicVariables(self, value):
1123
- if isinstance(value, go.GoClass):
1124
- _api.api_ClassDefinition_PublicVariables_Set(self.handle, value.handle)
1125
- else:
1126
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1127
- @property
1128
- def PrivateVariables(self):
1129
- return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PrivateVariables_Get(self.handle))
1130
- @PrivateVariables.setter
1131
- def PrivateVariables(self, value):
1132
- if isinstance(value, go.GoClass):
1133
- _api.api_ClassDefinition_PrivateVariables_Set(self.handle, value.handle)
1134
- else:
1135
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1136
- @property
1137
- def SharedVariables(self):
1138
- return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_SharedVariables_Get(self.handle))
1139
- @SharedVariables.setter
1140
- def SharedVariables(self, value):
1141
- if isinstance(value, go.GoClass):
1142
- _api.api_ClassDefinition_SharedVariables_Set(self.handle, value.handle)
1143
- else:
1144
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1145
- @property
1146
- def PublicMethods(self):
1147
- return Map_string_Ptr_api_ClassMethod(handle=_api.api_ClassDefinition_PublicMethods_Get(self.handle))
1148
- @PublicMethods.setter
1149
- def PublicMethods(self, value):
1150
- if isinstance(value, go.GoClass):
1151
- _api.api_ClassDefinition_PublicMethods_Set(self.handle, value.handle)
1152
- else:
1153
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1154
- @property
1155
- def PrivateMethods(self):
1156
- return Map_string_Ptr_api_ClassMethod(handle=_api.api_ClassDefinition_PrivateMethods_Get(self.handle))
1157
- @PrivateMethods.setter
1158
- def PrivateMethods(self, value):
1159
- if isinstance(value, go.GoClass):
1160
- _api.api_ClassDefinition_PrivateMethods_Set(self.handle, value.handle)
1161
- else:
1162
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1163
- @property
1164
- def UnknownFunctionHandler(self):
1165
- return UnknownFunctionHandler(handle=_api.api_ClassDefinition_UnknownFunctionHandler_Get(self.handle))
1166
- @UnknownFunctionHandler.setter
1167
- def UnknownFunctionHandler(self, value):
1168
- if isinstance(value, go.GoClass):
1169
- _api.api_ClassDefinition_UnknownFunctionHandler_Set(self.handle, value.handle)
1170
- else:
1171
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1172
-
1173
- # Python type for struct api.GoValue
1174
- class GoValue(go.GoClass):
1175
- """"""
1176
- def __init__(self, *args, **kwargs):
1177
- """
1178
- handle=A Go-side object is always initialized with an explicit handle=arg
1179
- otherwise parameters can be unnamed in order of field names or named fields
1180
- in which case a new Go object is constructed first
1181
- """
1182
- if len(kwargs) == 1 and 'handle' in kwargs:
1183
- self.handle = kwargs['handle']
1184
- _api.IncRef(self.handle)
1185
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1186
- self.handle = args[0].handle
1187
- _api.IncRef(self.handle)
1188
- else:
1189
- self.handle = _api.api_GoValue_CTor()
1190
- _api.IncRef(self.handle)
1191
- def __del__(self):
1192
- _api.DecRef(self.handle)
1193
- def __str__(self):
1194
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1195
- sv = 'api.GoValue{'
1196
- first = True
1197
- for v in pr:
1198
- if callable(v[1]):
1199
- continue
1200
- if first:
1201
- first = False
1202
- else:
1203
- sv += ', '
1204
- sv += v[0] + '=' + str(v[1])
1205
- return sv + '}'
1206
- def __repr__(self):
1207
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1208
- sv = 'api.GoValue ( '
1209
- for v in pr:
1210
- if not callable(v[1]):
1211
- sv += v[0] + '=' + str(v[1]) + ', '
1212
- return sv + ')'
1213
- def ID(self):
1214
- """ID() str"""
1215
- return _api.api_GoValue_ID(self.handle)
1216
- def MarshalJSON(self):
1217
- """MarshalJSON() []int, str"""
1218
- return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
1219
- def Type(self):
1220
- """Type() str"""
1221
- return _api.api_GoValue_Type(self.handle)
1222
- def Int(self):
1223
- """Int() long, str"""
1224
- return _api.api_GoValue_Int(self.handle)
1225
- def Float(self):
1226
- """Float() float, str"""
1227
- return _api.api_GoValue_Float(self.handle)
1228
- def String(self):
1229
- """String() str, str"""
1230
- return _api.api_GoValue_String(self.handle)
1231
- def Bool(self):
1232
- """Bool() bool, str"""
1233
- return _api.api_GoValue_Bool(self.handle)
1234
- def Slice(self):
1235
- """Slice() []object, str"""
1236
- return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
1237
- def Map(self):
1238
- """Map() object, str"""
1239
- return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
1240
- def Object(self):
1241
- """Object() object, str"""
1242
- return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
1243
-
1244
- # Python type for struct api.SourceLocation
1245
- class SourceLocation(go.GoClass):
1246
- """SourceLocation represents a location in source code\n"""
1247
- def __init__(self, *args, **kwargs):
1248
- """
1249
- handle=A Go-side object is always initialized with an explicit handle=arg
1250
- otherwise parameters can be unnamed in order of field names or named fields
1251
- in which case a new Go object is constructed first
1252
- """
1253
- if len(kwargs) == 1 and 'handle' in kwargs:
1254
- self.handle = kwargs['handle']
1255
- _api.IncRef(self.handle)
1256
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1257
- self.handle = args[0].handle
1258
- _api.IncRef(self.handle)
1259
- else:
1260
- self.handle = _api.api_SourceLocation_CTor()
1261
- _api.IncRef(self.handle)
1262
- if 0 < len(args):
1263
- self.Filename = args[0]
1264
- if "Filename" in kwargs:
1265
- self.Filename = kwargs["Filename"]
1266
- if 1 < len(args):
1267
- self.Line = args[1]
1268
- if "Line" in kwargs:
1269
- self.Line = kwargs["Line"]
1270
- if 2 < len(args):
1271
- self.Column = args[2]
1272
- if "Column" in kwargs:
1273
- self.Column = kwargs["Column"]
1274
- def __del__(self):
1275
- _api.DecRef(self.handle)
1276
- def __str__(self):
1277
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1278
- sv = 'api.SourceLocation{'
1279
- first = True
1280
- for v in pr:
1281
- if callable(v[1]):
1282
- continue
1283
- if first:
1284
- first = False
1285
- else:
1286
- sv += ', '
1287
- sv += v[0] + '=' + str(v[1])
1288
- return sv + '}'
1289
- def __repr__(self):
1290
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1291
- sv = 'api.SourceLocation ( '
1292
- for v in pr:
1293
- if not callable(v[1]):
1294
- sv += v[0] + '=' + str(v[1]) + ', '
1295
- return sv + ')'
1296
- @property
1297
- def Filename(self):
1298
- return _api.api_SourceLocation_Filename_Get(self.handle)
1299
- @Filename.setter
1300
- def Filename(self, value):
1301
- if isinstance(value, go.GoClass):
1302
- _api.api_SourceLocation_Filename_Set(self.handle, value.handle)
1303
- else:
1304
- _api.api_SourceLocation_Filename_Set(self.handle, value)
1305
- @property
1306
- def Line(self):
1307
- return _api.api_SourceLocation_Line_Get(self.handle)
1308
- @Line.setter
1309
- def Line(self, value):
1310
- if isinstance(value, go.GoClass):
1311
- _api.api_SourceLocation_Line_Set(self.handle, value.handle)
1312
- else:
1313
- _api.api_SourceLocation_Line_Set(self.handle, value)
1314
- @property
1315
- def Column(self):
1316
- return _api.api_SourceLocation_Column_Get(self.handle)
1317
- @Column.setter
1318
- def Column(self, value):
1319
- if isinstance(value, go.GoClass):
1320
- _api.api_SourceLocation_Column_Set(self.handle, value.handle)
1321
- else:
1322
- _api.api_SourceLocation_Column_Set(self.handle, value)
1323
-
1324
- # Python type for struct api.VM
1325
- class VM(go.GoClass):
1326
- """VM represents an Objective-LOL virtual machine instance\n"""
1327
- def __init__(self, *args, **kwargs):
1328
- """
1329
- handle=A Go-side object is always initialized with an explicit handle=arg
1330
- otherwise parameters can be unnamed in order of field names or named fields
1331
- in which case a new Go object is constructed first
1332
- """
1333
- if len(kwargs) == 1 and 'handle' in kwargs:
1334
- self.handle = kwargs['handle']
1335
- _api.IncRef(self.handle)
1336
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1337
- self.handle = args[0].handle
1338
- _api.IncRef(self.handle)
1339
- else:
1340
- self.handle = _api.api_VM_CTor()
1341
- _api.IncRef(self.handle)
1342
- def __del__(self):
1343
- _api.DecRef(self.handle)
1344
- def __str__(self):
1345
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1346
- sv = 'api.VM{'
1347
- first = True
1348
- for v in pr:
1349
- if callable(v[1]):
1350
- continue
1351
- if first:
1352
- first = False
1353
- else:
1354
- sv += ', '
1355
- sv += v[0] + '=' + str(v[1])
1356
- return sv + '}'
1357
- def __repr__(self):
1358
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1359
- sv = 'api.VM ( '
1084
+ sv = 'api.VM ( '
1360
1085
  for v in pr:
1361
1086
  if not callable(v[1]):
1362
1087
  sv += v[0] + '=' + str(v[1]) + ', '
@@ -1416,87 +1141,6 @@ class VM(go.GoClass):
1416
1141
  """DefineClass(object classDef) str"""
1417
1142
  return _api.api_VM_DefineClass(self.handle, classDef.handle)
1418
1143
 
1419
- # Python type for struct api.VMCompatibilityShim
1420
- class VMCompatibilityShim(go.GoClass):
1421
- """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"""
1422
- def __init__(self, *args, **kwargs):
1423
- """
1424
- handle=A Go-side object is always initialized with an explicit handle=arg
1425
- otherwise parameters can be unnamed in order of field names or named fields
1426
- in which case a new Go object is constructed first
1427
- """
1428
- if len(kwargs) == 1 and 'handle' in kwargs:
1429
- self.handle = kwargs['handle']
1430
- _api.IncRef(self.handle)
1431
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1432
- self.handle = args[0].handle
1433
- _api.IncRef(self.handle)
1434
- else:
1435
- self.handle = _api.api_VMCompatibilityShim_CTor()
1436
- _api.IncRef(self.handle)
1437
- def __del__(self):
1438
- _api.DecRef(self.handle)
1439
- def __str__(self):
1440
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1441
- sv = 'api.VMCompatibilityShim{'
1442
- first = True
1443
- for v in pr:
1444
- if callable(v[1]):
1445
- continue
1446
- if first:
1447
- first = False
1448
- else:
1449
- sv += ', '
1450
- sv += v[0] + '=' + str(v[1])
1451
- return sv + '}'
1452
- def __repr__(self):
1453
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1454
- sv = 'api.VMCompatibilityShim ( '
1455
- for v in pr:
1456
- if not callable(v[1]):
1457
- sv += v[0] + '=' + str(v[1]) + ', '
1458
- return sv + ')'
1459
- def DefineFunction(self, id, name, argc, function):
1460
- """DefineFunction(str id, str name, int argc, callable function) str
1461
-
1462
- DefineFunction defines a global function with maximum compatibility,
1463
- wrapping arguments and return values as JSON strings.
1464
- An optional id cookie is passed back to the function to identify it.
1465
- jsonArgs is a JSON array string of the arguments.
1466
- The function should return a JSON object string with "result" and "error" fields.
1467
- """
1468
- return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
1469
- def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
1470
- """BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
1471
- return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
1472
- def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
1473
- """BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
1474
- return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
1475
- def BuildNewClassMethod(self, method, id, function):
1476
- """BuildNewClassMethod(object method, str id, callable function) object"""
1477
- return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
1478
- def BuildNewUnknownFunctionHandler(self, id, function):
1479
- """BuildNewUnknownFunctionHandler(str id, callable function) object"""
1480
- return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
1481
- def IsClassDefined(self, name):
1482
- """IsClassDefined(str name) bool"""
1483
- return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
1484
- def LookupObject(self, id):
1485
- """LookupObject(str id) object, str"""
1486
- return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
1487
- def GetObjectMRO(self, id):
1488
- """GetObjectMRO(str id) []str, str"""
1489
- return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
1490
- def GetObjectImmediateFunctions(self, id):
1491
- """GetObjectImmediateFunctions(str id) []str, str"""
1492
- return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
1493
- def GetObjectImmediateVariables(self, id):
1494
- """GetObjectImmediateVariables(str id) []str, str"""
1495
- return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
1496
- def AddVariableToObject(self, id, variable):
1497
- """AddVariableToObject(str id, object variable) str"""
1498
- return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
1499
-
1500
1144
  # Python type for struct api.VMError
1501
1145
  class VMError(go.GoClass):
1502
1146
  """VMError represents errors that can occur in the VM API\n"""
@@ -1626,6 +1270,205 @@ class VMError(go.GoClass):
1626
1270
  """
1627
1271
  return _api.api_VMError_IsConfigError(self.handle)
1628
1272
 
1273
+ # Python type for struct api.ClassDefinition
1274
+ class ClassDefinition(go.GoClass):
1275
+ """"""
1276
+ def __init__(self, *args, **kwargs):
1277
+ """
1278
+ handle=A Go-side object is always initialized with an explicit handle=arg
1279
+ otherwise parameters can be unnamed in order of field names or named fields
1280
+ in which case a new Go object is constructed first
1281
+ """
1282
+ if len(kwargs) == 1 and 'handle' in kwargs:
1283
+ self.handle = kwargs['handle']
1284
+ _api.IncRef(self.handle)
1285
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1286
+ self.handle = args[0].handle
1287
+ _api.IncRef(self.handle)
1288
+ else:
1289
+ self.handle = _api.api_ClassDefinition_CTor()
1290
+ _api.IncRef(self.handle)
1291
+ if 0 < len(args):
1292
+ self.Name = args[0]
1293
+ if "Name" in kwargs:
1294
+ self.Name = kwargs["Name"]
1295
+ if 1 < len(args):
1296
+ self.PublicVariables = args[1]
1297
+ if "PublicVariables" in kwargs:
1298
+ self.PublicVariables = kwargs["PublicVariables"]
1299
+ if 2 < len(args):
1300
+ self.PrivateVariables = args[2]
1301
+ if "PrivateVariables" in kwargs:
1302
+ self.PrivateVariables = kwargs["PrivateVariables"]
1303
+ if 3 < len(args):
1304
+ self.SharedVariables = args[3]
1305
+ if "SharedVariables" in kwargs:
1306
+ self.SharedVariables = kwargs["SharedVariables"]
1307
+ if 4 < len(args):
1308
+ self.PublicMethods = args[4]
1309
+ if "PublicMethods" in kwargs:
1310
+ self.PublicMethods = kwargs["PublicMethods"]
1311
+ if 5 < len(args):
1312
+ self.PrivateMethods = args[5]
1313
+ if "PrivateMethods" in kwargs:
1314
+ self.PrivateMethods = kwargs["PrivateMethods"]
1315
+ if 6 < len(args):
1316
+ self.UnknownFunctionHandler = args[6]
1317
+ if "UnknownFunctionHandler" in kwargs:
1318
+ self.UnknownFunctionHandler = kwargs["UnknownFunctionHandler"]
1319
+ def __del__(self):
1320
+ _api.DecRef(self.handle)
1321
+ def __str__(self):
1322
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1323
+ sv = 'api.ClassDefinition{'
1324
+ first = True
1325
+ for v in pr:
1326
+ if callable(v[1]):
1327
+ continue
1328
+ if first:
1329
+ first = False
1330
+ else:
1331
+ sv += ', '
1332
+ sv += v[0] + '=' + str(v[1])
1333
+ return sv + '}'
1334
+ def __repr__(self):
1335
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1336
+ sv = 'api.ClassDefinition ( '
1337
+ for v in pr:
1338
+ if not callable(v[1]):
1339
+ sv += v[0] + '=' + str(v[1]) + ', '
1340
+ return sv + ')'
1341
+ @property
1342
+ def Name(self):
1343
+ return _api.api_ClassDefinition_Name_Get(self.handle)
1344
+ @Name.setter
1345
+ def Name(self, value):
1346
+ if isinstance(value, go.GoClass):
1347
+ _api.api_ClassDefinition_Name_Set(self.handle, value.handle)
1348
+ else:
1349
+ _api.api_ClassDefinition_Name_Set(self.handle, value)
1350
+ @property
1351
+ def PublicVariables(self):
1352
+ return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PublicVariables_Get(self.handle))
1353
+ @PublicVariables.setter
1354
+ def PublicVariables(self, value):
1355
+ if isinstance(value, go.GoClass):
1356
+ _api.api_ClassDefinition_PublicVariables_Set(self.handle, value.handle)
1357
+ else:
1358
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1359
+ @property
1360
+ def PrivateVariables(self):
1361
+ return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PrivateVariables_Get(self.handle))
1362
+ @PrivateVariables.setter
1363
+ def PrivateVariables(self, value):
1364
+ if isinstance(value, go.GoClass):
1365
+ _api.api_ClassDefinition_PrivateVariables_Set(self.handle, value.handle)
1366
+ else:
1367
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1368
+ @property
1369
+ def SharedVariables(self):
1370
+ return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_SharedVariables_Get(self.handle))
1371
+ @SharedVariables.setter
1372
+ def SharedVariables(self, value):
1373
+ if isinstance(value, go.GoClass):
1374
+ _api.api_ClassDefinition_SharedVariables_Set(self.handle, value.handle)
1375
+ else:
1376
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1377
+ @property
1378
+ def PublicMethods(self):
1379
+ return Map_string_Ptr_api_ClassMethod(handle=_api.api_ClassDefinition_PublicMethods_Get(self.handle))
1380
+ @PublicMethods.setter
1381
+ def PublicMethods(self, value):
1382
+ if isinstance(value, go.GoClass):
1383
+ _api.api_ClassDefinition_PublicMethods_Set(self.handle, value.handle)
1384
+ else:
1385
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1386
+ @property
1387
+ def PrivateMethods(self):
1388
+ return Map_string_Ptr_api_ClassMethod(handle=_api.api_ClassDefinition_PrivateMethods_Get(self.handle))
1389
+ @PrivateMethods.setter
1390
+ def PrivateMethods(self, value):
1391
+ if isinstance(value, go.GoClass):
1392
+ _api.api_ClassDefinition_PrivateMethods_Set(self.handle, value.handle)
1393
+ else:
1394
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1395
+ @property
1396
+ def UnknownFunctionHandler(self):
1397
+ return UnknownFunctionHandler(handle=_api.api_ClassDefinition_UnknownFunctionHandler_Get(self.handle))
1398
+ @UnknownFunctionHandler.setter
1399
+ def UnknownFunctionHandler(self, value):
1400
+ if isinstance(value, go.GoClass):
1401
+ _api.api_ClassDefinition_UnknownFunctionHandler_Set(self.handle, value.handle)
1402
+ else:
1403
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1404
+
1405
+ # Python type for struct api.ClassMethod
1406
+ class ClassMethod(go.GoClass):
1407
+ """"""
1408
+ def __init__(self, *args, **kwargs):
1409
+ """
1410
+ handle=A Go-side object is always initialized with an explicit handle=arg
1411
+ otherwise parameters can be unnamed in order of field names or named fields
1412
+ in which case a new Go object is constructed first
1413
+ """
1414
+ if len(kwargs) == 1 and 'handle' in kwargs:
1415
+ self.handle = kwargs['handle']
1416
+ _api.IncRef(self.handle)
1417
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1418
+ self.handle = args[0].handle
1419
+ _api.IncRef(self.handle)
1420
+ else:
1421
+ self.handle = _api.api_ClassMethod_CTor()
1422
+ _api.IncRef(self.handle)
1423
+ if 0 < len(args):
1424
+ self.Name = args[0]
1425
+ if "Name" in kwargs:
1426
+ self.Name = kwargs["Name"]
1427
+ if 1 < len(args):
1428
+ self.Argc = args[1]
1429
+ if "Argc" in kwargs:
1430
+ self.Argc = kwargs["Argc"]
1431
+ def __del__(self):
1432
+ _api.DecRef(self.handle)
1433
+ def __str__(self):
1434
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1435
+ sv = 'api.ClassMethod{'
1436
+ first = True
1437
+ for v in pr:
1438
+ if callable(v[1]):
1439
+ continue
1440
+ if first:
1441
+ first = False
1442
+ else:
1443
+ sv += ', '
1444
+ sv += v[0] + '=' + str(v[1])
1445
+ return sv + '}'
1446
+ def __repr__(self):
1447
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1448
+ sv = 'api.ClassMethod ( '
1449
+ for v in pr:
1450
+ if not callable(v[1]):
1451
+ sv += v[0] + '=' + str(v[1]) + ', '
1452
+ return sv + ')'
1453
+ @property
1454
+ def Name(self):
1455
+ return _api.api_ClassMethod_Name_Get(self.handle)
1456
+ @Name.setter
1457
+ def Name(self, value):
1458
+ if isinstance(value, go.GoClass):
1459
+ _api.api_ClassMethod_Name_Set(self.handle, value.handle)
1460
+ else:
1461
+ _api.api_ClassMethod_Name_Set(self.handle, value)
1462
+ @property
1463
+ def Argc(self):
1464
+ return _api.api_ClassMethod_Argc_Get(self.handle)
1465
+ @Argc.setter
1466
+ def Argc(self, value):
1467
+ if isinstance(value, go.GoClass):
1468
+ _api.api_ClassMethod_Argc_Set(self.handle, value.handle)
1469
+ else:
1470
+ _api.api_ClassMethod_Argc_Set(self.handle, value)
1471
+
1629
1472
  # Python type for struct api.ClassVariable
1630
1473
  class ClassVariable(go.GoClass):
1631
1474
  """"""
@@ -1706,6 +1549,163 @@ class ClassVariable(go.GoClass):
1706
1549
  else:
1707
1550
  _api.api_ClassVariable_Locked_Set(self.handle, value)
1708
1551
 
1552
+ # Python type for struct api.ExecutionResult
1553
+ class ExecutionResult(go.GoClass):
1554
+ """ExecutionResult represents the result of executing Objective-LOL code\n"""
1555
+ def __init__(self, *args, **kwargs):
1556
+ """
1557
+ handle=A Go-side object is always initialized with an explicit handle=arg
1558
+ otherwise parameters can be unnamed in order of field names or named fields
1559
+ in which case a new Go object is constructed first
1560
+ """
1561
+ if len(kwargs) == 1 and 'handle' in kwargs:
1562
+ self.handle = kwargs['handle']
1563
+ _api.IncRef(self.handle)
1564
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1565
+ self.handle = args[0].handle
1566
+ _api.IncRef(self.handle)
1567
+ else:
1568
+ self.handle = _api.api_ExecutionResult_CTor()
1569
+ _api.IncRef(self.handle)
1570
+ if 0 < len(args):
1571
+ self.Value = args[0]
1572
+ if "Value" in kwargs:
1573
+ self.Value = kwargs["Value"]
1574
+ if 1 < len(args):
1575
+ self.RawValue = args[1]
1576
+ if "RawValue" in kwargs:
1577
+ self.RawValue = kwargs["RawValue"]
1578
+ if 2 < len(args):
1579
+ self.Output = args[2]
1580
+ if "Output" in kwargs:
1581
+ self.Output = kwargs["Output"]
1582
+ def __del__(self):
1583
+ _api.DecRef(self.handle)
1584
+ def __str__(self):
1585
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1586
+ sv = 'api.ExecutionResult{'
1587
+ first = True
1588
+ for v in pr:
1589
+ if callable(v[1]):
1590
+ continue
1591
+ if first:
1592
+ first = False
1593
+ else:
1594
+ sv += ', '
1595
+ sv += v[0] + '=' + str(v[1])
1596
+ return sv + '}'
1597
+ def __repr__(self):
1598
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1599
+ sv = 'api.ExecutionResult ( '
1600
+ for v in pr:
1601
+ if not callable(v[1]):
1602
+ sv += v[0] + '=' + str(v[1]) + ', '
1603
+ return sv + ')'
1604
+ @property
1605
+ def Value(self):
1606
+ """Return value from the execution (e.g., from MAIN function)
1607
+ """
1608
+ return GoValue(handle=_api.api_ExecutionResult_Value_Get(self.handle))
1609
+ @Value.setter
1610
+ def Value(self, value):
1611
+ if isinstance(value, go.GoClass):
1612
+ _api.api_ExecutionResult_Value_Set(self.handle, value.handle)
1613
+ else:
1614
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1615
+ @property
1616
+ def RawValue(self):
1617
+ """Raw Objective-LOL value (for advanced use)
1618
+ """
1619
+ return go.environment_Value(handle=_api.api_ExecutionResult_RawValue_Get(self.handle))
1620
+ @RawValue.setter
1621
+ def RawValue(self, value):
1622
+ if isinstance(value, go.GoClass):
1623
+ _api.api_ExecutionResult_RawValue_Set(self.handle, value.handle)
1624
+ else:
1625
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1626
+ @property
1627
+ def Output(self):
1628
+ """Output captured during execution (if configured)
1629
+ """
1630
+ return _api.api_ExecutionResult_Output_Get(self.handle)
1631
+ @Output.setter
1632
+ def Output(self, value):
1633
+ if isinstance(value, go.GoClass):
1634
+ _api.api_ExecutionResult_Output_Set(self.handle, value.handle)
1635
+ else:
1636
+ _api.api_ExecutionResult_Output_Set(self.handle, value)
1637
+
1638
+ # Python type for struct api.GoValue
1639
+ class GoValue(go.GoClass):
1640
+ """"""
1641
+ def __init__(self, *args, **kwargs):
1642
+ """
1643
+ handle=A Go-side object is always initialized with an explicit handle=arg
1644
+ otherwise parameters can be unnamed in order of field names or named fields
1645
+ in which case a new Go object is constructed first
1646
+ """
1647
+ if len(kwargs) == 1 and 'handle' in kwargs:
1648
+ self.handle = kwargs['handle']
1649
+ _api.IncRef(self.handle)
1650
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1651
+ self.handle = args[0].handle
1652
+ _api.IncRef(self.handle)
1653
+ else:
1654
+ self.handle = _api.api_GoValue_CTor()
1655
+ _api.IncRef(self.handle)
1656
+ def __del__(self):
1657
+ _api.DecRef(self.handle)
1658
+ def __str__(self):
1659
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1660
+ sv = 'api.GoValue{'
1661
+ first = True
1662
+ for v in pr:
1663
+ if callable(v[1]):
1664
+ continue
1665
+ if first:
1666
+ first = False
1667
+ else:
1668
+ sv += ', '
1669
+ sv += v[0] + '=' + str(v[1])
1670
+ return sv + '}'
1671
+ def __repr__(self):
1672
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1673
+ sv = 'api.GoValue ( '
1674
+ for v in pr:
1675
+ if not callable(v[1]):
1676
+ sv += v[0] + '=' + str(v[1]) + ', '
1677
+ return sv + ')'
1678
+ def ID(self):
1679
+ """ID() str"""
1680
+ return _api.api_GoValue_ID(self.handle)
1681
+ def MarshalJSON(self):
1682
+ """MarshalJSON() []int, str"""
1683
+ return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
1684
+ def Type(self):
1685
+ """Type() str"""
1686
+ return _api.api_GoValue_Type(self.handle)
1687
+ def Int(self):
1688
+ """Int() long, str"""
1689
+ return _api.api_GoValue_Int(self.handle)
1690
+ def Float(self):
1691
+ """Float() float, str"""
1692
+ return _api.api_GoValue_Float(self.handle)
1693
+ def String(self):
1694
+ """String() str, str"""
1695
+ return _api.api_GoValue_String(self.handle)
1696
+ def Bool(self):
1697
+ """Bool() bool, str"""
1698
+ return _api.api_GoValue_Bool(self.handle)
1699
+ def Slice(self):
1700
+ """Slice() []object, str"""
1701
+ return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
1702
+ def Map(self):
1703
+ """Map() object, str"""
1704
+ return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
1705
+ def Object(self):
1706
+ """Object() object, str"""
1707
+ return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
1708
+
1709
1709
 
1710
1710
  # ---- Slices ---
1711
1711
 
@@ -1720,39 +1720,24 @@ def DefaultConfig():
1720
1720
  DefaultConfig returns a default configuration
1721
1721
  """
1722
1722
  return VMConfig(handle=_api.api_DefaultConfig())
1723
- def NewClassDefinition():
1724
- """NewClassDefinition() object"""
1725
- return ClassDefinition(handle=_api.api_NewClassDefinition())
1726
- def WrapInt(value):
1727
- """WrapInt(long value) object"""
1728
- return GoValue(handle=_api.api_WrapInt(value))
1729
- def WrapObject(value):
1730
- """WrapObject(object value) object"""
1731
- return GoValue(handle=_api.api_WrapObject(value.handle))
1732
- def WrapBool(value):
1733
- """WrapBool(bool value) object"""
1734
- return GoValue(handle=_api.api_WrapBool(value))
1735
- def WrapAny(value):
1736
- """WrapAny(str value) object"""
1737
- return GoValue(handle=_api.api_WrapAny(value))
1738
- def ToGoValue(val):
1739
- """ToGoValue(object val) object, str
1740
-
1741
- ToGoValue converts an Objective-LOL value to a Go value
1742
- """
1743
- return GoValue(handle=_api.api_ToGoValue(val.handle))
1744
- def WrapFloat(value):
1745
- """WrapFloat(float value) object"""
1746
- return GoValue(handle=_api.api_WrapFloat(value))
1747
- def WrapString(value):
1748
- """WrapString(str value) object"""
1749
- return GoValue(handle=_api.api_WrapString(value))
1750
1723
  def NewVM(config):
1751
1724
  """NewVM(object config) object, str
1752
1725
 
1753
1726
  NewVM creates a new VM instance with the given config
1754
1727
  """
1755
1728
  return VM(handle=_api.api_NewVM(config.handle))
1729
+ def NewConversionError(message, wrapped):
1730
+ """NewConversionError(str message, str wrapped) object
1731
+
1732
+ NewConversionError creates a new type conversion error
1733
+ """
1734
+ return VMError(handle=_api.api_NewConversionError(message, wrapped))
1735
+ def NewTimeoutError(duration):
1736
+ """NewTimeoutError(long duration) object
1737
+
1738
+ NewTimeoutError creates a new timeout error
1739
+ """
1740
+ return VMError(handle=_api.api_NewTimeoutError(duration))
1756
1741
  def NewCompileError(message, source):
1757
1742
  """NewCompileError(str message, object source) object
1758
1743
 
@@ -1771,33 +1756,48 @@ def NewRuntimeError(message, source):
1771
1756
  NewRuntimeError creates a new runtime error
1772
1757
  """
1773
1758
  return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
1774
- def NewConversionError(message, wrapped):
1775
- """NewConversionError(str message, str wrapped) object
1776
-
1777
- NewConversionError creates a new type conversion error
1778
- """
1779
- return VMError(handle=_api.api_NewConversionError(message, wrapped))
1780
- def NewTimeoutError(duration):
1781
- """NewTimeoutError(long duration) object
1759
+ def NewClassDefinition():
1760
+ """NewClassDefinition() object"""
1761
+ return ClassDefinition(handle=_api.api_NewClassDefinition())
1762
+ def WrapAny(value):
1763
+ """WrapAny(str value) object"""
1764
+ return GoValue(handle=_api.api_WrapAny(value))
1765
+ def WrapFloat(value):
1766
+ """WrapFloat(float value) object"""
1767
+ return GoValue(handle=_api.api_WrapFloat(value))
1768
+ def WrapString(value):
1769
+ """WrapString(str value) object"""
1770
+ return GoValue(handle=_api.api_WrapString(value))
1771
+ def WrapBool(value):
1772
+ """WrapBool(bool value) object"""
1773
+ return GoValue(handle=_api.api_WrapBool(value))
1774
+ def WrapInt(value):
1775
+ """WrapInt(long value) object"""
1776
+ return GoValue(handle=_api.api_WrapInt(value))
1777
+ def ToGoValue(val):
1778
+ """ToGoValue(object val) object, str
1782
1779
 
1783
- NewTimeoutError creates a new timeout error
1780
+ ToGoValue converts an Objective-LOL value to a Go value
1784
1781
  """
1785
- return VMError(handle=_api.api_NewTimeoutError(duration))
1782
+ return GoValue(handle=_api.api_ToGoValue(val.handle))
1783
+ def WrapObject(value):
1784
+ """WrapObject(object value) object"""
1785
+ return GoValue(handle=_api.api_WrapObject(value.handle))
1786
1786
 
1787
1787
 
1788
1788
  # ---- Functions ---
1789
- def FromGoValue(val):
1790
- """FromGoValue(object val) object, str
1791
-
1792
- FromGoValue converts a Go value to an Objective-LOL value
1793
- """
1794
- return go.environment_Value(handle=_api.api_FromGoValue(val.handle))
1795
1789
  def ConvertArguments(args):
1796
1790
  """ConvertArguments([]object args) []object, str
1797
1791
 
1798
1792
  ConvertArguments converts a slice of Go values to Objective-LOL values
1799
1793
  """
1800
1794
  return Slice_environment_Value(handle=_api.api_ConvertArguments(args.handle))
1795
+ def FromGoValue(val):
1796
+ """FromGoValue(object val) object, str
1797
+
1798
+ FromGoValue converts a Go value to an Objective-LOL value
1799
+ """
1800
+ return go.environment_Value(handle=_api.api_FromGoValue(val.handle))
1801
1801
  def LookupObject(id):
1802
1802
  """LookupObject(str id) object, str"""
1803
1803
  return go.Ptr_environment_ObjectInstance(handle=_api.api_LookupObject(id))