Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
CamiTK Community Edition
Commits
86ba4751
Commit
86ba4751
authored
Jul 09, 2018
by
Emmanuel Promayon
Browse files
FIXED over zealous noexcept
parent
62c92931
Changes
16
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
imaging/components/dicom/DicomComponent.cpp
View file @
86ba4751
...
...
@@ -44,7 +44,7 @@
using
namespace
camitk
;
// --------------- Constructor -------------------
DicomComponent
::
DicomComponent
(
DicomSerie
*
dicomSerie
)
noe
xcept
:
ImageComponent
(
""
)
{
DicomComponent
::
DicomComponent
(
DicomSerie
*
dicomSerie
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
ImageComponent
(
""
)
{
// associated the component's dicom series
serie
=
dicomSerie
;
...
...
imaging/components/dicom/DicomComponentExtension.cpp
View file @
86ba4751
...
...
@@ -52,7 +52,7 @@ QStringList DicomComponentExtension::getFileExtensions() const {
}
// --------------- Open -------------------
Component
*
DicomComponentExtension
::
open
(
const
QString
&
path
)
noe
xcept
{
Component
*
DicomComponentExtension
::
open
(
const
QString
&
path
)
throw
(
camitk
::
AbortE
xcept
ion
)
{
serieParsed
=
DicomParser
::
parseDirectory
(
path
);
...
...
imaging/components/itkimage/ItkImageComponent.cpp
View file @
86ba4751
...
...
@@ -45,7 +45,7 @@ using namespace camitk;
#include <Log.h>
// -------------------- constructor --------------------
ItkImageComponent
::
ItkImageComponent
(
const
QString
&
fileName
)
noe
xcept
ItkImageComponent
::
ItkImageComponent
(
const
QString
&
fileName
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
ImageComponent
(
fileName
)
{
createComponent
(
fileName
);
}
...
...
modeling/components/mmlcomponent/MMLComponent.cpp
View file @
86ba4751
...
...
@@ -47,7 +47,7 @@ using namespace camitk;
#include <QDockWidget>
// -------------------- default constructor --------------------
MMLComponent
::
MMLComponent
(
const
QString
&
fileName
)
noe
xcept
:
Component
(
fileName
,
QFileInfo
(
fileName
).
baseName
())
{
MMLComponent
::
MMLComponent
(
const
QString
&
fileName
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
Component
(
fileName
,
QFileInfo
(
fileName
).
baseName
())
{
QString
file
=
fileName
;
QFileInfo
fi
=
QFileInfo
(
fileName
);
...
...
modeling/components/pmlcomponent/PMLComponent.cpp
View file @
86ba4751
...
...
@@ -71,14 +71,13 @@
using
namespace
camitk
;
//-------------------- Constructor -------------------
PMLComponent
::
PMLComponent
(
const
QString
&
file
)
noexcept
(
false
)
:
MeshComponent
(
file
)
{
PMLComponent
::
PMLComponent
(
const
QString
&
file
)
throw
(
camitk
::
AbortException
)
:
MeshComponent
(
file
)
{
// Open the .pml file using library-pml
try
{
Application
::
showStatusBarMessage
(
"Loading "
+
QFileInfo
(
file
).
fileName
()
+
"..."
);
physicalModel
=
new
PhysicalModel
(
file
.
toStdString
().
c_str
());
}
catch
(
PMLAbortException
&
e
)
{
catch
(
PMLAbortException
&
e
)
{
throw
AbortException
(
"The PML XML document cannot be opened: "
+
std
::
string
(
e
.
what
()));
}
...
...
modeling/libraries/pml/PhysicalModel.cpp
View file @
86ba4751
...
...
@@ -55,7 +55,7 @@ PhysicalModel::PhysicalModel() {
init
();
}
PhysicalModel
::
PhysicalModel
(
const
char
*
fileName
,
PtrToSetProgressFunction
pspf
)
noexcept
(
false
)
{
PhysicalModel
::
PhysicalModel
(
const
char
*
fileName
,
PtrToSetProgressFunction
pspf
)
throw
(
PMLAbortException
)
{
init
();
setProgressFunction
=
pspf
;
...
...
@@ -329,7 +329,7 @@ void PhysicalModel::xmlPrint ( std::ostream& o, bool opt ) {
}
// --------------- xmlRead ---------------
void
PhysicalModel
::
xmlRead
(
const
char
*
filename
)
noexcept
(
false
)
{
void
PhysicalModel
::
xmlRead
(
const
char
*
filename
)
throw
(
PMLAbortException
)
{
// clear all the current data
clear
();
...
...
sdk/applications/actionstatemachine/ActionStateMachine.cpp
View file @
86ba4751
...
...
@@ -47,7 +47,7 @@ using namespace camitk;
#include "ActionTransition.h"
// ---------------------- constructor ----------------------------
ActionStateMachine
::
ActionStateMachine
(
int
&
argc
,
char
**
argv
,
QString
inputFileName
,
QString
outputDirectory
)
noe
xcept
:
ActionStateMachine
::
ActionStateMachine
(
int
&
argc
,
char
**
argv
,
QString
inputFileName
,
QString
outputDirectory
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
Application
(
"camitk-actionstatemachine"
,
argc
,
argv
)
{
setProperty
(
"Log to File"
,
true
);
...
...
@@ -176,7 +176,7 @@ void ActionStateMachine::initMainWindow() {
}
// ---------------------- checkSCXMLFile ----------------------------
void
ActionStateMachine
::
checkSCXMLFile
(
QString
filename
)
noe
xcept
{
void
ActionStateMachine
::
checkSCXMLFile
(
QString
filename
)
throw
(
camitk
::
AbortE
xcept
ion
)
{
QString
msg
;
QDomDocument
doc
;
...
...
@@ -210,7 +210,7 @@ void ActionStateMachine::checkSCXMLFile(QString filename) noexcept {
}
// ---------------------- parseSCXMLTree ----------------------------
QString
ActionStateMachine
::
parseSCXMLTree
()
noe
xcept
{
QString
ActionStateMachine
::
parseSCXMLTree
()
throw
(
camitk
::
AbortE
xcept
ion
)
{
// Get the name of the application
QString
applicationName
=
""
;
QDomElement
docElem
=
scxmlDoc
.
documentElement
();
...
...
@@ -261,7 +261,7 @@ void ActionStateMachine::finished() {
}
// ---------------------- createAllActionStates ----------------------------
void
ActionStateMachine
::
createAllActionStates
(
QDomNodeList
nodeList
)
noe
xcept
{
void
ActionStateMachine
::
createAllActionStates
(
QDomNodeList
nodeList
)
throw
(
camitk
::
AbortE
xcept
ion
)
{
int
nbStates
=
nodeList
.
size
();
if
(
nbStates
<
1
)
{
QString
msg
=
tr
(
"No state and no camitk-action!"
);
...
...
@@ -348,7 +348,7 @@ void ActionStateMachine::createAllActionStates(QDomNodeList nodeList) noexcept {
}
// ---------------------- createTransitions ----------------------------
void
ActionStateMachine
::
createTransitions
(
QDomNodeList
nodeList
)
noe
xcept
{
void
ActionStateMachine
::
createTransitions
(
QDomNodeList
nodeList
)
throw
(
camitk
::
AbortE
xcept
ion
)
{
int
nbStates
=
nodeList
.
size
();
for
(
int
stateNumber
=
0
;
stateNumber
<
nbStates
;
stateNumber
++
)
{
// For each state ...
...
...
@@ -448,7 +448,7 @@ QVector<Action::ApplyStatus> ActionStateMachine::stringToStatus(QString listOfSt
}
// ---------------------- setCamiTKAction ----------------------------
void
ActionStateMachine
::
setCamiTKAction
(
ActionState
*
actionState
,
QDomElement
actionElement
)
noe
xcept
{
void
ActionStateMachine
::
setCamiTKAction
(
ActionState
*
actionState
,
QDomElement
actionElement
)
throw
(
camitk
::
AbortE
xcept
ion
)
{
QString
msg
;
if
((
actionState
==
nullptr
)
||
(
actionElement
.
isNull
()))
{
msg
=
tr
(
"No Action or no state..."
);
...
...
@@ -535,7 +535,7 @@ void ActionStateMachine::setCamiTKAction(ActionState* actionState, QDomElement a
}
// ---------------------- setCamiTKSaveAction ----------------------------
void
ActionStateMachine
::
setCamiTKSaveAction
(
SaveActionState
*
actionState
,
QDomElement
actionElement
)
noe
xcept
{
void
ActionStateMachine
::
setCamiTKSaveAction
(
SaveActionState
*
actionState
,
QDomElement
actionElement
)
throw
(
camitk
::
AbortE
xcept
ion
)
{
QString
msg
;
if
((
actionState
==
nullptr
)
||
(
actionElement
.
isNull
()))
{
...
...
sdk/components/stl/StlComponent.cpp
View file @
86ba4751
...
...
@@ -36,7 +36,7 @@
using
namespace
camitk
;
// --------------- Constructor -------------------
StlComponent
::
StlComponent
(
const
QString
&
file
)
noexcept
:
MeshComponent
(
file
)
{
StlComponent
::
StlComponent
(
const
QString
&
file
)
throw
(
camitk
::
AbortException
)
:
MeshComponent
(
file
)
{
// use the file name without extension as component name
setName
(
QFileInfo
(
file
).
baseName
());
...
...
sdk/components/vrml/VRMLComponent.cpp
View file @
86ba4751
...
...
@@ -38,7 +38,7 @@
using
namespace
camitk
;
// -------------------- default constructor --------------------
VRMLComponent
::
VRMLComponent
(
const
QString
&
file
)
noe
xcept
:
Component
(
file
,
QFileInfo
(
file
).
baseName
())
{
VRMLComponent
::
VRMLComponent
(
const
QString
&
file
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
Component
(
file
,
QFileInfo
(
file
).
baseName
())
{
// create a VTK importer to read the VRML file
vtkSmartPointer
<
vtkVRMLImporter
>
importer
=
vtkSmartPointer
<
vtkVRMLImporter
>::
New
();
...
...
sdk/components/vtkimage/RawImageComponent.cpp
View file @
86ba4751
...
...
@@ -32,7 +32,7 @@
using
namespace
camitk
;
// -------------------- constructor --------------------
RawImageComponent
::
RawImageComponent
(
const
QString
&
fileName
)
noe
xcept
RawImageComponent
::
RawImageComponent
(
const
QString
&
fileName
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
ImageComponent
(
fileName
)
{
if
(
!
fileName
.
isNull
())
{
// restore the normal cursor
...
...
sdk/components/vtkimage/VtkImageComponent.cpp
View file @
86ba4751
...
...
@@ -48,13 +48,13 @@
using
namespace
camitk
;
// -------------------- constructor --------------------
VtkImageComponent
::
VtkImageComponent
(
const
QString
&
fileName
)
noe
xcept
VtkImageComponent
::
VtkImageComponent
(
const
QString
&
fileName
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
ImageComponent
(
fileName
)
{
createComponent
(
fileName
);
}
// -------------------- createComponent --------------------
void
VtkImageComponent
::
createComponent
(
const
QString
&
filename
)
noe
xcept
{
void
VtkImageComponent
::
createComponent
(
const
QString
&
filename
)
throw
(
camitk
::
AbortE
xcept
ion
)
{
if
(
!
filename
.
isNull
())
{
try
{
// create the ImageComponent (it will register it self in the list of Components)
...
...
sdk/libraries/core/component/Component.cpp
View file @
86ba4751
...
...
@@ -49,7 +49,7 @@ Component::Component(const QString& file, const QString& n, Representation s) :
}
Component
::
Component
(
Component
*
parentComponent
,
const
QString
&
n
,
Representation
s
)
noexcept
(
false
)
:
myParentNode
(
parentComponent
),
myService
(
s
),
myName
(
n
)
{
Component
::
Component
(
Component
*
parentComponent
,
const
QString
&
n
,
Representation
s
)
throw
(
AbortException
)
:
myParentNode
(
parentComponent
),
myService
(
s
),
myName
(
n
)
{
if
(
myParentNode
==
nullptr
)
{
throw
AbortException
(
tr
(
"Inconsistency: cannot instanciate a sub component with a null parent, please use the parent component pointer as the first parameter of the constructor or use the top-level Component constructor."
).
toStdString
());
}
...
...
sdk/libraries/core/component/image/ImageComponent.cpp
View file @
86ba4751
...
...
@@ -70,13 +70,13 @@
namespace
camitk
{
// -------------------- constructors --------------------
ImageComponent
::
ImageComponent
(
const
QString
&
file
)
noexcept
(
false
)
ImageComponent
::
ImageComponent
(
const
QString
&
file
)
throw
(
AbortException
)
:
Component
(
file
,
"Image Volume"
)
{
init
();
}
ImageComponent
::
ImageComponent
(
vtkSmartPointer
<
vtkImageData
>
anImageData
,
const
QString
&
name
,
bool
copy
,
ImageOrientationHelper
::
PossibleImageOrientations
initialOrientation
)
noexcept
(
false
)
:
Component
(
""
,
name
)
{
throw
(
AbortException
)
:
Component
(
""
,
name
)
{
init
();
setImageData
(
anImageData
,
copy
,
initialOrientation
);
setName
(
name
);
...
...
sdk/libraries/core/component/mesh/MeshComponent.cpp
View file @
86ba4751
...
...
@@ -66,7 +66,7 @@
namespace
camitk
{
// -------------------- constructor --------------------
MeshComponent
::
MeshComponent
(
const
QString
&
file
)
noexcept
(
false
)
:
Component
(
file
,
"Mesh"
,
Component
::
GEOMETRY
)
{
MeshComponent
::
MeshComponent
(
const
QString
&
file
)
throw
(
AbortException
)
:
Component
(
file
,
"Mesh"
,
Component
::
GEOMETRY
)
{
init
();
}
...
...
tutorials/components/abort/AbortComponent.cpp
View file @
86ba4751
...
...
@@ -29,7 +29,7 @@
using
namespace
camitk
;
// -------------------- default constructor --------------------
AbortComponent
::
AbortComponent
(
const
QString
&
file
)
noe
xcept
:
Component
(
file
,
QFileInfo
(
file
).
baseName
())
{
AbortComponent
::
AbortComponent
(
const
QString
&
file
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
Component
(
file
,
QFileInfo
(
file
).
baseName
())
{
// just do what it is supposed to do
throw
AbortException
(
tr
(
"Abort file %1 error"
).
arg
(
file
).
toStdString
());
}
tutorials/components/pickme/PickMe.cpp
View file @
86ba4751
...
...
@@ -31,7 +31,7 @@
using
namespace
camitk
;
// --------------- Constructor -------------------
PickMe
::
PickMe
(
const
QString
&
file
)
noe
xcept
:
VtkMeshComponent
(
file
)
{
PickMe
::
PickMe
(
const
QString
&
file
)
throw
(
camitk
::
AbortE
xcept
ion
)
:
VtkMeshComponent
(
file
)
{
// initially all the point data have a value of 0.0 (everything is blue)
// when the user pick a cell or a point in 3D, the point data are modified
// using the point index (for point picking) or average of cell's point index
...
...
Write
Preview
Supports
Markdown
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