summaryrefslogtreecommitdiff
path: root/ace/Message_Block.h
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2001-07-06 04:27:03 +0000
committerbala <balanatarajan@users.noreply.github.com>2001-07-06 04:27:03 +0000
commitf808d5a4f39c81e8f0c90723d2b710c09e07b049 (patch)
treed2b697a7f6a3a30a9aae66ba8792d7302a4eb3ae /ace/Message_Block.h
parenteca0d02969599819ceacd5e67852d8c2564080ad (diff)
downloadATCD-f808d5a4f39c81e8f0c90723d2b710c09e07b049.tar.gz
ChangeLogTag: Thu Jul 5 23:22:21 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'ace/Message_Block.h')
-rw-r--r--ace/Message_Block.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ace/Message_Block.h b/ace/Message_Block.h
index b14dac673ac..6b7c0042299 100644
--- a/ace/Message_Block.h
+++ b/ace/Message_Block.h
@@ -177,6 +177,20 @@ public:
ACE_Allocator *message_block_allocator = 0);
/**
+ * A copy constructor. This constructor is a bit different. If the
+ * incoming Message Block has a data block from the stack this
+ * constructor does a deep copy ie. allocates a new data block on
+ * the heap and does a copy of the data from the incoming message
+ * block. As a final note, the alignment information is used to
+ * align the data block if it is created afresh. If the incoming
+ * <mb> has a data block has a data block allocated from the heap,
+ * then this constructor just duplicates (ie. a shallow copy) the
+ * data block of the incoming <mb>.
+ */
+ ACE_Message_Block (const ACE_Message_Block &mb,
+ size_t align);
+
+ /**
* Create a Message Block that assumes ownership of <data> (i.e.,
* doesn't delete it since it didn't malloc it!). Note that the
* <size> of the <Message_Block> will be <size>, but the <length>
@@ -291,6 +305,7 @@ public:
/// Return a "shallow" copy that increments our reference count by 1.
ACE_Message_Block *duplicate (void) const;
+
/**
* Return a "shallow" copy that increments our reference count by 1.
* This is similar to CORBA's <_duplicate> method, which is useful
@@ -299,6 +314,7 @@ public:
*/
static ACE_Message_Block *duplicate (const ACE_Message_Block *mb);
+
/**
* Decrease the shared ACE_Data_Block's reference count by 1. If the
* ACE_Data_Block's reference count goes to 0, it is deleted.