cttl::inode_writer< NodeDescriptorT, ContainerT > Struct Template Reference

Represents writable node of a syntax tree, modeled on top of STL sequence container. More...

#include <inode_writer.h>

List of all members.

Public Types

typedef inode_writer
< NodeDescriptorT, ContainerT > 
const_iterator
 Defines const_iterator type.
typedef ContainerT::const_reference const_reference
 Bidirectional iterator: const reference type of the node.
typedef ContainerT container_T
 Defines type container.
typedef ContainerT::difference_type difference_type
 Bidirectional iterator: difference type of the node.
typedef NodeDescriptorT inode_descriptor_T
 Describes logical field positions of the node.
typedef inode_writer
< NodeDescriptorT, ContainerT > 
inode_T
 Defines node type.
typedef inode_writer
< NodeDescriptorT, ContainerT > 
iterator
 Defines iterator type.
typedef
std::bidirectional_iterator_tag 
iterator_category
 Bidirectional iterator: iterator category of the node.
typedef ContainerT::pointer pointer
 Bidirectional iterator: pointer type of the node.
typedef ContainerT::reference reference
 Bidirectional iterator: reference type of the node.
typedef ContainerT::size_type size_type
 Bidirectional iterator: size type of the node.
typedef ContainerT::value_type value_type
 Bidirectional iterator: value type of the node.

Public Member Functions

inode_writer< NodeDescriptorT,
ContainerT > 
begin (int offset_) const
 Returns copy of cttl::inode_writer at arbitrary position.
inode_writer< NodeDescriptorT,
ContainerT > 
begin () const
 Bidirectional iterator: returns copy of cttl::inode_writer with zero offset.
ContainerT const & container () const
 Returns constant reference to the underlying STL container.
ContainerT & container ()
 Returns mutable reference to the underlying STL container.
inode_writer< NodeDescriptorT,
ContainerT > 
end () const
 Bidirectional iterator: returns copy of cttl::inode_writer with offset at the end of the underlying container.
 inode_writer (ContainerT &container_, size_type offset_)
 Constructs new cttl::inode_writer at specified position.
 inode_writer (ContainerT &container_)
 Constructs new cttl::inode_writer and positions itself at the end.
 inode_writer (inode_writer< NodeDescriptorT, ContainerT > const &other_)
 Bidirectional iterator: copy constructor.
 inode_writer ()
 Bidirectional iterator: default constructor.
size_type offset () const
 Returns node offset.
void offset (size_type offset_)
 Sets offset of the node.
size_typeoffset_reference ()
 Returns reference to node offset.
inode_writer< NodeDescriptorT,
ContainerT > 
operator() (int field_) const
 Returns instance of inode_writer pointing to a specific relative node.
reference operator* ()
 Bidirectional iterator: dereference operator returns value at the current position.
const_reference operator* () const
 Bidirectional iterator: dereference operator returns value at the current position.
template<typename RhsT >
inode_writer< NodeDescriptorT,
ContainerT > & 
operator*= (RhsT child_)
 Negative many-to-one link from children to parent.
inode_writer< NodeDescriptorT,
ContainerT > 
operator++ (int)
 Bidirectional iterator: postfix increment operator of cttl::inode_writer increments current offset.
inode_writer< NodeDescriptorT,
ContainerT > & 
operator++ ()
 Bidirectional iterator: prefix increment operator of cttl::inode_writer increments current offset.
template<typename RhsT >
inode_writer< NodeDescriptorT,
ContainerT > & 
operator+= (RhsT rhs_)
 Positive link with another node.
inode_writer< NodeDescriptorT,
ContainerT > & 
operator+= (size_type size_)
 Assign new offset.
inode_writer< NodeDescriptorT,
ContainerT > 
operator-- (int)
 Bidirectional iterator: postfix decrement operator of cttl::inode_writer decrements current offset.
inode_writer< NodeDescriptorT,
ContainerT > & 
operator-- ()
 Bidirectional iterator: prefix decrement operator of cttl::inode_writer decrements current offset.
