Replace:
.@{:i}, \/\*\*\< {:d+}x{:d+}.*$
With:
\t{ \2, \3 }, // \1
| class IFactory | |
| { | |
| public: | |
| virtual ~IFactory() {} | |
| /// Creates data object of the specified type | |
| template <class DataType> | |
| DataType* CreateData() | |
| { | |
| return NULL; |
| IProject& proj = ...; | |
| float R = ...; | |
| Eigen::Vector3d ref_point = ...; | |
| IHierarchy& h = proj.GetDefHierarchy(); | |
| IHierarchy& all_clouds_h = Query(".cloud", h).Flatten().Result(); // gets flat structure of all clouds | |
| auto all_clouds = all_clouds_h.GetRoot().GetElements(); | |
| IData& storage = proj.GetData(); | |
| // iterate through clouds |
| \#ifndef {[A-Z_]@_H}:b*\n\#define \1:b*\n{(.*\n)*}\#endif(.*\1)*\n -> #pragma once\n\2 |
| \n*:b*///.@$ -> None |
| from glob import glob | |
| from os import cwd | |
| from os.path import join, split, splitext | |
| from frames import execute | |
| MANIFEST = { # Declare the algorithm info. | |
| 'doc': 'Loads all clouds of given format from the CWD.', | |
| 'author': 'John Doe', | |
| 'version': '0.6', | |
| 'multithreaded': False |
| from glob import glob | |
| from os import cwd | |
| from os.path import join, split, splitext | |
| from frames import execute, script | |
| @script(author='John Doe', version='0.6', multithreaded=False) # Declare the algorithm's info. | |
| def load_clouds(cloud_extension='copsxml'): # Name and input params are given a a function with kwargs. | |
| ''' Loads all clouds of given format from the CWD. ''' # Documentation in a docstring. | |
| cloud_ids = [] |
| from frames import script | |
| @script | |
| def A(a=3, b=5): | |
| ''' A returns bollox. ''' | |
| print 'Hello, framework.' | |
| try: | |
| args = {'a': 5} |
| // | |
| // in ExecuteManager::Execute: | |
| // | |
| IAlgorithm& v_alg = ... | |
| ParamsIn v_in = ... | |
| Context v_ctx = ... | |
| // static data init | |
| v_alg.Startup(v_ctx, v_in); |
| struct UserDerivedType : | |
| public IUserType | |
| { | |
| // ... | |
| }; | |
| void CreateCustomGraph(IProject& proj) | |
| { | |
| // create a uniform graph; no customization at this point | |
| IUserGraphNode* first_node = proj.CreateUserGraph(); |
Replace:
.@{:i}, \/\*\*\< {:d+}x{:d+}.*$
With:
\t{ \2, \3 }, // \1