Skip to content

Commit 3c783cd

Browse files
committed
Const correctness, integer defs
1 parent 57e9679 commit 3c783cd

File tree

12 files changed

+374
-453
lines changed

12 files changed

+374
-453
lines changed

src/Core/Datatypes/Legacy/Field/FieldInformation.cc

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

src/Core/Datatypes/Legacy/Field/FieldInformation.h

Lines changed: 104 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -45,92 +45,92 @@ class SCISHARE FieldTypeInformation
4545

4646
public:
4747

48-
bool is_isomorphic();
49-
bool is_nonlinear();
50-
bool is_linear();
48+
bool is_isomorphic() const;
49+
bool is_nonlinear() const;
50+
bool is_linear() const;
5151

52-
bool is_nodata();
53-
bool is_constantdata();
54-
bool is_lineardata();
55-
bool is_nonlineardata();
56-
bool is_quadraticdata();
57-
bool is_cubicdata();
58-
int field_basis_order();
52+
bool is_nodata() const;
53+
bool is_constantdata() const;
54+
bool is_lineardata() const;
55+
bool is_nonlineardata() const;
56+
bool is_quadraticdata() const;
57+
bool is_cubicdata() const;
58+
int field_basis_order() const;
5959

60-
bool is_constantmesh();
61-
bool is_linearmesh();
62-
bool is_nonlinearmesh();
63-
bool is_quadraticmesh();
64-
bool is_cubicmesh();
65-
int mesh_basis_order();
60+
bool is_constantmesh() const;
61+
bool is_linearmesh() const;
62+
bool is_nonlinearmesh() const;
63+
bool is_quadraticmesh() const;
64+
bool is_cubicmesh() const;
65+
int mesh_basis_order() const;
6666

67-
bool is_tensor();
68-
bool is_vector();
69-
bool is_scalar();
70-
bool is_integer();
71-
bool is_double();
72-
bool is_float();
73-
bool is_longlong();
74-
bool is_long();
75-
bool is_int();
76-
bool is_short();
77-
bool is_char();
78-
bool is_unsigned_longlong();
79-
bool is_unsigned_long();
80-
bool is_unsigned_int();
81-
bool is_unsigned_short();
82-
bool is_unsigned_char();
83-
bool is_dvt(); // double vector tensor
84-
bool is_svt(); // scalar vector tensor
67+
bool is_tensor() const;
68+
bool is_vector() const;
69+
bool is_scalar() const;
70+
bool is_integer() const;
71+
bool is_double() const;
72+
bool is_float() const;
73+
bool is_longlong() const;
74+
bool is_long() const;
75+
bool is_int() const;
76+
bool is_short() const;
77+
bool is_char() const;
78+
bool is_unsigned_longlong() const;
79+
bool is_unsigned_long() const;
80+
bool is_unsigned_int() const;
81+
bool is_unsigned_short() const;
82+
bool is_unsigned_char() const;
83+
bool is_dvt() const; // double vector tensor
84+
bool is_svt() const; // scalar vector tensor
8585

86-
bool is_regularmesh();
87-
bool is_irregularmesh();
88-
bool is_structuredmesh();
89-
bool is_unstructuredmesh();
86+
bool is_regularmesh() const;
87+
bool is_irregularmesh() const;
88+
bool is_structuredmesh() const;
89+
bool is_unstructuredmesh() const;
9090

