SimpleITK
SimpleITK
Code
Common
include
sitkCommand.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright NumFOCUS
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef sitkCommand_h
19
#define sitkCommand_h
20
21
22
#include "
sitkCommon.h
"
23
#include "
sitkObjectOwnedBase.h
"
24
25
#include <set>
26
27
namespace
itk::simple
28
{
29
30
class
ProcessObject
;
31
44
class
SITKCommon_EXPORT
Command
:
public
ObjectOwnedBase
45
{
46
public
:
48
Command
();
49
51
virtual
~
Command
()
override
;
52
54
std::string
55
GetName()
const override
;
56
void
57
SetName(
const
std::string & n)
override
;
58
60
virtual
void
61
Execute();
62
63
protected
:
64
friend
class
itk::simple::ProcessObject
;
65
66
#ifndef SWIG
67
// internal methods to maintain reference between ProcessObject and
68
// Command, so when either is destroyed, the other will be notified.
69
//
70
// Return value is the number of referenced process objects after
71
// operation.
72
virtual
size_t
73
AddProcessObject(
itk::simple::ProcessObject
* o);
74
virtual
size_t
75
RemoveProcessObject(
const
itk::simple::ProcessObject
* o);
76
77
#endif
78
};
79
80
}
// namespace itk::simple
81
82
#endif
sitkCommon.h
itk::simple::Command
An implementation of the Command design pattern for callback.
Definition:
sitkCommand.h:44
sitkObjectOwnedBase.h
SITKCommon_EXPORT
#define SITKCommon_EXPORT
Definition:
sitkCommon.h:41
itk::Command
class ITK_FORWARD_EXPORT Command
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
itk::simple::ProcessObject
Base class for SimpleITK classes based on ProcessObject.
Definition:
sitkProcessObject.h:54
itk::simple::ObjectOwnedBase
An abstract base class to connect this object with the lifetime of another.
Definition:
sitkObjectOwnedBase.h:47
itk::simple
Definition:
sitkAdditionalProcedures.h:28
Generated on
unknown
for SimpleITK by
1.8.17 |
Privacy Policy