Logo Search packages:      
Sourcecode: qt4-x11 version File versions

SegmentTermEnum::SegmentTermEnum ( const SegmentTermEnum clone  )  [protected]

Constructor. The instance is created by cloning all properties of clone

Definition at line 80 of file SegmentTermEnum.cpp.

References _term, buffer, bufferLength, clone(), format, formatM1SkipInterval, indexInterval, indexPointer, isClone, isIndex, position, prev, size, skipInterval, and termInfo.

Referenced by clone().

      //Func - Constructor
      //       The instance is created by cloning all properties of clone
      //Pre  - clone holds a valid reference to SegmentTermEnum
      //Post - An instance of SegmentTermEnum with the same properties as clone
            input        = clone.input->clone();
            //Copy the postion from the clone
            position     = clone.position;

        if ( clone._term != NULL ){
                  _term         = _CLNEW Term;
                  _term = NULL;
            isIndex      = clone.isIndex;
            termInfo     = _CLNEW TermInfo(clone.termInfo);
            indexPointer = clone.indexPointer;
            buffer       = clone.buffer==NULL?NULL:(TCHAR*)malloc(sizeof(TCHAR) * (clone.bufferLength+1));
            bufferLength = clone.bufferLength;
            prev         = clone.prev==NULL?NULL:_CLNEW Term(clone.prev->field(),clone.prev->text(),false);
            size         = clone.size;

      format       = clone.format;
      indexInterval= clone.indexInterval;
      skipInterval = clone.skipInterval;
      formatM1SkipInterval = clone.formatM1SkipInterval;
            //Set isClone to true as this instance is a clone of another instance
            isClone      = true;

            //Copy the contents of buffer of clone to the buffer of this instance
            if ( clone.buffer != NULL )
                  memcpy(buffer,clone.buffer,bufferLength * sizeof(TCHAR));

Generated by  Doxygen 1.6.0   Back to index