Skip to content

Commit 91cfdba

Browse files
committed
[Matlab] Refactor File function names
- Refactors all File function names to CamelCase. - Refactors all affected tests.
1 parent 6ea3965 commit 91cfdba

File tree

12 files changed

+527
-527
lines changed

12 files changed

+527
-527
lines changed

+nix/File.m

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
end
2929

3030
% braindead...
31-
function r = is_open(obj)
31+
function r = isOpen(obj)
3232
fname = strcat(obj.alias, '::isOpen');
3333
r = nix_mx(fname, obj.nix_handle);
3434
end
3535

36-
function r = file_mode(obj)
36+
function r = fileMode(obj)
3737
fname = strcat(obj.alias, '::fileMode');
3838
r = nix_mx(fname, obj.nix_handle);
3939
end
@@ -47,79 +47,79 @@
4747
% Block methods
4848
% ----------------
4949

50-
function r = create_block(obj, name, type)
50+
function r = createBlock(obj, name, type)
5151
fname = strcat(obj.alias, '::createBlock');
5252
h = nix_mx(fname, obj.nix_handle, name, type);
5353
r = nix.Utils.createEntity(h, @nix.Block);
5454
end
5555

56-
function r = block_count(obj)
56+
function r = blockCount(obj)
5757
r = nix.Utils.fetchEntityCount(obj, 'blockCount');
5858
end
5959

60-
function r = has_block(obj, id_or_name)
60+
function r = hasBlock(obj, id_or_name)
6161
r = nix.Utils.fetchHasEntity(obj, 'hasBlock', id_or_name);
6262
end
6363

64-
function r = open_block(obj, id_or_name)
64+
function r = openBlock(obj, id_or_name)
6565
r = nix.Utils.open_entity(obj, 'openBlock', id_or_name, @nix.Block);
6666
end
6767

68-
function r = open_block_idx(obj, index)
68+
function r = openBlockIdx(obj, index)
6969
idx = nix.Utils.handle_index(index);
7070
r = nix.Utils.open_entity(obj, 'openBlockIdx', idx, @nix.Block);
7171
end
7272

73-
function r = delete_block(obj, del)
73+
function r = deleteBlock(obj, del)
7474
r = nix.Utils.delete_entity(obj, 'deleteBlock', del, 'nix.Block');
7575
end
7676

77-
function r = filter_blocks(obj, filter, val)
77+
function r = filterBlocks(obj, filter, val)
7878
r = nix.Utils.filter(obj, 'blocksFiltered', filter, val, @nix.Block);
7979
end
8080

8181
% ----------------
8282
% Section methods
8383
% ----------------
8484

85-
function r = create_section(obj, name, type)
85+
function r = createSection(obj, name, type)
8686
fname = strcat(obj.alias, '::createSection');
8787
h = nix_mx(fname, obj.nix_handle, name, type);
8888
r = nix.Utils.createEntity(h, @nix.Section);
8989
end
9090

91-
function r = section_count(obj)
91+
function r = sectionCount(obj)
9292
r = nix.Utils.fetchEntityCount(obj, 'sectionCount');
9393
end
9494

95-
function r = has_section(obj, id_or_name)
95+
function r = hasSection(obj, id_or_name)
9696
r = nix.Utils.fetchHasEntity(obj, 'hasSection', id_or_name);
9797
end
9898

99-
function r = open_section(obj, id_or_name)
99+
function r = openSection(obj, id_or_name)
100100
r = nix.Utils.open_entity(obj, 'openSection', id_or_name, @nix.Section);
101101
end
102102

103-
function r = open_section_idx(obj, index)
103+
function r = openSectionIdx(obj, index)
104104
idx = nix.Utils.handle_index(index);
105105
r = nix.Utils.open_entity(obj, 'openSectionIdx', idx, @nix.Section);
106106
end
107107

108-
function r = delete_section(obj, del)
108+
function r = deleteSection(obj, del)
109109
r = nix.Utils.delete_entity(obj, 'deleteSection', del, 'nix.Section');
110110
end
111111

112-
function r = filter_sections(obj, filter, val)
112+
function r = filterSections(obj, filter, val)
113113
r = nix.Utils.filter(obj, 'sectionsFiltered', filter, val, @nix.Section);
114114
end
115115

116116
% maxdepth is an index
117-
function r = find_sections(obj, max_depth)
118-
r = obj.find_filtered_sections(max_depth, nix.Filter.accept_all, '');
117+
function r = findSections(obj, max_depth)
118+
r = obj.filterFindSections(max_depth, nix.Filter.accept_all, '');
119119
end
120120

121121
% maxdepth is an index
122-
function r = find_filtered_sections(obj, max_depth, filter, val)
122+
function r = filterFindSections(obj, max_depth, filter, val)
123123
r = nix.Utils.find(obj, 'findSections', max_depth, filter, val, @nix.Section);
124124
end
125125
end

0 commit comments

Comments
 (0)