Obstack_T.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Obstack_T.inl,v 4.2 2005/11/22 09:23:55 ossama Exp
00004 
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 template <class CHAR> ACE_INLINE size_t
00008 ACE_Obstack_T<CHAR>::length () const
00009 {
00010   return this->size_ / sizeof (CHAR);
00011 }
00012 
00013 template <class CHAR> ACE_INLINE size_t
00014 ACE_Obstack_T<CHAR>::size () const
00015 {
00016   return this->size_;
00017 }
00018 
00019 template <class CHAR> ACE_INLINE void
00020 ACE_Obstack_T<CHAR>::grow_fast (CHAR c)
00021 {
00022   * (reinterpret_cast<CHAR *> (this->curr_->cur_)) = c;
00023   this->curr_->cur_ += sizeof (CHAR);
00024 }
00025 
00026 template <class CHAR> ACE_INLINE CHAR *
00027 ACE_Obstack_T<CHAR>::freeze (void)
00028 {
00029   CHAR *retv = reinterpret_cast<CHAR *> (this->curr_->block_);
00030   * (reinterpret_cast<CHAR *> (this->curr_->cur_)) = 0;
00031 
00032   this->curr_->cur_ += sizeof (CHAR);
00033   this->curr_->block_ = this->curr_->cur_;
00034   return retv;
00035 }
00036 
00037 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 09:41:57 2006 for ACE by doxygen 1.3.6