Logo Search packages:      
Sourcecode: ragel version File versions

template<class T, class Resize>
SVector< T, Resize > & SVector< T, Resize >::operator= ( STabHead *  head  )  [inline]

Shallow copy another vector into this vector from only the header.

Takes a reference to the other header vector. The contents of this vector are first emptied.

Returns:
A reference to this.

Definition at line 408 of file svectcommon.h.

References STable< T >::data, and SVector< T, Resize >::empty().

{
      /* First clean out the current contents. */
      empty();

      /* Take a reference to other, if the header is no-null. */
      if ( head == 0 )
            BaseTable::data = 0;
      else {
            head->refCount += 1;
            BaseTable::data = (T*) (head + 1);
      }
      return *this;
}


Generated by  Doxygen 1.6.0   Back to index