rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
NullCreator.m
1 classdef NullCreator < DataTree.CreatorDefault
2  % Simple DataTree.ICreator copying the original tree and applying a custom function to
3  % its leafs returning nothing.
4  %
5  % This creator is used by the INode.leaf_func() method.
6 
7  properties
8 
9  % function_handle to a custom function applied to all leaf elements
10  %
11  % The function synopsis is: 'funcptr(arg_node)'
12  funcptr;
13 
14  end
15 
16  methods
17  function sc = NullCreator(funcptr)
18  % function sc = NullCreator(funcptr)
19  % constructor of this creator
20  %
21  % Parameters:
22  % funcptr: function handle to a custom function applied to all leaf elements
23  sc.funcptr = funcptr;
24  end
25 
26  function create_leaf_node(this, arg_node, basepath, mu_cube, tslice)
27  % function create_leaf_node(this, arg_node, basepath, mu_cube, tslice)
28  % @copybrief DataTreeICreatorcreate_leaf_node()
29  %
30  % @copydetails DataTreeICreatorcreate_leaf_node()
31  this.funcptr(arg_node);
32  end
33  end
34 end
interface for a class used to create a new (sub-)tree from an old one with the DataTree.INode.creat...
Definition: ICreator.m:18
Definition: leaf.m:17
default implementation of the DataTree.ICreator interface
Simple DataTree.ICreator copying the original tree and applying a custom function to its leafs retur...
Definition: NullCreator.m:18