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
class
ProcessObject
;
30
43
class
SITKCommon_EXPORT
Command
:
public
ObjectOwnedBase
44
{
45
public
:
47
Command
();
48
50
virtual
~
Command
()
override
;
51
53
std::string
54
GetName()
const override
;
55
void
56
SetName(
const
std::string & n)
override
;
57
59
virtual
void
60
Execute();
61
62
protected
:
63
friend
class
itk::simple::ProcessObject
;
64
65
#ifndef SWIG
66
// internal methods to maintain reference between ProcessObject and
67
// Command, so when either is destroyed, the other will be notified.
68
//
69
// Return value is the number of referenced process objects after
70
// operation.
71
virtual
size_t
72
AddProcessObject(
itk::simple::ProcessObject
* o);
73
virtual
size_t
74
RemoveProcessObject(
const
itk::simple::ProcessObject
* o);
75
76
#endif
77
};
78
79
}
80
81
#endif
sitkCommon.h
itk::simple::Command
An implementation of the Command design pattern for callback.
Definition:
sitkCommand.h:43
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:51
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