Skip to content

Commit 9652a09

Browse files
committed
Merge pull request #58 from mpsonntag/removeLists
Remove lists
2 parents 0549027 + efa84d4 commit 9652a09

28 files changed

+4
-327
lines changed

+nix/Block.m

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
% DataArray methods
2626
% -----------------
2727

28-
function das = list_data_arrays(obj)
29-
das = nix_mx('Block::listDataArrays', obj.nix_handle);
30-
end;
31-
3228
function retObj = data_array(obj, id_or_name)
3329
handle = nix_mx('Block::openDataArray', obj.nix_handle, id_or_name);
3430
retObj = {};
@@ -56,10 +52,6 @@
5652
% Sources methods
5753
% -----------------
5854

59-
function sourcesList = list_sources(obj)
60-
sourcesList = nix_mx('Block::listSources', obj.nix_handle);
61-
end;
62-
6355
function retObj = open_source(obj, id_or_name)
6456
handle = nix_mx('Block::openSource', obj.nix_handle, id_or_name);
6557
retObj = {};
@@ -76,10 +68,6 @@
7668
hasTag = nix_mx('Block::hasTag', obj.nix_handle, id_or_name);
7769
end;
7870

79-
function tagList = list_tags(obj)
80-
tagList = nix_mx('Block::listTags', obj.nix_handle);
81-
end;
82-
8371
function retObj = open_tag(obj, id_or_name)
8472
handle = nix_mx('Block::openTag', obj.nix_handle, id_or_name);
8573
retObj = {};
@@ -103,10 +91,6 @@
10391
hasMTag = nix_mx('Block::hasMultiTag', obj.nix_handle, id_or_name);
10492
end;
10593

106-
function tagList = list_multi_tags(obj)
107-
tagList = nix_mx('Block::listMultiTags', obj.nix_handle);
108-
end;
109-
11094
function retObj = open_multi_tag(obj, id_or_name)
11195
handle = nix_mx('Block::openMultiTag', obj.nix_handle, id_or_name);
11296
retObj = {};

+nix/File.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
% Block methods
3333
% ----------------
3434

35-
function block_list = listBlocks(obj)
36-
block_list = nix_mx('File::listBlocks', obj.nix_handle);
37-
end
38-
3935
function retObj = openBlock(obj, id_or_name)
4036
handle = nix_mx('File::openBlock', obj.nix_handle, id_or_name);
4137
retObj = {};
@@ -68,10 +64,6 @@
6864
% Section methods
6965
% ----------------
7066

71-
function section_list = listSections(obj)
72-
section_list = nix_mx('File::listSections', obj.nix_handle);
73-
end
74-
7567
function retObj = openSection(obj, id_or_name)
7668
handle = nix_mx('File::openSection', obj.nix_handle, id_or_name);
7769
retObj = {};

+nix/MultiTag.m

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@
7575
% References methods
7676
% ------------------
7777

78-
function refList = list_references(obj)
79-
refList = nix_mx('MultiTag::listReferences', obj.nix_handle);
80-
end;
81-
8278
function retObj = open_reference(obj, id_or_name)
8379
handle = nix_mx('MultiTag::openReferences', obj.nix_handle, id_or_name);
8480
retObj = {};
@@ -108,10 +104,6 @@
108104
% Features methods
109105
% ------------------
110106

111-
function featureList = list_features(obj)
112-
featureList = nix_mx('MultiTag::listFeatures', obj.nix_handle);
113-
end;
114-
115107
function retObj = open_feature(obj, id_or_name)
116108
handle = nix_mx('MultiTag::openFeature', obj.nix_handle, id_or_name);
117109
retObj = {};
@@ -141,10 +133,6 @@
141133
% Sources methods
142134
% ------------------
143135

144-
function sourceList = list_sources(obj)
145-
sourceList = nix_mx('MultiTag::listSources', obj.nix_handle);
146-
end;
147-
148136
function retObj = open_source(obj, id_or_name)
149137
handle = nix_mx('MultiTag::openSource', obj.nix_handle, id_or_name);
150138
retObj = {};

