Skip to content

Commit c5b3cce

Browse files
committed
Move inline outline
1 parent cbe6d0f commit c5b3cce

File tree

3 files changed

+87
-86
lines changed

3 files changed

+87
-86
lines changed

src/Core/Matlab/matfiledata.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ std::string matfiledata::getstring()
264264

265265
}
266266

267-
void matfiledata::putstring(std::string str)
267+
void matfiledata::putstring(const std::string& str)
268268
{
269269
int dsize;
270270
char *ptr;
@@ -311,7 +311,7 @@ std::vector<std::string> matfiledata::getstringarray(int maxstrlen)
311311
return(vec);
312312
}
313313

314-
int matfiledata::putstringarray(std::vector<std::string> vec)
314+
int matfiledata::putstringarray(const std::vector<std::string>& vec)
315315
{
316316
char *ptr;
317317
int maxstrlen = 8;

src/Core/Matlab/matlabconverter.cc

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@
3434

3535
#include <Core/Matlab/matlabconverter.h>
3636

37+
using namespace SCIRun;
3738
using namespace SCIRun::MatlabIO;
3839

3940

4041
// Currently the property converter only manages strings
41-
// all other data is ignored both on matlab side as well
42+
// all other data is ignored both on Matlab side as well
4243
// as on the property manager side.
4344

4445
/* DESIGN NOTES : */
@@ -120,7 +121,7 @@ unsigned int matlabconverter::convertmitype(matlabarray::mitype type)
120121

121122

122123
// This function converts nrrds into Matlab matrices
123-
// only the datais being transformed into a Matlab array
124+
// only the data is being transformed into a Matlab array
124125

125126
matlabarray::mitype matlabconverter::convertnrrdtype(int type)
126127
{
@@ -1922,4 +1923,71 @@ void matlabconverter::sciBundleTOmlArray(BundleHandle &scibundle, matlabarray &m
19221923
}
19231924
}
19241925

1926+
void matlabconverter::error(const std::string& error)
1927+
{
1928+
if(pr_) pr_->error(error);
1929+
}
1930+
1931+
void matlabconverter::warning(const std::string& warning)
1932+
{
1933+
if(pr_) pr_->warning(warning);
1934+
}
1935+
1936+
void matlabconverter::remark(const std::string& remark)
1937+
{
1938+
if(pr_) pr_->remark(remark);
1939+
}
1940+
1941+
void matlabconverter::setdatatype(matlabarray::mitype dataformat)
1942+
{
1943+
datatype_ = dataformat;
1944+
}
1945+
1946+
void matlabconverter::setindexbase(int indexbase)
1947+
{
1948+
indexbase_ = indexbase;
1949+
}
1950+
1951+
void matlabconverter::converttonumericmatrix()
1952+
{
1953+
numericarray_ = true;
1954+
}
1955+
1956+
void matlabconverter::converttostructmatrix()
1957+
{
1958+
numericarray_ = false;
19251959
}
1960+
1961+
void matlabconverter::setdisabletranspose(bool disabletranspose)
1962+
{
1963+
disable_transpose_ = disabletranspose;
1964+
}
1965+
1966+
1967+
void matlabconverter::preferfields()
1968+
{
1969+
prefer_fields = true;
1970+
prefer_nrrds = false;
1971+
}
1972+
1973+
void matlabconverter::prefernrrds()
1974+
{
1975+
prefer_nrrds = true;
1976+
prefer_fields = false;
1977+
}
1978+
1979+
void matlabconverter::prefermatrices()
1980+
{
1981+
prefer_nrrds = false;
1982+
prefer_fields = false;
1983+
}
1984+
1985+
void matlabconverter::preferbundles()
1986+
{
1987+
prefer_bundles = true;
1988+
}
1989+
1990+
void matlabconverter::prefersciobjects()
1991+
{
1992+
prefer_bundles = false;
1993+
}

src/Core/Matlab/matlabconverter.h

Lines changed: 15 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
*/
5353

5454
#include <Core/Matlab/matfilebase.h>
55+
#include <Core/Matlab/matlabarray.h>
5556
#include <Core/Logging/LoggerFwd.h>
5657
#include <Core/Datatypes/DatatypeFwd.h>
5758
#include <Core/Matlab/share.h>
@@ -130,28 +131,28 @@ class SCISHARE matlabconverter : public matfilebase
130131
// These key value pairs are not supported yet, like in the rest of SCIRun
131132

132133
matlabconverter();
133-
matlabconverter(SCIRun::Core::Logging::LoggerHandle pr);
134+
explicit matlabconverter(SCIRun::Core::Logging::LoggerHandle pr);
134135

135136
// SET CONVERTER OPTIONS:
136137
// Data type sets the export type of the data
137-
inline void setdatatype(matlabarray::mitype dataformat);
138+
void setdatatype(matlabarray::mitype dataformat);
138139
// Index base sets the index base used for indices in for example geometries
139-
inline void setindexbase(int indexbase);
140+
void setindexbase(int indexbase);
140141
// In a numeric matrix all data will be stripped and the data will be saved as
141142
// a plain dense or sparse matrix.
142-
inline void setdisabletranspose(bool dt);
143+
void setdisabletranspose(bool dt);
143144

144-
inline void converttonumericmatrix();
145-
inline void converttostructmatrix();
145+
void converttonumericmatrix();
146+
void converttostructmatrix();
146147

147148
// The following options are for controlling the conversion to bundles
148149
// In case prefernrrds is set, numerical data is converted into nrrds
149150
// only sparse matrices become matrices. If prefermatrices is set, the
150151
// behavior is opposite and only ND (N>2) matrices become nrrds.
151152

152-
inline void prefernrrds();
153-
inline void preferfields();
154-
inline void prefermatrices();
153+
void prefernrrds();
154+
void preferfields();
155+
void prefermatrices();
155156

156157
// Since Bundles can be bundled, a choice needs to be made whether structured
157158
// Matlab matrices should become bundles or if possible should be converted into
@@ -162,8 +163,8 @@ class SCISHARE matlabconverter : public matfilebase
162163
// resort it will be a bundle. Note that the comparison is done to see whether the
163164
// required number of fields is there if so other fields are ignored.
164165

165-
inline void preferbundles();
166-
inline void prefersciobjects();
166+
void preferbundles();
167+
void prefersciobjects();
167168
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
168169
// SCIRun STRINGS
169170
int sciStringCompatible(const matlabarray& mlarray, std::string& infostring, bool postremarks = true);
@@ -205,9 +206,9 @@ class SCISHARE matlabconverter : public matfilebase
205206

206207
SCIRun::Core::Logging::LoggerHandle pr_;
207208

208-
inline void error(const std::string& error);
209-
inline void warning(const std::string& warning);
210-
inline void remark(const std::string& remark);
209+
void error(const std::string& error);
210+
void warning(const std::string& warning);
211+
void remark(const std::string& remark);
211212

212213
// FUNCTION FOR TRANSLATING THE CONTENTS OF A MATRIX (THE NUMERIC PART OF THE DATA)
213214
void sciMatrixTOmlMatrix(SCIRun::Core::Datatypes::MatrixHandle &scimat,matlabarray &mlmat);
@@ -239,74 +240,6 @@ class SCISHARE matlabconverter : public matfilebase
239240

240241
};
241242