template<typename RhsT >
inode_writer< NodeDescriptorT,
ContainerT > & 
operator-= (RhsT rhs_)
 Negative link with another node.
inode_writer< NodeDescriptorT,
ContainerT > & 
operator-= (size_type size_)
 Assign new offset.
value_typeoperator-> ()
 Bidirectional iterator: pointer operator returns pointer to value at the current position of the syntax tree node.
value_type const * operator-> () const
 Bidirectional iterator: pointer operator returns pointer to value at the current position of the syntax tree node.
inode_writer< NodeDescriptorT,
ContainerT > & 
operator<<= (int size_)
 Inserts N copies of value_type() at the end of container, and establishes new node position.
inode_writer< NodeDescriptorT,
ContainerT > & 
operator= (size_type size_)
 Assign new offset.
inode_writer< NodeDescriptorT,
ContainerT > & 
operator= (inode_writer< NodeDescriptorT, ContainerT > const &other_)
 Bidirectional iterator: assignment operator.
const_reference operator[] (int field_) const
 Returns constant value at specific field of this node.
reference operator[] (int field_)
 Returns mutable value stored at specific field of this node.
template<typename RhsT >
inode_writer< NodeDescriptorT,
ContainerT > & 
operator^= (RhsT rhs_)
 Bidirectional link between two nodes.
const_reference value (int field_) const
 Returns constant value at specific field of this node.
reference value (int field_)
 Returns mutable value stored at specific field of this node.

Static Public Attributes

static const int next_link = NodeDescriptorT::NEXT_LINK
 Position of the field that points to the next node.
static const int previous_link = NodeDescriptorT::PREVIOUS_LINK
 Position of the field that points to the previous node.

Protected Attributes

size_type m_offset
 Offset of the node.
ContainerT * m_ptr_container
 Pointer to STL container for data storage.


Detailed Description

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
struct cttl::inode_writer< NodeDescriptorT, ContainerT >

Represents writable node of a syntax tree, modeled on top of STL sequence container.

In addition to tree node representation, cttl::inode_writer class also behaves as STL bidirectional iterator.

Template Parameters:
previous_link specifies field for linkage with previous node. cttl::inode_reader can be moved to the previous node by prefix and postfix decrement operators.
next_link specifies field for linkage with next node. cttl::inode_reader can be moved to the next node by prefix and postfix increment operators.
ContainerT specifies underlying sequence container type.
See also:

Definition at line 73 of file inode_writer.h.


Member Typedef Documentation

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::const_iterator

Defines const_iterator type.

Definition at line 98 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef ContainerT::const_reference cttl::inode_writer< NodeDescriptorT, ContainerT >::const_reference

Bidirectional iterator: const reference type of the node.

Definition at line 107 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef ContainerT cttl::inode_writer< NodeDescriptorT, ContainerT >::container_T

Defines type container.

Definition at line 86 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef ContainerT::difference_type cttl::inode_writer< NodeDescriptorT, ContainerT >::difference_type

Bidirectional iterator: difference type of the node.

Definition at line 113 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef NodeDescriptorT cttl::inode_writer< NodeDescriptorT, ContainerT >::inode_descriptor_T

Describes logical field positions of the node.

Definition at line 83 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::inode_T

Defines node type.

Definition at line 92 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::iterator

Defines iterator type.

Definition at line 95 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef std::bidirectional_iterator_tag cttl::inode_writer< NodeDescriptorT, ContainerT >::iterator_category

Bidirectional iterator: iterator category of the node.

Definition at line 116 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef ContainerT::pointer cttl::inode_writer< NodeDescriptorT, ContainerT >::pointer

Bidirectional iterator: pointer type of the node.

Definition at line 101 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef ContainerT::reference cttl::inode_writer< NodeDescriptorT, ContainerT >::reference

Bidirectional iterator: reference type of the node.

Definition at line 104 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef ContainerT::size_type cttl::inode_writer< NodeDescriptorT, ContainerT >::size_type

Bidirectional iterator: size type of the node.

