IncludeCPP 3.7.9__py3-none-any.whl → 3.8.0__py3-none-any.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.
@@ -1076,5 +1076,131 @@
1076
1076
  "}"
1077
1077
  ],
1078
1078
  "description": "Open parameter function"
1079
+ },
1080
+ "Undefined Function": {
1081
+ "prefix": ["undefined", "undef"],
1082
+ "body": [
1083
+ "undefined ${1:void} ${2:FuncName}(${3:params}) {",
1084
+ "\t$0",
1085
+ "}"
1086
+ ],
1087
+ "description": "Function with undefined modifier - suppresses all errors during execution"
1088
+ },
1089
+ "Private Function": {
1090
+ "prefix": "private",
1091
+ "body": [
1092
+ "private ${1:void} ${2:FuncName}(${3:params}) {",
1093
+ "\t$0",
1094
+ "}"
1095
+ ],
1096
+ "description": "Private function - disables all external injections"
1097
+ },
1098
+ "Closed Function": {
1099
+ "prefix": "closed",
1100
+ "body": [
1101
+ "closed ${1:void} ${2:FuncName}(${3:params}) {",
1102
+ "\t$0",
1103
+ "}"
1104
+ ],
1105
+ "description": "Closed function - protects from external injection modifications"
1106
+ },
1107
+ "Virtual Function": {
1108
+ "prefix": "virtual",
1109
+ "body": [
1110
+ "virtual ${1:void} ${2:FuncName}(${3:params}) {",
1111
+ "\t$0",
1112
+ "}"
1113
+ ],
1114
+ "description": "Virtual function - can be overridden in child classes"
1115
+ },
1116
+ "Meta Function": {
1117
+ "prefix": "meta",
1118
+ "body": [
1119
+ "meta ${1:void} ${2:FuncName}(${3:params}) {",
1120
+ "\t$0",
1121
+ "}"
1122
+ ],
1123
+ "description": "Meta function - metaprogramming function for code generation"
1124
+ },
1125
+ "Super Function": {
1126
+ "prefix": "super",
1127
+ "body": [
1128
+ "super ${1:void} ${2:FuncName}(${3:params}) {",
1129
+ "\t$0",
1130
+ "}"
1131
+ ],
1132
+ "description": "Super function - enhanced privileges for system-level operations"
1133
+ },
1134
+ "SQLBased Function": {
1135
+ "prefix": "sqlbased",
1136
+ "body": [
1137
+ "sqlbased ${1:void} ${2:FuncName}(${3:params}) {",
1138
+ "\t$0",
1139
+ "}"
1140
+ ],
1141
+ "description": "SQL-based function - optimized for database operations"
1142
+ },
1143
+ "API Function with Modifiers": {
1144
+ "prefix": ["apifunc", "globalapi"],
1145
+ "body": [
1146
+ "private super virtual meta ${1:GlobalApi}() {",
1147
+ "\tinstance<\"${2:apiName}\"> api;",
1148
+ "\tclass ${3:Api} {",
1149
+ "\t\tdefine ${4:getMethod}() {",
1150
+ "\t\t\t$0",
1151
+ "\t\t}",
1152
+ "\t}",
1153
+ "\t%api +<== new ${3}();",
1154
+ "\treturn %api;",
1155
+ "}"
1156
+ ],
1157
+ "description": "Global API function with full modifiers and instance pattern"
1158
+ },
1159
+ "Combined Modifiers Function": {
1160
+ "prefix": "modfunc",
1161
+ "body": [
1162
+ "${1|undefined,private,closed,virtual,meta,super,sqlbased|} ${2|undefined,private,closed,virtual,meta,super,sqlbased,void,int,string|} ${3:FuncName}(${4:params}) {",
1163
+ "\t$0",
1164
+ "}"
1165
+ ],
1166
+ "description": "Function with selectable modifier combinations"
1167
+ },
1168
+ "Python Pythonize": {
1169
+ "prefix": ["python::pythonize", "pythonize"],
1170
+ "body": "python::pythonize(${1:instance})$0",
1171
+ "description": "Convert CSSL class instance to Python-usable object"
1172
+ },
1173
+ "Return Pythonized Class": {
1174
+ "prefix": "returnpython",
1175
+ "body": [
1176
+ "${1:instance} = new ${2:ClassName}(${3:args});",
1177
+ "pyobj = python::pythonize(${1});",
1178
+ "parameter.return(pyobj);"
1179
+ ],
1180
+ "description": "Create class instance and return as Python object"
1181
+ },
1182
+ "Class with Python Export": {
1183
+ "prefix": "pyclass",
1184
+ "body": [
1185
+ "class ${1:ClassName} {",
1186
+ "\t${2:string} ${3:name};",
1187
+ "",
1188
+ "\t${1}(${4:params}) {",
1189
+ "\t\tthis->${3} = ${5:value};",
1190
+ "\t}",
1191
+ "",
1192
+ "\t${6:string} get${3/(.*)/${1:/capitalize}/}() {",
1193
+ "\t\treturn this->${3};",
1194
+ "\t}",
1195
+ "",
1196
+ "\tvoid set${3/(.*)/${1:/capitalize}/}(${2} newValue) {",
1197
+ "\t\tthis->${3} = newValue;",
1198
+ "\t}",
1199
+ "}",
1200
+ "",
1201
+ "${7:obj} = new ${1}(${8:args});",
1202
+ "parameter.return(python::pythonize(${7}));$0"
1203
+ ],
1204
+ "description": "Create a class and export as Python object"
1079
1205
  }