+nix/Section.m

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@
7373
% Section methods
7474
% ----------------
7575

76-
function lst = list_sections(obj)
77-
lst = nix_mx('Section::listSections', obj.nix_handle);
78-
end;
79-
8076
function sections = get.sections(obj)
8177
[obj.sectionsCache, sections] = nix.Utils.fetchObjList(obj.updatedAt, ...
8278
'Section::sections', obj.nix_handle, obj.sectionsCache, @nix.Section);
@@ -100,7 +96,7 @@
10096

10197
function props = get.properties_cell(obj)
10298
[obj.propsCache, props] = nix.Utils.fetchPropList(obj.updatedAt, ...
103-
'Section::listProperties', obj.nix_handle, obj.propsCache);
99+
'Section::properties', obj.nix_handle, obj.propsCache);
104100
end
105101

106102
function p_map = get.properties_map(obj)

+nix/Source.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@
5252
% Sources methods
5353
% ------------------
5454

55-
function sourcesList = list_sources(obj)
56-
sourcesList = nix_mx('Source::listSources', obj.nix_handle);
57-
end;
58-
5955
function retObj = open_source(obj, id_or_name)
6056
handle = nix_mx('Source::openSource', obj.nix_handle, id_or_name);
6157
retObj = {};

+nix/Tag.m

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@
8585
% References methods
8686
% ------------------
8787

88-
function refList = list_references(obj)
89-
refList = nix_mx('Tag::listReferences', obj.nix_handle);
90-
end;
91-
9288
function retObj = open_reference(obj, id_or_name)
9389
handle = nix_mx('Tag::openReferenceDataArray', obj.nix_handle, id_or_name);
9490
retObj = {};
@@ -116,10 +112,6 @@
116112
% Features methods
117113
% ------------------
118114

119-
function featureList = list_features(obj)
120-
featureList = nix_mx('Tag::listFeatures', obj.nix_handle);
121-
end;
122-
123115
function retObj = open_feature(obj, id_or_name)
124116
handle = nix_mx('Tag::openFeature', obj.nix_handle, id_or_name);
125117
retObj = {};
@@ -147,10 +139,6 @@
147139
% Sources methods
148140
% ------------------
149141

150-
function sourceList = list_sources(obj)
151-
sourceList = nix_mx('Tag::listSources', obj.nix_handle);
152-
end;
153-
154142
function retObj = open_source(obj, id_or_name)
155143
handle = nix_mx('Tag::openSource', obj.nix_handle, id_or_name);
156144
retObj = {};