9191
// These should go...
92-
inline bool is_pointcloud() { return(is_pointcloudmesh()); }
93-
inline bool is_scanline() { return(is_scanlinemesh()); }
94-
inline bool is_image() { return(is_imagemesh()); }
95-
inline bool is_latvol() { return(is_latvolmesh()); }
96-
inline bool is_curve() { return(is_curvemesh()); }
97-
inline bool is_trisurf() { return(is_trisurfmesh()); }
98-
inline bool is_quadsurf() { return(is_quadsurfmesh()); }
99-
inline bool is_tetvol() { return(is_tetvolmesh()); }
100-
inline bool is_prismvol() { return(is_prismvolmesh()); }
101-
inline bool is_hexvol() { return(is_hexvolmesh()); }
102-
inline bool is_structcurve() { return(is_structcurvemesh()); }
103-
inline bool is_structquadsurf() { return(is_structquadsurfmesh()); }
104-
inline bool is_structhexvol() { return(is_structhexvolmesh()); }
92+
inline bool is_pointcloud() const { return(is_pointcloudmesh()); }
93+
inline bool is_scanline() const { return(is_scanlinemesh()); }
94+
inline bool is_image() const { return(is_imagemesh()); }
95+
inline bool is_latvol() const { return(is_latvolmesh()); }
96+
inline bool is_curve() const { return(is_curvemesh()); }
97+
inline bool is_trisurf() const { return(is_trisurfmesh()); }
98+
inline bool is_quadsurf() const { return(is_quadsurfmesh()); }
99+
inline bool is_tetvol() const { return(is_tetvolmesh()); }
100+
inline bool is_prismvol() const { return(is_prismvolmesh()); }
101+
inline bool is_hexvol() const { return(is_hexvolmesh()); }
102+
inline bool is_structcurve() const { return(is_structcurvemesh()); }
103+
inline bool is_structquadsurf() const { return(is_structquadsurfmesh()); }
104+
inline bool is_structhexvol() const { return(is_structhexvolmesh()); }
105105

106106
// Naming that is more systematic
107-
bool is_pointcloudmesh();
108-
bool is_scanlinemesh();
109-
bool is_imagemesh();
110-
bool is_latvolmesh();
111-
bool is_curvemesh();
112-
bool is_trisurfmesh();
113-
bool is_quadsurfmesh();
114-
bool is_tetvolmesh();
115-
bool is_prismvolmesh();
116-
bool is_hexvolmesh();
117-
bool is_structcurvemesh();
118-
bool is_structquadsurfmesh();
119-
bool is_structhexvolmesh();
107+
bool is_pointcloudmesh() const;
108+
bool is_scanlinemesh() const;
109+
bool is_imagemesh() const;
110+
bool is_latvolmesh() const;
111+
bool is_curvemesh() const;
112+
bool is_trisurfmesh() const;
113+
bool is_quadsurfmesh() const;
114+
bool is_tetvolmesh() const;
115+
bool is_prismvolmesh() const;
116+
bool is_hexvolmesh() const;
117+
bool is_structcurvemesh() const;
118+
bool is_structquadsurfmesh() const;
119+
bool is_structhexvolmesh() const;
120120

121121

122-
bool is_point();
123-
bool is_line();
124-
bool is_surface();
125-
bool is_volume();
122+
bool is_point() const;
123+
bool is_line() const;
124+
bool is_surface() const;
125+
bool is_volume() const;
126126

127-
bool is_pnt_element();
128-
bool is_crv_element();
129-
bool is_tri_element();
130-
bool is_quad_element();
131-
bool is_tet_element();
132-
bool is_prism_element();
133-
bool is_hex_element();
127+
bool is_pnt_element() const;
128+
bool is_crv_element() const;
129+
bool is_tri_element() const;
130+
bool is_quad_element() const;
131+
bool is_tet_element() const;
132+
bool is_prism_element() const;
133+
bool is_hex_element() const;
134134