1080
1206
  }
@@ -27,17 +27,20 @@
27
27
  { "include": "#function-calls" },
28
28
  { "include": "#builtins" },
29
29
  { "include": "#operators" },
30
- { "include": "#constants" }
30
+ { "include": "#constants" },
31
+ { "include": "#variables" }
31
32
  ],
32
33
  "repository": {
33
34
  "super-functions": {
34
35
  "patterns": [
35
36
  {
36
- "name": "markup.bold.super.builtin.cssl",
37
+ "comment": "#$run, #$exec, #$printl - yellow/gold color",
38
+ "name": "entity.name.tag.super.cssl",
37
39
  "match": "#\\$(run|exec|printl|init)\\b"
38
40
  },
39
41
  {
40
- "name": "markup.bold.super.call.cssl",
42
+ "comment": "#$anyFunction - yellow/gold color",
43
+ "name": "entity.name.tag.super.cssl",
41
44
  "match": "#\\$[a-zA-Z_][a-zA-Z0-9_]*"
42
45
  }
43
46
  ]
@@ -122,6 +125,9 @@
122
125
  { "include": "#class-member-declaration" },
123
126
  { "include": "#types" },
124
127
  { "include": "#this-access" },
128
+ { "include": "#captured-references" },
129
+ { "include": "#global-references" },
130
+ { "include": "#shared-references" },
125
131
  { "include": "#strings" },
126
132
  { "include": "#numbers" },
127
133
  { "include": "#keywords" },
@@ -267,23 +273,23 @@
267
273
  "injection-operators": {
268
274
  "patterns": [
269
275
  {
270
- "comment": "Infuse operators <<== (REPLACE) - orange/gold color",
271
- "name": "markup.inserted.infuse.cssl",
276
+ "comment": "Infuse operators <<== (REPLACE) - orange color",
277
+ "name": "constant.character.escape.infuse.cssl",
272
278
  "match": "(\\+<<==|<<==|-<<==)"
273
279
  },
274
280
  {
275
- "comment": "Infuse out operators ==>> - orange/gold color",
276
- "name": "markup.inserted.infuse.out.cssl",
281
+ "comment": "Infuse out operators ==>> - orange color",
282
+ "name": "constant.character.escape.infuse.out.cssl",
277
283
  "match": "(==>>\\+|==>>|-==>>)"
278
284
  },
279
285
  {
280
286
  "comment": "Brute injection <== (ADD) - cyan/blue color",
281
- "name": "support.constant.brute.cssl",
287
+ "name": "support.function.brute.cssl",
282
288
  "match": "(\\+<==|<==|-<==)"
283
289
  },
284
290
  {
285
291
  "comment": "Brute injection out ==> - cyan/blue color",
286
- "name": "support.constant.brute.out.cssl",
292
+ "name": "support.function.brute.out.cssl",
287
293
  "match": "(==>\\+|==>|-==>)"
288
294
  },
289
295
  {
@@ -313,6 +319,14 @@
313
319
  {
314
320
  "name": "support.function.namespace.combo.cssl",
315
321
  "match": "\\bcombo::(filterdb|blocked|like)\\b"
322
+ },
323
+ {
324
+ "name": "support.function.namespace.python.cssl",
325
+ "match": "\\bpython::(pythonize|wrap|export)\\b"
326
+ },
327
+ {
328
+ "name": "support.function.namespace.filter.cssl",
329
+ "match": "\\bfilter::(register|unregister|list|exists)\\b"
316
330
  }
317
331
  ]
318
332
  },
@@ -351,23 +365,30 @@
351
365
  "captured-references": {
352
366
  "patterns": [
353
367
  {
354
- "name": "variable.other.captured.cssl",
355
- "match": "%[a-zA-Z_][a-zA-Z0-9_]*"
368
+ "comment": "%identifier - % is light blue/cyan, identifier is pink",
369
+ "match": "(%)([a-zA-Z_][a-zA-Z0-9_]*)",
370
+ "captures": {
371
+ "1": { "name": "support.type.cssl" },
372
+ "2": { "name": "entity.other.inherited-class.cssl" }
373
+ }
356
374
  }
357
375
  ]
358
376
  },
359
377
  "global-references": {
360
378
  "patterns": [
361
379
  {
362
- "name": "variable.other.global.cssl",
380
+ "comment": "@identifier - magenta color (full)",
381
+ "name": "constant.other.symbol.cssl",
363
382
  "match": "@[a-zA-Z_][a-zA-Z0-9_]*"
364
383
  },
365
384
  {
366
- "name": "variable.other.global-decl.cssl",
385
+ "comment": "r@identifier - magenta color",
386
+ "name": "constant.other.symbol.cssl",
367
387
  "match": "r@[a-zA-Z_][a-zA-Z0-9_]*"
368
388
  },
369
389
  {
370
- "name": "variable.other.self-ref.cssl",
390
+ "comment": "s@identifier - magenta color",
391
+ "name": "constant.other.symbol.cssl",
371
392
  "match": "s@[a-zA-Z_][a-zA-Z0-9_]*"
372
393
  }
373
394
  ]
@@ -375,11 +396,21 @@
375
396
  "shared-references": {
376
397
  "patterns": [
377
398
  {
378
- "name": "variable.other.shared.cssl",
399
+ "comment": "$identifier - same color as 'new' keyword (full)",
400
+ "name": "keyword.operator.new.cssl",
379
401
  "match": "\\$[a-zA-Z_][a-zA-Z0-9_]*"
380
402
  }
381
403
  ]
382
404
  },
405
+ "variables": {
406
+ "patterns": [
407
+ {
408
+ "comment": "Regular variables - pink/salmon color",
409
+ "name": "entity.other.inherited-class.cssl",
410
+ "match": "\\b[a-z_][a-zA-Z0-9_]*\\b"
411
+ }
412
+ ]
413
+ },
383
414
  "instance-references": {
384
415
  "patterns": [
385
416
  {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 3.7.9
3
+ Version: 3.8.0
4
4
  Summary: Professional C++ Python bindings with type-generic templates, pystubs and native threading
5
5
  Home-page: https://github.com/liliassg/IncludeCPP
6
6
  Author: Lilias Hatterscheidt
@@ -623,7 +623,7 @@ Then check **"Enable Experimental Features"** and save.
623
623
 
624
624
  Use at your own discretion. Report issues at: https://github.com/liliassg/IncludeCPP/issues
625
625
 
626
- # CSSL - CSO Service Script Language
626
+ # CSSL - C-Style Scripting Language
627
627
 
628
628
  IncludeCPP includes CSSL, a scripting language with advanced data manipulation features.
629
629
 
@@ -839,7 +839,7 @@ print(math_mod.multiply(4, 5)) # 20
839
839
  cssl = CSSL.CsslLang()
840
840
 
841
841
  # Register code as payload
842
- cssl.code("helpers", '''
842
+ cssl.script(<name>, "helpers", '''
843
843
  global version = "1.0.0";
844
844
  void log(string msg) {
845
845
  printl("[LOG] " + msg);
@@ -847,230 +847,61 @@ cssl.code("helpers", '''
847
847
  ''')
848
848
 
849
849
  # Use in CSSL
850
- cssl.exec('''
851
- payload("helpers");
850
+ cssl.run('''
851
+ payload("<name>"); // use module you declared in cssl.script(<name>, ...)
852
852
  @log("Application started");
853
853
  printl(@version);
854
854
  ''')
855
855
  ```
856
856
 
857
- # Changelog
858
-
859
- ## v3.4.20
860
- - **Documentation:**
861
- - Added complete CSSL language documentation
862
- - Live object sharing with `$name` syntax
863
- - Data types, control flow, functions, injection system
864
- - String methods, modules, and inline payloads
865
-
866
- ## v3.4.19
867
- - **Critical Bug Fixes:**
868
- - Fixed generator raw string literal in parser.cpp (regex pattern with `)"` prematurely terminated)
869
- - Fixed shared object property writes inside loops not persisting to Python
870
- - Added member_access handling in flow operations for shared objects
871
-
872
- ## v3.4.18
873
- - **Bug Fix:**
874
- - Attempted fix for shared object loop writes (partially fixed)
875
-
876
- ## v3.4.17
877
- - **New Feature: Live Object Sharing**
878
- - `cssl.share(instance, name)` - Share Python objects with CSSL
879
- - `$name` syntax for accessing shared objects
880
- - Live bidirectional updates - changes in CSSL reflect in Python
881
- - `delete("name")` builtin for removing shared objects
882
- - Shared object metadata stored in `%APPDATA%/IncludeCPP/shared_objects/`
883
-
884
- ## v3.4.16
885
- - **CSSL Bug Fixes:**
886
- - Fixed `startsWith()` and `endsWith()` parser errors
887
-
888
- ## v3.4.15
889
- - **CSSL Enhancements:**
890
- - Added `elif` keyword support
891
- - Added `range(start, end, step)` with step parameter
892
- - Added `begin()` and `end()` methods to all collection types
893
- - Added `cssl.code(name, code)` for inline payload registration
894
-
895
- ## v3.4.2
896
- - **New Feature: `exec` Command**
897
- - Interactive REPL for quick code testing without creating files
898
- - `includecpp exec py` - Python REPL with IncludeCPP support
899
- - `includecpp exec cpp` - C++ REPL with auto-compilation
900
- - Auto-import modules: `includecpp exec py mymodule`
901
- - Auto-import from plugins: `includecpp exec py plugins/math.cp`
902
- - Import all modules: `includecpp exec py --all`
903
- - Enter code line by line, press ENTER on empty line to execute
904
-
905
- ## v3.4.1
906
- - **Bug Fixes:**
907
- - fix command: Fixed false positives for unused variables (sum, memory_) using word-boundary matching
908
- - CPPY: C++ reserved words (double, int, void, etc.) now properly escaped as Python identifiers
909
- - CPPY: C++ STL functions (accumulate, find, sort, reverse) properly converted to Python equivalents
910
- - CPPY: Member variables with trailing underscore (memory_) now get self. prefix
911
- - CPPY: Private class members now detected for self. prefix conversion
912
- - Plugin: Auto-detect header files from #include directives in source files
913
-
914
- ## v3.4.0
915
- - **CodeMaker Major Update:**
916
- - New Source node type with 8 connection ports for code generation
917
- - Smart code generation: Source nodes generate Python/Plugin files with all connected nodes included
918
- - Right-click on Source node: "Create Python" creates .py in project root
919
- - Right-click on Source node: "Create Plugin" creates .cp, .h, .cpp in plugins/ and include/
920
- - Code options hidden after file generation (prevents duplicates)
921
- - Enhanced description display with background rect in node body
922
- - Arrow key navigation to pan the canvas
923
- - New toolbar buttons: Align H, Align V, Auto-Arrange
924
- - Quick-add buttons: +Source, +Class, +Function
925
- - Properties Panel on the right side for editing selected nodes
926
- - Auto-arrange algorithm for grid layout
927
- - Align horizontal/vertical for selected nodes
928
- - **Bug Fixes:**
929
- - Changelog encoding fixes for Windows console
930
- - CPPY C++ keyword escaping (double, int, etc.)
931
- - CPPY C++ to Python syntax conversion improvements
932
- - CPPY self. prefix for member variables
933
- - Plugin auto-header detection from #include
934
-
935
- ## v3.3.21
936
- - **Encoding Fixes:**
937
- - Replaced Unicode arrow characters with ASCII in changelog (Windows console compatibility)
938
-
939
- ## v3.3.20
940
- - **Bug Fixes:**
941
- - Fixed `QPoint.toPoint()` AttributeError in rubber band selection
942
- - Added UTF-8 encoding to all file read/write operations for cross-platform compatibility
943
- - Fixed bare `except:` clauses to proper `except Exception:` in settings_ui.py
944
-
945
- ## v3.3.19
946
- - **PyQt6 Import Fix:**
947
- - Fixed silent import failure that caused "PyQt6 not installed" error even when installed
948
- - Moved `QUndoStack`, `QUndoCommand`, `QShortcut` from QtWidgets to QtGui (correct location in PyQt6)
949
-
950
- ## v3.3.18
951
- - **CodeMaker Visual Editor (Experimental):**
952
- - Complete rewrite of `project` command with professional-grade UI
953
- - 24 node types across 5 categories (Code Structures, Functions, Data, Organization, Flow)
954
- - Undo/redo system with full command history
955
- - Multi-selection with rubber band and Ctrl+Click
956
- - Copy/paste/duplicate with Ctrl+C/V/D shortcuts
957
- - Node grouping with Ctrl+G
958
- - Code generation for C++ (header/source) and Python
959
- - Search and filter nodes by name and type
960
- - Export to PNG/SVG with transparency support
961
- - Categorized right-click context menus
962
- - Toolbar with common actions
963
- - Cross-platform font detection (Windows/macOS/Linux)
964
- - DPI-aware scaling for high-resolution displays
965
- - **Experimental Feature Gating:**
966
- - `project` command now requires "Enable Experimental Features" in settings
967
- - Consistent gating with `ai` and `cppy` commands
968
-
969
- ## v3.3.16-3.3.17
970
- - **QPen Bug Fixes:**
971
- - Fixed 3 instances of `setPen(Qt.PenStyle.NoPen)` to `setPen(QPen(Qt.PenStyle.NoPen))`
972
- - Proper QPen construction for PyQt6 compatibility
973
-
974
- ## v3.3.15
975
- - **CPPY Converter Major Fixes:**
976
- - Functions returning container now get `std::vector<T>` return type (e.g., shuffle_list)
977
- - `max(items)` / `min(items)` now correctly uses `std::max_element` / `std::min_element`
978
- - Template element parameters (`value`, `item`) now use `const T&` instead of `double`
979
- - Explicit template instantiations now include correct return types and all parameters
980
- - Python docstrings now become C++ comments instead of dangling string literals
981
- - **Unicode Fallback System:**
982
- - AI progress indicators use ASCII fallbacks on Windows terminals
983
- - Fixed encoding errors in changelog display
984
-
985
- ## v3.3.14
986
- - **Experimental Features System:**
987
- - AI and CPPY commands now hidden by default
988
- - Enable via Settings UI: "Enable Experimental Features" checkbox
989
- - Warning about potential bugs documented in README
990
- - **Settings UI Improvements:**
991
- - Added scrollable content area to prevent layout squashing
992
- - New "Experimental" section with orange header
993
- - Better spacing and styling for all elements
994
- - Preserved existing config values on save
995
-
996
- ## v3.3.13
997
- - **Template Support for Generic Functions:**
998
- - Generic container parameters now generate proper C++ templates
999
- - `template<typename T> T getChoice(const std::vector<T>& choices)` instead of invalid `std::vector<auto>`
1000
- - Automatic explicit template instantiations for int, double, std::string
1001
- - **AI Conversion - No pybind11:**
1002
- - AI no longer generates pybind11 code - IncludeCPP handles bindings automatically
1003
- - Clean C++ output in `namespace includecpp`
1004
- - User runs `includecpp plugin` separately to generate bindings
1005
- - **AI Context - Dynamic README:**
1006
- - AI now loads README.md dynamically for accurate IncludeCPP documentation
1007
- - Better understanding of IncludeCPP workflow and patterns
1008
-
1009
- ## v3.3.12
1010
- - **Smart Type Inference:**
1011
- - Parameter types now inferred from common naming patterns (start/end -> int, name/path -> string, etc.)
1012
- - Variable type tracking throughout conversion for accurate string detection
1013
- - Loop variable types inferred from iterables (enumerate, for loops)
1014
- - **String Conversion Fix:**
1015
- - No more `std::to_string()` on already-string variables in f-strings
1016
- - `_is_string_expr()` method for comprehensive string type detection
1017
- - String variables detected by name, type tracking, and method calls
1018
- - **AI Conversion Improvements:**
1019
- - Explicit file extension enforcement (.cpp NOT .cp, .h NOT .hpp)
1020
- - Better --no-h flag handling with clear AI instructions
1021
- - AI can request clarification on unconvertible modules (tkinter, pygame, etc.)
1022
- - User prompted for input when AI needs guidance
1023
-
1024
- ## v3.3.11
1025
- - **CPPY Converter Improvements:**
1026
- - Added `_safe_arg()` and `_safe_get()` for robust bounds checking on all args
1027
- - Added comprehensive try-except handling in `_convert_expr()` with warnings
1028
- - Improved type inference with empty container handling and exception safety
1029
- - Complete string escaping: `\0`, `\f`, `\b`, `\a`, `\v` now properly escaped
1030
- - **New Python Constructs:**
1031
- - Dict comprehensions: `{k: v for k, v in items}` now converts to C++
1032
- - Set comprehensions: `{x for x in items}` now converts to C++
1033
- - Generator expressions: `(x for x in items)` now converts to vector
1034
- - Tuple unpacking: `a, b = func()` now uses C++17 structured bindings
1035
- - **AI Conversion Flags:**
1036
- - New `--think` flag for less context mode
1037
- - New `--think3` flag for maximum context mode
1038
- - New `--websearch` flag for web search in AI conversion
1039
- - Default: `--think2` mode (unchanged behavior)
1040
-
1041
- ## v3.3.10
1042
- - **CPPY Converter seeded RNG fixes:**
1043
- - Fixed `rng = random.Random(seed)` then `rng.randint()` - now properly tracks seeded RNG variables
1044
- - Fixed `random.choices(...)[0]` subscript - returns single element directly without `[0]`
1045
- - Seeded RNG methods (randint, uniform, choice, random) now use the tracked variable with proper C++ distributions
1046
-
1047
- ## v3.3.9
1048
- - **CPPY Converter fixes:**
1049
- - Added f-string (JoinedStr) support - f"text {expr}" now converts to string concatenation
1050
- - Fixed `random.Random(seed).method()` chained calls - now generates proper inline lambda with seeded RNG
1051
- - Fixed `random.choices(items, weights=weights)` keyword argument handling
1052
- - Improved string type detection in f-string expressions
1053
-
1054
- ## v3.3.8
1055
- - **Major rulebased converter improvements:**
1056
- - Added Python `random` module support (randint, uniform, choice, sample, shuffle, gauss, etc.)
1057
- - Added `os` module support (getcwd, path.join, path.exists, listdir, mkdir, etc.)
1058
- - Added `time` module support (sleep, time, perf_counter, monotonic)
1059
- - Added `sys` module support (exit, platform)
1060
- - Added `math` module support (sqrt, pow, sin, cos, log, etc.)
1061
- - Added `re` (regex) module support (match, search, sub, findall)
1062
- - Added `threading` module support (Thread, Lock, Semaphore, etc.)
1063
- - Added `collections` module support (deque, defaultdict, Counter)
1064
- - Added `pathlib.Path` support
1065
- - **Unconvertible code detection:**
1066
- - Automatically detects GUI frameworks (tkinter, PyQt, PySide, pygame) and other unconvertible modules
1067
- - Shows red warning with line numbers when unconvertible code is found
1068
- - New `--force` flag to convert anyway (with `/* UNCONVERTIBLE */` comments)
1069
- - Supports 30+ modules in detection (numpy, pandas, flask, django, etc.)
1070
- - Fixed duplicate file output in `cppy convert --ai`
1071
- - Plugin command now skips inline and underscore-prefixed functions
1072
-
1073
-
1074
- ---
1075
-
1076
- MIT License | v3.4.20 | [GitHub](https://github.com/liliassg/IncludeCPP)
857
+ ## Return CSSL Classes to Python
858
+
859
+ Use `python::pythonize()` to convert CSSL class instances into Python-usable objects:
860
+
861
+ ```python
862
+ from includecpp import CSSL
863
+
864
+ cssl = CSSL.CsslLang()
865
+
866
+ # Create and return a CSSL class as a Python object
867
+ greeter = cssl.run('''
868
+ class Greeter {
869
+ string name;
870
+
871
+ Greeter(string n) {
872
+ this->name = n;
873
+ }
874
+
875
+ string sayHello() {
876
+ return "Hello, " + this->name + "!";
877
+ }
878
+
879
+ void setName(string newName) {
880
+ this->name = newName;
881
+ }
882
+
883
+ string getName() {
884
+ return this->name;
885
+ }
886
+ }
887
+
888
+ instance = new Greeter("World");
889
+ pyclass = python::pythonize(instance);
890
+ parameter.return(pyclass);
891
+ ''')
892
+
893
+ # Now use it like a normal Python object!
894
+ print(greeter.name) # "World"
895
+ print(greeter.sayHello()) # "Hello, World!"
896
+ greeter.setName("Python")
897
+ print(greeter.getName()) # "Python"
898
+ print(greeter.name) # "Python"
899
+ ```
900
+
901
+ ### Aliases
902
+
903
+ - `python::pythonize(instance)` - Main function
904
+ - `python::wrap(instance)` - Alias
905
+ - `python::export(instance)` - Alias
906
+
907
+ All three do the same thing: wrap a CSSL class instance for Python use.
@@ -1,9 +1,9 @@
1
- includecpp/__init__.py,sha256=4q1HJiChcnPVi-VcBI9SljAvaXRHAWmLze8kViZTCik,1672
2
- includecpp/__init__.pyi,sha256=c4gZW7_XQXcp6FBcTi5W7zXTmCtbgQhlC4cyeVqtRRM,7253
1
+ includecpp/__init__.py,sha256=cheZCblYfeG2PZg9V8rAeFxzczvL3Ii7cjvuC6lE6Jw,1672
2
+ includecpp/__init__.pyi,sha256=uSDYlbqd2TinmrdepmE_zvN25jd3Co2cgyPzXgDpopM,7193
3
3
  includecpp/__main__.py,sha256=d6QK0PkvUe1ENofpmHRAg3bwNbZr8PiRscfI3-WRfVg,72
4
4
  includecpp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  includecpp/cli/__init__.py,sha256=Yda-4a5QJb_tKu35YQNfc5lu-LewTsM5abqNNkzS47M,113
6
- includecpp/cli/commands.py,sha256=a8yncdRZzHOM2LbI8Z54ZwSYimn-Grg6GqBqhFS0OdE,347101
6
+ includecpp/cli/commands.py,sha256=R1wZeka7AMUVd61TSTUZ2utjCdorFY3wO_Ahs749iyc,350475
7
7
  includecpp/cli/config_parser.py,sha256=KveeYUg2TA9sC5hKVzYYfgdNm2WfLG5y7_yxgBWn9yM,4886
8
8
  includecpp/core/__init__.py,sha256=L1bT6oikTjdto-6Px7DpjePtM07ymo3Bnov1saZzsGg,390
9
9
  includecpp/core/ai_integration.py,sha256=PW6yFDqdXjfchpfKTKg59AOLhLry9kqJEGf_65BztrY,87603
@@ -11,7 +11,7 @@ includecpp/core/build_manager.py,sha256=uLuYsuiC6OsOGaU5wAJfl4M3IbdnIDgogfMd8VsV
11
11
  includecpp/core/cpp_api.py,sha256=8y_B1L18rhSBZln654xPPzqO2PdvAlLpJrfEjzl7Wnc,14039
12
12
  includecpp/core/cpp_api.pyi,sha256=IEiaKqaPItnn6rjL7aK32D3o9FYmRYCgCZbqiQNUwdc,3496
13
13
  includecpp/core/cppy_converter.py,sha256=b7yqu-aoa0wShNY0GvQT67TnNhYya4GyYmG7oDdqDV4,156686
14
- includecpp/core/cssl_bridge.py,sha256=4HvxOn8yM5FGPeb5scfZS8wyRazf5kN7URbHU-iGd0A,41278
14
+ includecpp/core/cssl_bridge.py,sha256=Kgq08agrsSCZDXTv2sJZi-K8tkW-04Ezb8ev9-p7Rh0,42968
15
15
  includecpp/core/cssl_bridge.pyi,sha256=tQxb3lneufgVmXSAqDUwjoluUNo8Wa5QIOnaL8ai6q0,12055
16
16
  includecpp/core/error_catalog.py,sha256=VS3N-P0yEbiHimsDPtcaYfrUb7mXQ-7pqw18PtSngaU,33869
17
17
  includecpp/core/error_formatter.py,sha256=7-MzRIT8cM4uODxy0IZ9pu7pqR4Pq2I8Si0QQZHjmVc,39239
@@ -20,15 +20,15 @@ includecpp/core/path_discovery.py,sha256=jI0oSq6Hsd4LKXmU4dOiGSrXcEO_KWMXfQ5_ylB
20
20
  includecpp/core/project_ui.py,sha256=la2EQZKmUkJGuJxnbs09hH1ZhBh9bfndo6okzZsk2dQ,141134
21
21
  includecpp/core/settings_ui.py,sha256=B2SlwgdplF2KiBk5UYf2l8Jjifjd0F-FmBP0DPsVCEQ,11798
22
22
  includecpp/core/cssl/CSSL_DOCUMENTATION.md,sha256=47sUPO-FMq_8_CrJBZFoFBgSO3gSi5zoB1Xp7oeifho,40773
23
- includecpp/core/cssl/__init__.py,sha256=TYRlyheTw5OYkkmUxJYpAjyyQShu6NF4igYZYE76eR0,1811
24
- includecpp/core/cssl/cssl_builtins.py,sha256=MJtWF7PeWkasxxkpN2zaCjeIJoQw5BPy-jQNYberMQo,85010
25
- includecpp/core/cssl/cssl_builtins.pyi,sha256=Zc__PCO9FDaTPPG92zgK6_QoeMohbs0xlv6YGPubEdQ,31010
23
+ includecpp/core/cssl/__init__.py,sha256=scDXRBNK2L6A8qmlpNyaqQj6BFcSfPInBlucdeNfMF0,1975
24
+ includecpp/core/cssl/cssl_builtins.py,sha256=B_ggaV4zE1kejphXmo0-_XKFyxU4BWv_g0j_KzHpLJI,100225
25
+ includecpp/core/cssl/cssl_builtins.pyi,sha256=3ai2V4LyhzPBhAKjRRf0rLVu_bg9ECmTfTkdFKM64iA,127430
26
26
  includecpp/core/cssl/cssl_events.py,sha256=nupIcXW_Vjdud7zCU6hdwkQRQ0MujlPM7Tk2u7eDAiY,21013
27
27
  includecpp/core/cssl/cssl_modules.py,sha256=cUg0-zdymMnWWTsA_BUrW5dx4R04dHpKcUhm-Wfiwwo,103006
28
- includecpp/core/cssl/cssl_parser.py,sha256=pOWe6kle4EvXLai3DNHfLcYGeb568EQ8upxscVVR5m0,113161
29
- includecpp/core/cssl/cssl_runtime.py,sha256=3b14wEWvLpFDVA0r0pyNqy02l7s9FTdXQd61BdpPlZg,131780
30
- includecpp/core/cssl/cssl_syntax.py,sha256=vgI-dgj6gs9cOHwNRff6JbwZZYW_fYutnwCkznlgZiE,17006
31
- includecpp/core/cssl/cssl_types.py,sha256=XftmkvjxL-mKMz6HiTtnruG6P7haM21gFm7P9Caovug,48213
28
+ includecpp/core/cssl/cssl_parser.py,sha256=WxfqNhsryt5IR7KdDgbHrrYlXS-xBXTsr3YAiGBJZIc,117711
29
+ includecpp/core/cssl/cssl_runtime.py,sha256=LeBZJeiK_XjhJ1QoU1duLxgr6MNb8EenluCRBUtNIyE,155680
30
+ includecpp/core/cssl/cssl_syntax.py,sha256=bgo3NFehoPTQa5dqwNd_CstkVGVCNYAXbGYUcu5BEN0,16982
31
+ includecpp/core/cssl/cssl_types.py,sha256=gVjtfxk0Uzfj-H7_LD79oqspFMYDf79ZrRrlZk8eAEs,50647
32
32
  includecpp/generator/__init__.py,sha256=Rsy41bwimaEloD3gDRR_znPfIJzIsCFuWZgCTJBLJlc,62
33
33
  includecpp/generator/parser.cpp,sha256=hbhHdtFH65rzp6prnARN9pNFF_ssr0NseVVcxq0fJh4,76833
34
34
  includecpp/generator/parser.h,sha256=EDm0b-pEesIIIQQ2PvH5h2qwlqJU9BH8SiMV7MWbsTo,11073
@@ -37,13 +37,16 @@ includecpp/generator/type_resolver.h,sha256=ZsaxQqcCcKJJApYn7KOp2dLlQ1VFVG_oZDja
37
37
  includecpp/templates/cpp.proj.template,sha256=Iy-L8I4Cl3tIgBMx1Qp5h6gURvkqOAqyodVHuDJ0Luw,359
38
38
  includecpp/vscode/__init__.py,sha256=yLKw-_7MTX1Rx3jLk5JjharJQfFXbwtZVE7YqHpM7yg,39
39
39
  includecpp/vscode/cssl/__init__.py,sha256=rQJAx5X05v-mAwqX1Qb-rbZO219iR73MziFNRUCNUIo,31
40
+ includecpp/vscode/cssl/extension.js,sha256=FZaKfOpzo2jXtubVCZmnhDZd4eUVHltm5VW_fgNnSkE,4327
40
41
  includecpp/vscode/cssl/language-configuration.json,sha256=61Q00cKI9may5L8YpxMmvfo6PAc-abdJqApfR85DWuw,904
41
- includecpp/vscode/cssl/package.json,sha256=MWWIRLUnGvadWzEyfWdykUZHTsrG18sqpn5US5sXqac,1435
42
- includecpp/vscode/cssl/snippets/cssl.snippets.json,sha256=l4SCEPR3CsPxA8HIVLKYY__I979TfKzYWtH1KYIsboo,33062
43
- includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json,sha256=WTHh_tpqHssRlhmbxfxSvDsgwvW28cYJ1r45lnOvE7U,19974
44
- includecpp-3.7.9.dist-info/licenses/LICENSE,sha256=fWCsGGsiWZir0UzDd20Hh-3wtRyk1zqUntvtVuAWhvc,1093
45
- includecpp-3.7.9.dist-info/METADATA,sha256=8qpKrrmhyP6P_SE6fuZlVCoNmJFPhPVsYYxtJkmr_sU,32122
46
- includecpp-3.7.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
- includecpp-3.7.9.dist-info/entry_points.txt,sha256=6A5Mif9gi0139Bf03W5plAb3wnAgbNaEVe1HJoGE-2o,59
48
- includecpp-3.7.9.dist-info/top_level.txt,sha256=RFUaR1KG-M6mCYwP6w4ydP5Cgc8yNbP78jxGAvyjMa8,11
49
- includecpp-3.7.9.dist-info/RECORD,,
42
+ includecpp/vscode/cssl/package.json,sha256=kTV4gTigAQ93FIoidjlZW3znKT2_KOXDo2e8evNFTNs,4853
43
+ includecpp/vscode/cssl/images/cssl.png,sha256=BxAGsnfS0ZzzCvqV6Zb1OAJAZpDUoXlR86MsvUGlSZw,510
44
+ includecpp/vscode/cssl/images/cssl_pl.png,sha256=z4WMk7g6YCTbUUbSFk343BO6yi_OmNEVYkRenWGydwM,799
45
+ includecpp/vscode/cssl/snippets/cssl.snippets.json,sha256=uV3nHJyQ5f7Pr3FzfbQT2VZOEY3AlGs4wrmqe884jm4,37372
46
+ includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json,sha256=ArCRc_G54kiKGh6WEd4CbmR-SX1X9BOcp3Y0hwZcw44,21543
47
+ includecpp-3.8.0.dist-info/licenses/LICENSE,sha256=fWCsGGsiWZir0UzDd20Hh-3wtRyk1zqUntvtVuAWhvc,1093
48
+ includecpp-3.8.0.dist-info/METADATA,sha256=gnvN0QtGJ_QWGfkyXFKR1kwE4z-8sRz10k3Z3lIMBvs,22510
49
+ includecpp-3.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
50
+ includecpp-3.8.0.dist-info/entry_points.txt,sha256=6A5Mif9gi0139Bf03W5plAb3wnAgbNaEVe1HJoGE-2o,59
51
+ includecpp-3.8.0.dist-info/top_level.txt,sha256=RFUaR1KG-M6mCYwP6w4ydP5Cgc8yNbP78jxGAvyjMa8,11
52
+ includecpp-3.8.0.dist-info/RECORD,,