nix_mx.cc

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,50 +54,36 @@ struct fendpoint {
5454

5555
const std::vector<fendpoint> funcs = {
5656
// File
57-
{ "File::listBlocks", nixfile::list_blocks },
58-
{ "File::listSections", nixfile::list_sections },
5957
{ "File::createBlock", nixfile::create_block },
6058
{ "File::createSection", nixfile::create_section },
6159

6260
// Block
6361
{ "Block::describe", nixblock::describe },
64-
{ "Block::listDataArrays", nixblock::list_data_arrays },
65-
{ "Block::listSources", nixblock::list_sources },
66-
{ "Block::listTags", nixblock::list_tags },
67-
{ "Block::listMultiTags", nixblock::list_multi_tags },
6862

6963
// Data Array
7064
{ "DataArray::describe", nixdataarray::describe },
7165
{ "DataArray::readAll", nixdataarray::read_all },
7266

7367
// Tag
7468
{ "Tag::describe", nixtag::describe },
75-
{ "Tag::listReferences", nixtag::list_references_array },
76-
{ "Tag::listFeatures", nixtag::list_features },
77-
{ "Tag::listSources", nixtag::list_sources },
7869
{ "Tag::retrieveData", nixtag::retrieve_data },
7970
{ "Tag::featureRetrieveData", nixtag::retrieve_feature_data },
8071

8172
// Multi Tag
8273
{ "MultiTag::describe", nixmultitag::describe },
83-
{ "MultiTag::listReferences", nixmultitag::list_references_array },
84-
{ "MultiTag::listFeatures", nixmultitag::list_features },
85-
{ "MultiTag::listSources", nixmultitag::list_sources },
8674
{ "MultiTag::retrieveData", nixmultitag::retrieve_data },
8775
{ "MultiTag::featureRetrieveData", nixmultitag::retrieve_feature_data },
8876

8977
// Source
9078
{ "Source::describe", nixsource::describe },
91-
{ "Source::listSources", nixsource::list_sources },
9279

9380
// Feature
9481
{ "Feature::describe", nixfeature::describe },
9582
{ "Feature::linkType", nixfeature::link_type },
9683

9784
// Section
9885
{ "Section::describe", nixsection::describe },
99-
{ "Section::listSections", nixsection::list_sections },
100-
{ "Section::listProperties", nixsection::list_properties }
86+
{ "Section::properties", nixsection::properties }
10187
};
10288

10389
//glue "globals"

src/nixblock.cc

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "nixblock.h"
2-
#include "nixgen.h"
32

43
#include "mex.h"
54

@@ -38,56 +37,4 @@ namespace nixblock {
3837
output.set(0, dt);
3938
}
4039

41-
void list_data_arrays(const extractor &input, infusor &output)
42-
{
43-
nix::Block block = input.entity<nix::Block>(1);
44-
output.set(0, nixgen::list_data_arrays(block.dataArrays()));
45-
}
46-
47-
void list_sources(const extractor &input, infusor &output)
48-
{
49-
nix::Block currSource = input.entity<nix::Block>(1);
50-
output.set(0, nixgen::list_sources(currSource.sources()));
51-
}
52-
53-
void list_tags(const extractor &input, infusor &output)
54-
{
55-
nix::Block block = input.entity<nix::Block>(1);
56-
std::vector<nix::Tag> arr = block.tags();
57-
58-
struct_builder sb({ arr.size() }, { "id", "type", "name", "definition", "position", "extent", "units" });
59-
60-
for (const auto &da : arr) {
61-
sb.set(da.id());
62-
sb.set(da.type());
63-
sb.set(da.name());
64-
sb.set(da.definition());
65-
sb.set(da.position());
66-
sb.set(da.extent());
67-
sb.set(da.units());
68-
69-
sb.next();
70-
}
71-
output.set(0, sb.array());
72-
}
73-
74-
void list_multi_tags(const extractor &input, infusor &output)
75-
{
76-
nix::Block block = input.entity<nix::Block>(1);
77-
std::vector<nix::MultiTag> arr = block.multiTags();
78-
79-
struct_builder sb({ arr.size() }, { "id", "type", "name", "definition", "units" });
80-
81-
for (const auto &da : arr) {
82-
sb.set(da.id());
83-
sb.set(da.type());
84-
sb.set(da.name());
85-
sb.set(da.definition());
86-
sb.set(da.units());
87-
88-
sb.next();
89-
}
90-
output.set(0, sb.array());
91-
}
92-
9340
} // namespace nixblock

src/nixblock.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ namespace nixblock {
99

1010
void create_data_array(const extractor &input, infusor &output);
1111

12-
void list_data_arrays(const extractor &input, infusor &output);
13-
14-
void list_sources(const extractor &input, infusor &output);
15-
16-
void list_tags(const extractor &input, infusor &output);
17-
18-
void list_multi_tags(const extractor &input, infusor &output);
19-
2012
} // namespace nixblock
2113

2214
#endif

src/nixfeature.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "nixfeature.h"
2-
#include "nixgen.h"
32

43
#include "mex.h"
54

0 commit comments

Comments
 (0)