Definition at line 110 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
typedef ContainerT::value_type cttl::inode_writer< NodeDescriptorT, ContainerT >::value_type

Bidirectional iterator: value type of the node.

Definition at line 89 of file inode_writer.h.


Constructor & Destructor Documentation

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
cttl::inode_writer< NodeDescriptorT, ContainerT >::inode_writer (  ) 

Bidirectional iterator: default constructor.

Definition at line 121 of file inode_writer.h.

00122         :
00123         m_offset( 0 ),
00124         m_ptr_container( NULL )
00125     {
00126     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
cttl::inode_writer< NodeDescriptorT, ContainerT >::inode_writer ( inode_writer< NodeDescriptorT, ContainerT > const &  other_  ) 

Bidirectional iterator: copy constructor.

Definition at line 129 of file inode_writer.h.

00130         :
00131         m_offset( other_.m_offset ),
00132         m_ptr_container( other_.m_ptr_container )
00133     {
00134     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
cttl::inode_writer< NodeDescriptorT, ContainerT >::inode_writer ( ContainerT &  container_  ) 

Constructs new cttl::inode_writer and positions itself at the end.

Definition at line 137 of file inode_writer.h.

00138         :
00139         m_offset( container_.size() ),
00140         m_ptr_container( &container_ )
00141     {
00142     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
cttl::inode_writer< NodeDescriptorT, ContainerT >::inode_writer ( ContainerT &  container_,
size_type  offset_ 
)

Constructs new cttl::inode_writer at specified position.

Definition at line 145 of file inode_writer.h.

00146         :
00147         m_offset( offset_ ),
00148         m_ptr_container( &container_ )
00149     {
00150     }


Member Function Documentation

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::begin ( int  offset_  )  const

Returns copy of cttl::inode_writer at arbitrary position.

Definition at line 236 of file inode_writer.h.

00237     {
00238         return inode_writer< NodeDescriptorT, ContainerT >( *m_ptr_container, offset_ );
00239     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::begin (  )  const

Bidirectional iterator: returns copy of cttl::inode_writer with zero offset.

Definition at line 230 of file inode_writer.h.

00231     {
00232         return inode_writer< NodeDescriptorT, ContainerT >( *m_ptr_container, 0 );
00233     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
ContainerT const& cttl::inode_writer< NodeDescriptorT, ContainerT >::container (  )  const

Returns constant reference to the underlying STL container.

Definition at line 446 of file inode_writer.h.

00447     {
00448         return *m_ptr_container;
00449     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
ContainerT& cttl::inode_writer< NodeDescriptorT, ContainerT >::container (  ) 

Returns mutable reference to the underlying STL container.

Definition at line 440 of file inode_writer.h.

00441     {
00442         return *m_ptr_container;
00443     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::end (  )  const

Bidirectional iterator: returns copy of cttl::inode_writer with offset at the end of the underlying container.

Definition at line 244 of file inode_writer.h.

00245     {
00246         return begin( int( m_ptr_container->size() ) );
00247     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
size_type cttl::inode_writer< NodeDescriptorT, ContainerT >::offset (  )  const

Returns node offset.

Definition at line 303 of file inode_writer.h.

00304     {
00305         return m_offset;
00306     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
void cttl::inode_writer< NodeDescriptorT, ContainerT >::offset ( size_type  offset_  ) 

Sets offset of the node.

Definition at line 297 of file inode_writer.h.

00298     {
00299         m_offset = offset_;
00300     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
size_type& cttl::inode_writer< NodeDescriptorT, ContainerT >::offset_reference (  ) 

Returns reference to node offset.

Definition at line 309 of file inode_writer.h.

00310     {
00311         return m_offset;
00312     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::operator() ( int  field_  )  const

Returns instance of inode_writer pointing to a specific relative node.

Definition at line 319 of file inode_writer.h.

00320     {
00321         return inode_writer< NodeDescriptorT, ContainerT >( *m_ptr_container, value( field_ ) );
00322     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
reference cttl::inode_writer< NodeDescriptorT, ContainerT >::operator* (  ) 

Bidirectional iterator: dereference operator returns value at the current position.

Definition at line 170 of file inode_writer.h.

00171     {
00172         return value( 0 );
00173     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
const_reference cttl::inode_writer< NodeDescriptorT, ContainerT >::operator* (  )  const

Bidirectional iterator: dereference operator returns value at the current position.

Definition at line 164 of file inode_writer.h.

00165     {
00166         return value( 0 );
00167     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
template<typename RhsT >
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator*= ( RhsT  child_  ) 

Negative many-to-one link from children to parent.

Definition at line 428 of file inode_writer.h.

00429     {
00430         *this -= child_;         // negative link with first child
00431         while ( child_.value( child_.next_link )  ) {
00432             child_.offset( child_.value( child_.next_link ) );
00433             *this -= child_;     // negative link with next child
00434         }
00435 
00436         return *this;
00437     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::operator++ ( int   ) 

Bidirectional iterator: postfix increment operator of cttl::inode_writer increments current offset.

Definition at line 203 of file inode_writer.h.

00204     {
00205         inode_writer< NodeDescriptorT, ContainerT > sibling( *this );
00206         ++m_offset;
00207         return sibling;
00208     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator++ (  ) 

Bidirectional iterator: prefix increment operator of cttl::inode_writer increments current offset.

Definition at line 194 of file inode_writer.h.

00195     {
00196         ++m_offset;
00197         return *this;
00198     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
template<typename RhsT >
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator+= ( RhsT  rhs_  ) 

Positive link with another node.

Definition at line 403 of file inode_writer.h.

00404     {
00405         value( next_link ) = rhs_.offset();
00406         return *this;
00407     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator+= ( size_type  size_  ) 

Assign new offset.

Definition at line 260 of file inode_writer.h.

00261     {
00262         m_offset += size_;
00263         return *this;
00264     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT > cttl::inode_writer< NodeDescriptorT, ContainerT >::operator-- ( int   ) 

Bidirectional iterator: postfix decrement operator of cttl::inode_writer decrements current offset.

Definition at line 222 of file inode_writer.h.

00223     {
00224         inode_writer< NodeDescriptorT, ContainerT > sibling( *this );
00225         --m_offset;
00226         return sibling;
00227     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator-- (  ) 

Bidirectional iterator: prefix decrement operator of cttl::inode_writer decrements current offset.

Definition at line 213 of file inode_writer.h.

00214     {
00215         --m_offset;
00216         return *this;
00217     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
template<typename RhsT >
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator-= ( RhsT  rhs_  ) 

Negative link with another node.

Definition at line 411 of file inode_writer.h.

00412     {
00413         rhs_.value( rhs_.previous_link ) = offset();
00414         return *this;
00415     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator-= ( size_type  size_  ) 

Assign new offset.

Definition at line 266 of file inode_writer.h.

00267     {
00268         m_offset -= size_;
00269         return *this;
00270     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
value_type* cttl::inode_writer< NodeDescriptorT, ContainerT >::operator-> (  ) 

Bidirectional iterator: pointer operator returns pointer to value at the current position of the syntax tree node.

Definition at line 186 of file inode_writer.h.

00187     {
00188         return &value( 0 );
00189     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
value_type const* cttl::inode_writer< NodeDescriptorT, ContainerT >::operator-> (  )  const

Bidirectional iterator: pointer operator returns pointer to value at the current position of the syntax tree node.

Definition at line 178 of file inode_writer.h.

00179     {
00180         return &value( 0 );
00181     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator<<= ( int  size_  ) 

Inserts N copies of value_type() at the end of container, and establishes new node position.

Definition at line 329 of file inode_writer.h.

00330     {
00331         // 0................m_ptr_container->size()
00332         // |                |
00333         // v                v
00334         // |--------|-fill->|<-resize->|
00335         //          ^                  ^
00336         //          |                  |
00337         //          m_offset...........size_
00338 
00339         assert( size_ ); // node size (number of elements to insert) should not be zero
00340 
00341         if ( m_offset == m_ptr_container->size() ) {
00342             m_ptr_container->insert(
00343                 m_ptr_container->end(), 
00344                 size_,          // number of elements to insert
00345                 value_type()    // value to insert
00346                 );
00347 
00348         } else {
00349             // is there an area to fill ?
00350             if ( m_offset < m_ptr_container->size() ) {
00351                 std::fill(
00352                     m_ptr_container->begin() + m_offset,
00353                     m_ptr_container->begin()
00354                     +
00355                     std::min(
00356                         m_offset + size_,
00357                         m_ptr_container->size()
00358                     ),
00359                     value_type()    // value to fill
00360                     );
00361             }
00362             // is there an area to resize ?
00363             if ( m_ptr_container->size() < m_offset + size_ ) {
00364                 m_ptr_container->resize(
00365                     m_offset + size_//,
00366                     //value_type()
00367                     );
00368             }
00369         }
00370 
00371         return *this;
00372     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator= ( size_type  size_  ) 

Assign new offset.

Definition at line 254 of file inode_writer.h.

00255     {
00256         m_offset = size_;
00257         return *this;
00258     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator= ( inode_writer< NodeDescriptorT, ContainerT > const &  other_  ) 

Bidirectional iterator: assignment operator.

Definition at line 153 of file inode_writer.h.

00154     {
00155         if ( this != &other_ ) {
00156             m_offset = other_.m_offset;
00157             m_ptr_container = other_.m_ptr_container;
00158         }
00159 
00160         return *this;
00161     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
const_reference cttl::inode_writer< NodeDescriptorT, ContainerT >::operator[] ( int  field_  )  const

Returns constant value at specific field of this node.

Definition at line 291 of file inode_writer.h.

00292     {
00293         return value( field_ );
00294     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
reference cttl::inode_writer< NodeDescriptorT, ContainerT >::operator[] ( int  field_  ) 

Returns mutable value stored at specific field of this node.

Definition at line 285 of file inode_writer.h.

00286     {
00287         return value( field_ );
00288     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
template<typename RhsT >
inode_writer< NodeDescriptorT, ContainerT >& cttl::inode_writer< NodeDescriptorT, ContainerT >::operator^= ( RhsT  rhs_  ) 

Bidirectional link between two nodes.

Definition at line 419 of file inode_writer.h.

00420     {
00421         *this += rhs_;
00422         *this -= rhs_;
00423         return *this;
00424     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
const_reference cttl::inode_writer< NodeDescriptorT, ContainerT >::value ( int  field_  )  const

Returns constant value at specific field of this node.

Definition at line 279 of file inode_writer.h.

00280     {
00281         return (*m_ptr_container)[ m_offset + field_ ];
00282     }

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
reference cttl::inode_writer< NodeDescriptorT, ContainerT >::value ( int  field_  ) 

Returns mutable value stored at specific field of this node.

Definition at line 273 of file inode_writer.h.

00274     {
00275         return (*m_ptr_container)[ m_offset + field_ ];
00276     }


Member Data Documentation

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
size_type cttl::inode_writer< NodeDescriptorT, ContainerT >::m_offset [protected]

Offset of the node.

Definition at line 457 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
ContainerT* cttl::inode_writer< NodeDescriptorT, ContainerT >::m_ptr_container [protected]

Pointer to STL container for data storage.

Definition at line 460 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
const int cttl::inode_writer< NodeDescriptorT, ContainerT >::next_link = NodeDescriptorT::NEXT_LINK [static]

Position of the field that points to the next node.

Definition at line 77 of file inode_writer.h.

template<typename NodeDescriptorT = inode_default_descriptor, typename ContainerT = std::vector< size_t >>
const int cttl::inode_writer< NodeDescriptorT, ContainerT >::previous_link = NodeDescriptorT::PREVIOUS_LINK [static]

Position of the field that points to the previous node.

Definition at line 80 of file inode_writer.h.


The documentation for this struct was generated from the following file:

Generated on Sat Aug 22 22:33:55 2009 for Common Text Transformation Library by  doxygen 1.5.9