summaryrefslogtreecommitdiff
path: root/ace/Obstack_T.i
blob: f6ff337ba6e6e10581996121168a95e6b896fc0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// $Id$

template <class CHAR> ACE_INLINE size_t
ACE_Obstack_T<CHAR>::length () const
{
  return this->size_ / sizeof (CHAR);
}

template <class CHAR> ACE_INLINE size_t
ACE_Obstack_T<CHAR>::size () const
{
  return this->size_;
}

template <class CHAR> ACE_INLINE void
ACE_Obstack_T<CHAR>::grow_fast (CHAR c)
{
  * (ACE_reinterpret_cast (CHAR *,
                           this->curr_->cur_)) = c;
  this->curr_->cur_ += sizeof (CHAR);
}

template <class CHAR> ACE_INLINE CHAR *
ACE_Obstack_T<CHAR>::freeze (void)
{
  CHAR *retv = ACE_reinterpret_cast (CHAR *, this->curr_->block_);
  * (ACE_reinterpret_cast (CHAR *,
                           this->curr_->cur_)) = 0;

  this->curr_->cur_ += sizeof (CHAR);
  this->curr_->block_ = this->curr_->cur_;
  return retv;
}