135135
void insert_field_type_information(Field* field);
136136
protected:
@@ -163,44 +163,44 @@ class SCISHARE FieldInformation : public FieldTypeInformation {
163163
FieldInformation(mesh_info_type mesh,databasis_info_type databasis,
164164
data_info_type data);
165165

166-
FieldInformation(FieldHandle handle);
167-
FieldInformation(Field* field);
166+
explicit FieldInformation(FieldHandle handle);
167+
explicit FieldInformation(Field* field);
168168

169169

170-
std::string get_field_type();
170+
std::string get_field_type() const;
171171
void set_field_type(const std::string&);
172172

173-
std::string get_mesh_type();
174-
std::string get_mesh_type_id();
173+
std::string get_mesh_type() const;
174+
std::string get_mesh_type_id() const;
175175
void set_mesh_type(const std::string&);
176176
void set_mesh_type(mesh_info_type);
177177

178-
std::string get_mesh_basis_type();
178+
std::string get_mesh_basis_type() const;
179179
void set_mesh_basis_type(const std::string&);
180180
void set_mesh_basis_type(int);
181181

182-
std::string get_point_type();
182+
std::string get_point_type() const;
183183
void set_point_type(const std::string&);
184184

185-
std::string get_basis_type();
185+
std::string get_basis_type() const;
186186
void set_basis_type(const std::string&);
187187
void set_basis_type(int);
188188

189189
// alternative way of setting data_basis
190-
std::string get_data_basis_type() { return (get_basis_type()); }
190+
std::string get_data_basis_type() const { return (get_basis_type()); }
191191
void set_data_basis_type(const std::string& s) { set_basis_type(s); }
192192
void set_data_basis_type(int s) { set_basis_type(s); }
193193

194-
std::string get_data_type();
194+
std::string get_data_type() const;
195195
void set_data_type(const std::string&);
196196
void set_data_type(data_info_type);
197197

198-
std::string get_container_type();
198+
std::string get_container_type() const;
199199
void set_container_type(const std::string&);
200200

201-
std::string get_field_name();
202-
std::string get_field_type_id();
203-
std::string get_field_filename();
201+
std::string get_field_name() const;
202+
std::string get_field_type_id() const;
203+
std::string get_field_filename() const;
204204

205205
bool make_nodata();
206206
bool make_constantdata();
@@ -251,21 +251,21 @@ class SCISHARE FieldInformation : public FieldTypeInformation {
251251

252252
// testing for the data type
253253

254-
inline bool is_data_typeT(char* ) { return (is_char()); }
255-
inline bool is_data_typeT(unsigned char* ) { return (is_unsigned_char()); }
256-
inline bool is_data_typeT(short* ) { return (is_short()); }
257-
inline bool is_data_typeT(unsigned short* ) { return (is_unsigned_short()); }
258-
inline bool is_data_typeT(int* ) { return (is_int()); }
259-
inline bool is_data_typeT(unsigned int* ) { return (is_unsigned_int()); }
260-
inline bool is_data_typeT(long* ) { return (is_long()); }
261-
inline bool is_data_typeT(unsigned long* ) { return (is_unsigned_long()); }
262-
inline bool is_data_typeT(long long* ) { return (is_longlong()); }
263-
inline bool is_data_typeT(unsigned long long* ) { return (is_unsigned_longlong()); }
264-
inline bool is_data_typeT(double* ) { return (is_double()); }
265-
inline bool is_data_typeT(float* ) { return (is_float()); }
266-
inline bool is_data_typeT(Core::Geometry::Vector* ) { return (is_vector()); }
267-
inline bool is_data_typeT(Core::Geometry::Tensor* ) { return (is_tensor()); }
268-
template<class T> bool is_data_typeT(T*) { return (false); }
254+
inline bool is_data_typeT(char* ) const { return (is_char()); }
255+
inline bool is_data_typeT(unsigned char* ) const { return (is_unsigned_char()); }
256+
inline bool is_data_typeT(short* ) const { return (is_short()); }
257+
inline bool is_data_typeT(unsigned short* ) const { return (is_unsigned_short()); }
258+
inline bool is_data_typeT(int* ) const { return (is_int()); }
259+
inline bool is_data_typeT(unsigned int* ) const { return (is_unsigned_int()); }
260+
inline bool is_data_typeT(long* ) const { return (is_long()); }
261+
inline bool is_data_typeT(unsigned long* ) const { return (is_unsigned_long()); }
262+
inline bool is_data_typeT(long long* ) const { return (is_longlong()); }
263+
inline bool is_data_typeT(unsigned long long* ) const { return (is_unsigned_longlong()); }
264+
inline bool is_data_typeT(double* ) const { return (is_double()); }
265+
inline bool is_data_typeT(float* ) const { return (is_float()); }
266+
inline bool is_data_typeT(Core::Geometry::Vector* ) const { return (is_vector()); }
267+
inline bool is_data_typeT(Core::Geometry::Tensor* ) const { return (is_tensor()); }
268+
template<class T> bool is_data_typeT(T*) const { return (false); }
269269

270270
inline void set_data_typeT(char*) { make_char(); }
271271
inline void set_data_typeT(unsigned char*) { make_unsigned_char(); }

src/Core/Matlab/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ SET(Core_Matlab_HEADERS
4343
matfile.h
4444
matfilebase.h
4545
matfiledata.h
46-
matfiledefs.h
4746
matfiletemplate.h
4847
matlabarray.h
4948
matlabconverter.h

0 commit comments

Comments
 (0)