242-
inline void matlabconverter::error(const std::string& error)
243-
{
244-
if(pr_) pr_->error(error);
245-
}
246-
247-
inline void matlabconverter::warning(const std::string& warning)
248-
{
249-
if(pr_) pr_->warning(warning);
250-
}
251-
252-
inline void matlabconverter::remark(const std::string& remark)
253-
{
254-
if(pr_) pr_->remark(remark);
255-
}
256-
257-
inline void matlabconverter::setdatatype(matlabarray::mitype dataformat)
258-
{
259-
datatype_ = dataformat;
260-
}
261-
262-
inline void matlabconverter::setindexbase(int indexbase)
263-
{
264-
indexbase_ = indexbase;
265-
}
266-
267-
inline void matlabconverter::converttonumericmatrix()
268-
{
269-
numericarray_ = true;
270-
}
271-
272-
inline void matlabconverter::converttostructmatrix()
273-
{
274-
numericarray_ = false;
275-
}
276-
277-
inline void matlabconverter::setdisabletranspose(bool disabletranspose)
278-
{
279-
disable_transpose_ = disabletranspose;
280-
}
281-
282-
283-
inline void matlabconverter::preferfields()
284-
{
285-
prefer_fields = true;
286-
prefer_nrrds = false;
287-
}
288-
289-
inline void matlabconverter::prefernrrds()
290-
{
291-
prefer_nrrds = true;
292-
prefer_fields = false;
293-
}
294-
295-
inline void matlabconverter::prefermatrices()
296-
{
297-
prefer_nrrds = false;
298-
prefer_fields = false;
299-
}
300-
301-
inline void matlabconverter::preferbundles()
302-
{
303-
prefer_bundles = true;
304-
}
305-
306-
inline void matlabconverter::prefersciobjects()
307-
{
308-
prefer_bundles = false;
309-
}
310243

311244
}} // end namespace
312245

0 commit comments

Comments
 (0)