OWLNext
7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
shddel.h
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
// ObjectWindows
3
// Copyright (c) 1991, 1996 by Borland International, All Rights Reserved
4
//
5
//
6
//----------------------------------------------------------------------------
7
8
#if !defined(OWL_SHDDEL_H)
9
#define OWL_SHDDEL_H
10
11
#include <
owl/private/defs.h
>
12
#if defined(BI_HAS_PRAGMA_ONCE)
13
# pragma once
14
#endif
15
16
17
18
namespace
owl
{
19
20
21
//
22
/// \class TShouldDelete
23
// ~~~~~ ~~~~~~~~~~~~~
24
class
TShouldDelete
25
{
26
public
:
27
enum
TDelete
{
NoDelete
,
DefDelete
,
Delete
};
28
typedef
TDelete
DeleteType
;
// For compatibility
29
30
TShouldDelete
(
TDelete
dt
=
Delete
);
31
32
bool
OwnsElements
();
33
void
OwnsElements
(
bool
del
);
34
bool
DelObj
(
TDelete
dt
);
35
36
private
:
37
TDelete
ShouldDelete;
///< Is either Delete or NoDelete
38
};
39
40
//----------------------------------------------------------------------------
41
// Inline implementation
42
//
43
44
inline
TShouldDelete::TShouldDelete
(
TDelete
dt
)
45
{
46
OwnsElements
(
dt
!=
NoDelete
);
47
}
48
49
inline
bool
TShouldDelete::OwnsElements
()
50
{
51
return
ShouldDelete ==
Delete
;
52
}
53
54
inline
void
TShouldDelete::OwnsElements
(
bool
del
)
55
{
56
ShouldDelete =
del
?
Delete
:
NoDelete
;
57
}
58
59
inline
bool
TShouldDelete::DelObj
(
TDelete
dt
)
60
{
61
return
dt
==
Delete
|| (
dt
==
DefDelete
&& ShouldDelete==
Delete
);
62
}
63
64
65
}
// OWL namespace
66
67
68
#endif
// OWL_SHDDEL_H
VarType
Definition
safearray.h:14
owl::TShouldDelete
Definition
shddel.h:25
owl::TShouldDelete::OwnsElements
bool OwnsElements()
Definition
shddel.h:49
owl::TShouldDelete::DelObj
bool DelObj(TDelete dt)
Definition
shddel.h:59
owl::TShouldDelete::TDelete
TDelete
Definition
shddel.h:27
owl::TShouldDelete::DefDelete
@ DefDelete
Definition
shddel.h:27
owl::TShouldDelete::NoDelete
@ NoDelete
Definition
shddel.h:27
owl::TShouldDelete::Delete
@ Delete
Definition
shddel.h:27
owl::TShouldDelete::TShouldDelete
TShouldDelete(TDelete dt=Delete)
Definition
shddel.h:44
owl::TShouldDelete::DeleteType
TDelete DeleteType
Definition
shddel.h:28
owl
Object Windows Library (OWLNext Core)
Definition
animctrl.h:22
defs.h
include
owl
shddel.h
Generated by
1.10.0