summaryrefslogtreecommitdiff
path: root/ace/Obstack_T.i
diff options
context:
space:
mode:
Diffstat (limited to 'ace/Obstack_T.i')
-rw-r--r--ace/Obstack_T.i33
1 files changed, 33 insertions, 0 deletions
diff --git a/ace/Obstack_T.i b/ace/Obstack_T.i
new file mode 100644
index 00000000000..f6ff337ba6e
--- /dev/null
+++ b/ace/Obstack_T.i
@@ -0,0 +1,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;
+}