summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Allocatable.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-05-02 17:34:45 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-05-02 17:34:45 +0000
commit4bc0f1f2475d28d5e3e86d3a43cd50413300fb5b (patch)
tree0a183eb32423ca1177e59042d23b04fb8452452e /cpp/src/IceGrid/Allocatable.cpp
parentmodifying property name a bit (diff)
downloadice-4bc0f1f2475d28d5e3e86d3a43cd50413300fb5b.tar.bz2
ice-4bc0f1f2475d28d5e3e86d3a43cd50413300fb5b.tar.xz
ice-4bc0f1f2475d28d5e3e86d3a43cd50413300fb5b.zip
Cleaned up the server, adapter and object cache classes.
Diffstat (limited to 'cpp/src/IceGrid/Allocatable.cpp')
-rw-r--r--cpp/src/IceGrid/Allocatable.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/Allocatable.cpp b/cpp/src/IceGrid/Allocatable.cpp
index e8176245e8f..21d81cc06ce 100644
--- a/cpp/src/IceGrid/Allocatable.cpp
+++ b/cpp/src/IceGrid/Allocatable.cpp
@@ -164,8 +164,12 @@ ParentAllocationRequest::canceled(const AllocationException& ex)
_request->canceled(ex);
}
-Allocatable::Allocatable() : _allocatable(false), _count(0)
+Allocatable::Allocatable(bool allocatable, const AllocatablePtr& parent) :
+ _allocatable(allocatable || parent && parent->allocatable()),
+ _parent((parent && parent->allocatable()) ? parent : AllocatablePtr()),
+ _count(0)
{
+ assert(!_parent || _parent->allocatable()); // Parent is only set if it's allocatable.
}
Allocatable::~Allocatable()