diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-01-06 22:40:39 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-01-06 22:40:39 +0000 |
commit | ba2488448b54975d2d00a398daab619acc8d5361 (patch) | |
tree | 45885e95294ca80d930ed4f66b7e96e130d62403 /ace/Message_Block.i | |
parent | 70d108545611dbb86049d0109ef4a7ab1ef6289e (diff) | |
download | ATCD-ba2488448b54975d2d00a398daab619acc8d5361.tar.gz |
My Dog
Diffstat (limited to 'ace/Message_Block.i')
-rw-r--r-- | ace/Message_Block.i | 154 |
1 files changed, 123 insertions, 31 deletions
diff --git a/ace/Message_Block.i b/ace/Message_Block.i index 72b4f42f67b..00ce6f447d0 100644 --- a/ace/Message_Block.i +++ b/ace/Message_Block.i @@ -3,32 +3,94 @@ // Message_Block.i +ACE_INLINE ACE_Data_Block * +ACE_Message_Block::data_block (void) const +{ + ACE_TRACE ("ACE_Data_Block::data_block"); + return this->data_block_; +} + +ACE_INLINE void +ACE_Message_Block::data_block (ACE_Data_Block *db) +{ + ACE_TRACE ("ACE_Data_Block::data_block"); + this->data_block_ = db; +} + +ACE_INLINE char * +ACE_Data_Block::base (void) const +{ + ACE_TRACE ("ACE_Data_Block::base"); + return this->base_; +} + +ACE_INLINE size_t +ACE_Data_Block::size (void) const +{ + ACE_TRACE ("ACE_Data_Block::size"); + return this->cur_size_; +} + +#if 0 +ACE_INLINE void +ACE_Data_Block::base (char *msg_data, + size_t msg_length, + Message_Flags msg_flags) +{ + this->max_size_ = msg_length; + this->cur_size_ = msg_length; + this->base_ = msg_data; + this->flags_ = msg_flags; +} +#endif + ACE_INLINE ACE_Message_Block::Message_Flags -ACE_Message_Block::set_flags (ACE_Message_Block::Message_Flags more_flags) +ACE_Data_Block::set_flags (ACE_Message_Block::Message_Flags more_flags) { - ACE_TRACE ("ACE_Message_Block::set_flags"); + ACE_TRACE ("ACE_Data_Block::set_flags"); // Later we might mask more_glags so that user can't change internal // ones: more_flags &= ~(USER_FLAGS -1). return ACE_SET_BITS (this->flags_, more_flags); } ACE_INLINE ACE_Message_Block::Message_Flags -ACE_Message_Block::clr_flags (ACE_Message_Block::Message_Flags less_flags) +ACE_Data_Block::clr_flags (ACE_Message_Block::Message_Flags less_flags) { - ACE_TRACE ("ACE_Message_Block::clr_flags"); + ACE_TRACE ("ACE_Data_Block::clr_flags"); // Later we might mask more_flags so that user can't change internal // ones: less_flags &= ~(USER_FLAGS -1). return ACE_CLR_BITS (this->flags_, less_flags); } ACE_INLINE ACE_Message_Block::Message_Flags +ACE_Data_Block::flags (void) const +{ + ACE_TRACE ("ACE_Data_Block::flags"); + return this->flags_; +} + +ACE_INLINE ACE_Message_Block::Message_Flags +ACE_Message_Block::set_flags (ACE_Message_Block::Message_Flags more_flags) +{ + ACE_TRACE ("ACE_Message_Block::set_flags"); + return this->data_block ()->set_flags (more_flags); +} + +ACE_INLINE ACE_Message_Block::Message_Flags +ACE_Message_Block::clr_flags (ACE_Message_Block::Message_Flags less_flags) +{ + ACE_TRACE ("ACE_Message_Block::clr_flags"); + return this->data_block ()->clr_flags (less_flags); +} + +ACE_INLINE ACE_Message_Block::Message_Flags ACE_Message_Block::flags (void) const { ACE_TRACE ("ACE_Message_Block::flags"); - return this->flags_; + return this->data_block ()->flags (); } -/* Return the length of the "active" portion of the message */ +// Return the length of the "active" portion of the message. ACE_INLINE size_t ACE_Message_Block::length (void) const @@ -53,28 +115,35 @@ ACE_INLINE size_t ACE_Message_Block::size (void) const { ACE_TRACE ("ACE_Message_Block::size"); - return this->cur_size_; + return this->data_block ()->size (); } -ACE_INLINE ACE_Message_Block & -ACE_Message_Block::operator= (const ACE_Message_Block &) +ACE_INLINE ACE_Message_Block::ACE_Message_Type +ACE_Data_Block::msg_type (void) const { - ACE_TRACE ("ACE_Message_Block::operator="); - return *this; + ACE_TRACE ("ACE_Message_Block::msg_type"); + return this->type_; +} + +ACE_INLINE void +ACE_Data_Block::msg_type (ACE_Message_Block::ACE_Message_Type t) +{ + ACE_TRACE ("ACE_Message_Block::msg_type"); + this->type_ = t; } ACE_INLINE ACE_Message_Block::ACE_Message_Type ACE_Message_Block::msg_type (void) const { ACE_TRACE ("ACE_Message_Block::msg_type"); - return this->type_; + return this->data_block ()->msg_type (); } ACE_INLINE void ACE_Message_Block::msg_type (ACE_Message_Block::ACE_Message_Type t) { ACE_TRACE ("ACE_Message_Block::msg_type"); - this->type_ = t; + this->data_block ()->msg_type (t); } ACE_INLINE ACE_Message_Block::ACE_Message_Type @@ -115,19 +184,25 @@ ACE_Message_Block::msg_priority (u_long pri) this->priority_ = pri; } +ACE_INLINE char * +ACE_Message_Block::base (void) const +{ + ACE_TRACE ("ACE_Message_Block::base"); + return this->data_block ()->base (); +} + +#if 0 ACE_INLINE void ACE_Message_Block::base (char *msg_data, size_t msg_length, Message_Flags msg_flags) { ACE_TRACE ("ACE_Message_Block::base"); - this->max_size_ = msg_length; - this->cur_size_ = msg_length; this->rd_ptr_ = msg_data; - this->wr_ptr_ = msg_data; - this->base_ = msg_data; - this->flags_ = msg_flags; + this->wr_ptr_ = msg_data; + this->data_block ()->base (msg_data, msg_lenth, msg_flags); } +#endif ACE_INLINE char * ACE_Message_Block::rd_ptr (void) @@ -143,20 +218,20 @@ ACE_Message_Block::wr_ptr (char *new_ptr) this->wr_ptr_ = new_ptr; } +// Return a pointer to 1 past the end of the data buffer. + ACE_INLINE char * -ACE_Message_Block::base (void) const +ACE_Data_Block::end (void) const { - ACE_TRACE ("ACE_Message_Block::base"); - return this->base_; + ACE_TRACE ("ACE_Data_Block::end"); + return this->base_ + this->max_size_; } -// Return a pointer to 1 past the end of the data buffer. - ACE_INLINE char * ACE_Message_Block::end (void) const { ACE_TRACE ("ACE_Message_Block::end"); - return this->base_ + this->max_size_; + return this->data_block ()->end (); } @@ -189,10 +264,10 @@ ACE_Message_Block::wr_ptr (size_t n) } ACE_INLINE void -ACE_Message_Block::cont (ACE_Message_Block *next_block) +ACE_Message_Block::cont (ACE_Message_Block *cont_msg) { ACE_TRACE ("ACE_Message_Block::cont"); - this->cont_ = next_block; + this->cont_ = cont_msg; } ACE_INLINE ACE_Message_Block * @@ -203,10 +278,10 @@ ACE_Message_Block::cont (void) const } ACE_INLINE void -ACE_Message_Block::next (ACE_Message_Block *next_block) +ACE_Message_Block::next (ACE_Message_Block *next_msg) { ACE_TRACE ("ACE_Message_Block::next"); - this->next_ = next_block; + this->next_ = next_msg; } ACE_INLINE ACE_Message_Block * @@ -217,10 +292,10 @@ ACE_Message_Block::next (void) const } ACE_INLINE void -ACE_Message_Block::prev (ACE_Message_Block *next_block) +ACE_Message_Block::prev (ACE_Message_Block *next_msg) { ACE_TRACE ("ACE_Message_Block::prev"); - this->prev_ = next_block; + this->prev_ = next_msg; } ACE_INLINE ACE_Message_Block * @@ -234,14 +309,31 @@ ACE_INLINE ACE_Lock * ACE_Message_Block::locking_strategy (void) { ACE_TRACE ("ACE_Message_Block::locking_strategy"); - return this->locking_strategy_; + return this->data_block ()->locking_strategy (); } ACE_INLINE ACE_Lock * ACE_Message_Block::locking_strategy (ACE_Lock *nls) { ACE_TRACE ("ACE_Message_Block::locking_strategy"); + ACE_Lock *ols = this->data_block ()->locking_strategy (); + this->data_block ()->locking_strategy (nls); + return ols; +} + +ACE_INLINE ACE_Lock * +ACE_Data_Block::locking_strategy (void) +{ + ACE_TRACE ("ACE_Data_Block::locking_strategy"); + return this->locking_strategy_; +} + +ACE_INLINE ACE_Lock * +ACE_Data_Block::locking_strategy (ACE_Lock *nls) +{ + ACE_TRACE ("ACE_Data_Block::locking_strategy"); ACE_Lock *ols = this->locking_strategy_; + this->locking_strategy_ = nls; return ols; } |