summaryrefslogtreecommitdiff
path: root/docs/tutorials/013/block.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-24 01:23:45 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-24 01:23:45 +0000
commit971b5fef4c0790745d71d7493090c54af9fc3b60 (patch)
treeb9031b2eb4584c797d558a208156cb50296c257e /docs/tutorials/013/block.cpp
parent39c67e8460275499ffcaf2ed95fe4df6cd157f28 (diff)
downloadATCD-pos_avsvc_split.tar.gz
This commit was manufactured by cvs2svn to create tagpos_avsvc_split
'pos_avsvc_split'.
Diffstat (limited to 'docs/tutorials/013/block.cpp')
-rw-r--r--docs/tutorials/013/block.cpp81
1 files changed, 0 insertions, 81 deletions
diff --git a/docs/tutorials/013/block.cpp b/docs/tutorials/013/block.cpp
deleted file mode 100644
index e652d33643a..00000000000
--- a/docs/tutorials/013/block.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-
-// $Id$
-
-#include "block.h"
-
-/*
- Construct a Dat_Block to contain a unit of work. Note the careful
- construction of the baseclass to set the block type and the locking
- strategy.
- */
-Data_Block::Data_Block (Unit_Of_Work * _data)
- : ACE_Data_Block (0, ACE_Message_Block::MB_DATA, 0, 0, new Lock (), 0, 0)
- ,data_ (_data)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) 0x%x Data_Block ctor for 0x%x\n", (void *) this, (void *) data_));
-}
-
-/*
- The Lock object created in the constructor is stored in the baseclass and
- available through the locking_strategy() method. We can cast it's value to
- our Lock object and invoke the destroy() to indicate that we want it to go
- away when the lock is released.
- */
-Data_Block::~Data_Block (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) 0x%x Data_Block dtor for 0x%x\n", (void *) this, (void *) data_));
- ((Lock *) locking_strategy ())->destroy ();
- delete data_;
-}
-
-/*
- Return the data
- */
-Unit_Of_Work *Data_Block::data (void)
-{
- return this->data_;
-}
-
-Data_Block:: Lock::Lock (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) 0x%x Lock ctor\n", (void *) this));
-}
-
-Data_Block:: Lock::~Lock (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) 0x%x Lock dtor\n", (void *) this));
-}
-
-/*
- Delete ourselves to prevent any memory leak
- */
-int Data_Block::Lock::destroy (void)
-{
- delete this;
- return (0);
-}
-
-/*
- Create an baseclass unit of work when we instantiate a hangup message.
- */
-Message_Block::Message_Block (void)
- :ACE_Message_Block (new Data_Block (new Unit_Of_Work ()))
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) 0x%x Message_Block ctor for shutdown\n", (void *) this));
- this->msg_type (MB_HANGUP);
-}
-
-/*
- Store the unit of work in a Data_Block and initialize the baseclass with
- that data.
- */
-Message_Block::Message_Block (Unit_Of_Work * _data)
- :ACE_Message_Block (new Data_Block (_data))
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) 0x%x Message_Block ctor for 0x%x\n", (void *) this, (void *) _data));
-}
-
-Message_Block::~Message_Block (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) 0x%x Message_Block dtor\n", (void *) this));
-}