This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// in ExecuteManager::Execute: | |
// | |
IAlgorithm& v_alg = ... | |
ParamsIn v_in = ... | |
Context v_ctx = ... | |
// static data init | |
v_alg.Startup(v_ctx, v_in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from frames import script | |
@script | |
def A(a=3, b=5): | |
''' A returns bollox. ''' | |
print 'Hello, framework.' | |
try: | |
args = {'a': 5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\n*:b*///.@$ -> None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\#ifndef {[A-Z_]@_H}:b*\n\#define \1:b*\n{(.*\n)*}\#endif(.*\1)*\n -> #pragma once\n\2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IFactory | |
{ | |
public: | |
virtual ~IFactory() {} | |
/// Creates data object of the specified type | |
template <class DataType> | |
DataType* CreateData() | |
{ | |
return NULL; |
NewerOlder