Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
alta
alta
Commits
e4260bb6
Commit
e4260bb6
authored
Jun 06, 2014
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating the interface of Softs to handle shared pointers on data.
parent
937d3f49
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
19 deletions
+19
-19
sources/softs/brdf2data/main.cpp
sources/softs/brdf2data/main.cpp
+5
-5
sources/softs/brdf2gnuplot/main.cpp
sources/softs/brdf2gnuplot/main.cpp
+3
-3
sources/softs/data2data/main.cpp
sources/softs/data2data/main.cpp
+4
-4
sources/softs/data2diff/main.cpp
sources/softs/data2diff/main.cpp
+2
-2
sources/softs/data2gnuplot/main.cpp
sources/softs/data2gnuplot/main.cpp
+1
-1
sources/softs/data2moments/main.cpp
sources/softs/data2moments/main.cpp
+3
-3
sources/softs/fourieranalysis/main.cpp
sources/softs/fourieranalysis/main.cpp
+1
-1
No files found.
sources/softs/brdf2data/main.cpp
View file @
e4260bb6
...
...
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
}
// Get the associated data object and load the file is any
data
*
d
=
NULL
;
ptr
<
data
>
d
=
NULL
;
d
=
plugins_manager
::
get_data
(
args
[
"data"
])
;
if
(
args
.
is_defined
(
"data-file"
))
{
...
...
@@ -67,14 +67,14 @@ int main(int argc, char** argv)
// Get the output object. In the case where it is not a VS file, we use
// the load object.
data
*
d_out
=
NULL
;
if
(
dynamic_cast
<
vertical_segment
*
>
(
d
)
==
NULL
)
ptr
<
data
>
d_out
=
NULL
;
if
(
!
dynamic_
pointer_
cast
<
vertical_segment
>
(
d
))
{
d_out
=
d
;
}
else
{
d_out
=
new
vertical_segment
();
d_out
=
ptr
<
data
>
(
new
vertical_segment
()
)
;
d_out
->
setDimX
(
d
->
dimX
());
d_out
->
setDimY
(
d
->
dimY
());
d_out
->
setParametrization
(
d
->
input_parametrization
());
...
...
@@ -89,7 +89,7 @@ int main(int argc, char** argv)
return
1
;
}
if
(
d
!=
NULL
&&
f
!=
NULL
)
if
(
d
&&
f
!=
NULL
)
{
vec
temp
(
f
->
dimX
());
for
(
int
i
=
0
;
i
<
d
->
size
();
++
i
)
...
...
sources/softs/brdf2gnuplot/main.cpp
View file @
e4260bb6
...
...
@@ -67,11 +67,11 @@ int main(int argc, char** argv)
// Load a data file
data
*
d
=
NULL
;
ptr
<
data
>
d
=
NULL
;
if
(
args
.
is_defined
(
"data"
)
||
args
.
is_defined
(
"in-data"
))
{
d
=
plugins_manager
::
get_data
(
args
[
"data"
]);
if
(
dynamic_cast
<
vertical_segment
*
>
(
d
)
!=
NULL
)
if
(
dynamic_
pointer_
cast
<
vertical_segment
>
(
d
))
{
d
->
load
(
args
[
"in-data"
]);
}
...
...
@@ -97,7 +97,7 @@ int main(int argc, char** argv)
linear_plot
=
true
;
}
if
(
d
!=
NULL
)
if
(
d
)
{
for
(
int
i
=
0
;
i
<
d
->
size
();
++
i
)
{
...
...
sources/softs/data2data/main.cpp
View file @
e4260bb6
...
...
@@ -99,20 +99,20 @@ int main(int argc, char** argv)
// Import data
data
*
d_in
=
NULL
;
ptr
<
data
>
d_in
=
NULL
;
d_in
=
plugins_manager
::
get_data
(
args
[
"in-data"
])
;
d_in
->
load
(
args
[
"input"
],
args
);
data
*
d_out
=
NULL
;
ptr
<
data
>
d_out
=
NULL
;
d_out
=
plugins_manager
::
get_data
(
args
[
"out-data"
])
;
if
(
d_in
==
NULL
&&
d_out
==
NULL
)
if
(
!
d_in
&&
!
d_out
)
{
std
::
cerr
<<
"<<ERROR>> cannot import or export data"
<<
std
::
endl
;
return
1
;
}
if
(
dynamic_cast
<
vertical_segment
*
>
(
d_out
)
!=
NULL
)
if
(
dynamic_
pointer_
cast
<
vertical_segment
>
(
d_out
))
{
params
::
input
param
=
params
::
parse_input
(
args
[
"param"
]);
if
(
param
==
params
::
UNKNOWN_INPUT
&&
d_in
->
input_parametrization
()
!=
params
::
UNKNOWN_INPUT
)
...
...
sources/softs/data2diff/main.cpp
View file @
e4260bb6
...
...
@@ -43,7 +43,7 @@ int main(int argc, char** argv)
}
// Import data
data
*
d
=
NULL
;
ptr
<
data
>
d
=
NULL
;
d
=
plugins_manager
::
get_data
(
args
[
"data"
])
;
d
->
load
(
args
[
"input"
]);
...
...
@@ -62,7 +62,7 @@ int main(int argc, char** argv)
}
// Get the output data object
data
*
out_d
=
plugins_manager
::
get_data
(
args
[
"data"
]);
ptr
<
data
>
out_d
=
plugins_manager
::
get_data
(
args
[
"data"
]);
if
(
d
!=
NULL
)
{
...
...
sources/softs/data2gnuplot/main.cpp
View file @
e4260bb6
...
...
@@ -33,7 +33,7 @@ int main(int argc, char** argv)
return
1
;
}
data
*
d
=
plugins_manager
::
get_data
(
args
[
"data"
])
;
ptr
<
data
>
d
=
plugins_manager
::
get_data
(
args
[
"data"
])
;
d
->
load
(
args
[
"input"
],
args
);
// Create output file
...
...
sources/softs/data2moments/main.cpp
View file @
e4260bb6
...
...
@@ -68,10 +68,10 @@ int main(int argc, char** argv)
}
// Import data
data
*
d
=
NULL
;
ptr
<
data
>
d
=
NULL
;
d
=
plugins_manager
::
get_data
(
args
[
"data"
])
;
if
(
dynamic_
cast
<
const
vertical_segment
*
>
(
d
)
!=
NULL
)
{
if
(
dynamic_
pointer_cast
<
vertical_segment
>
(
d
))
{
std
::
cerr
<<
"<<ERROR>> this data object is not interpolant."
<<
std
::
endl
;
return
1
;
}
...
...
@@ -80,7 +80,7 @@ int main(int argc, char** argv)
// Create output file
std
::
ofstream
file
(
args
[
"output"
].
c_str
(),
std
::
ios_base
::
trunc
);
if
(
d
!=
NULL
)
if
(
d
)
{
// Data parametrization
params
::
input
data_param
=
d
->
parametrization
();
...
...
sources/softs/fourieranalysis/main.cpp
View file @
e4260bb6
...
...
@@ -39,7 +39,7 @@ int main(int argc, char** argv)
return
1
;
}
data
*
d
=
NULL
;
ptr
<
data
>
d
=
NULL
;
d
=
manager
.
get_data
(
args
[
"loader"
])
;
d
->
load
(
args
[
"input"
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment