当前位置: 首页>>代码示例>>C++>>正文


C++ Skip函数代码示例

本文整理汇总了C++中Skip函数的典型用法代码示例。如果您正苦于以下问题:C++ Skip函数的具体用法?C++ Skip怎么用?C++ Skip使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Skip函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Skip

// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
//		¥ SkipPString											Static
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void UStreamBits::SkipPString(LStream &inStream)
{
	unsigned char		length;
	
	inStream >> length;
	Skip(inStream,length);
}
开发者ID:MaddTheSane,项目名称:tntbasic,代码行数:10,代码来源:UStreamBits.cpp

示例2: Execute

int TrimCommand ::	Execute( ALib::CommandLine & cmd ) {

    GetSkipOptions( cmd );
    if ( cmd.HasFlag( FLAG_TRLEAD ) || cmd.HasFlag( FLAG_TRTRAIL ) ) {
        mTrimLead = cmd.HasFlag( FLAG_TRLEAD );
        mTrimTrail = cmd.HasFlag( FLAG_TRTRAIL );
    }
    else {
        mTrimLead = mTrimTrail = true;
    }

    if ( cmd.HasFlag( FLAG_WIDTH ) ) {
        GetWidths( cmd.GetValue( FLAG_WIDTH ) );
    }

    ALib::CommaList cl( cmd.GetValue( FLAG_COLS, "" ) );
    CommaListToIndex( cl, mFields );

    IOManager io( cmd );
    CSVRow row;

    while( io.ReadCSV( row ) ) {
        if ( Skip( row ) ) {
            continue;
        }

        if ( ! Pass( row ) ) {
            Trim( row );
        }
        io.WriteRow( row );
    }

    return 0;
}
开发者ID:purinda,项目名称:csvfix,代码行数:34,代码来源:csved_trim.cpp

示例3: assert

  const char *GetNext() {
    assert(!IsEmpty());

    const char *p = args.front();
    Skip();
    return p;
  }
开发者ID:ThomasXBMC,项目名称:XCSoar,代码行数:7,代码来源:Args.hpp

示例4: ReadByte

void CInArchive::ReadDirRecord2(CDirRecord &r, Byte len)
{
  r.ExtendedAttributeRecordLen = ReadByte();
  if (r.ExtendedAttributeRecordLen != 0)
    throw 1;
  r.ExtentLocation = ReadUInt32();
  r.DataLength = ReadUInt32();
  ReadRecordingDateTime(r.DateTime);
  r.FileFlags = ReadByte();
  r.FileUnitSize = ReadByte();
  r.InterleaveGapSize = ReadByte();
  r.VolSequenceNumber = ReadUInt16();
  Byte idLen = ReadByte();
  r.FileId.SetCapacity(idLen);
  ReadBytes((Byte *)r.FileId, idLen);
  int padSize = 1 - (idLen & 1);
  
  // SkipZeros(1 - (idLen & 1));
  Skip(1 - (idLen & 1)); // it's bug in some cd's. Must be zeros

  int curPos = 33 + idLen + padSize;
  if (curPos > len)
    throw 1;
  int rem = len - curPos;
  r.SystemUse.SetCapacity(rem);
  ReadBytes((Byte *)r.SystemUse, rem);
}
开发者ID:f059074251,项目名称:interested,代码行数:27,代码来源:IsoIn.cpp

示例5: GetParentAtom

void MP4SoundAtom::Read()
{
  MP4Atom *parent = GetParentAtom();
  if (ATOMID(parent->GetType()) != ATOMID("stsd")) {
    // Quicktime has an interesting thing - they'll put an mp4a atom
    // which is blank inside a wave atom, which is inside an mp4a atom
    // we have a mp4a inside an wave inside an mp4a - delete all properties
    m_pProperties.Delete(8);
    m_pProperties.Delete(7);
    m_pProperties.Delete(6);
    m_pProperties.Delete(5);
    m_pProperties.Delete(4);
    m_pProperties.Delete(3);
    m_pProperties.Delete(2);
    m_pProperties.Delete(1);
    m_pProperties.Delete(0);
    if (ATOMID(GetType()) == ATOMID("alac")) {
      AddProperty(new MP4BytesProperty("decoderConfig", m_size));
      ReadProperties();
    }
    if (m_pChildAtomInfos.Size() > 0) {
      ReadChildAtoms();
    }
  } else {
    ReadProperties(0, 3); // read first 3 properties
    AddProperties(((MP4IntegerProperty *)m_pProperties[2])->GetValue());
    ReadProperties(3); // continue
    if (m_pChildAtomInfos.Size() > 0) {
      ReadChildAtoms();
    }
  }
  Skip();
}
开发者ID:atgsdjb,项目名称:SeraphBaseCpp,代码行数:33,代码来源:atom_sound.cpp

示例6: while

//------------------------------------------------------------
// Helper function to see if the next/prev node should be skipped
void
nsFilteredContentIterator::CheckAdvNode(nsIDOMNode* aNode, bool& aDidSkip, eDirectionType aDir)
{
  aDidSkip      = false;
  mIsOutOfRange = false;

  if (aNode && mFilter) {
    nsCOMPtr<nsIDOMNode> currentNode = aNode;
    bool skipIt;
    while (1) {
      nsresult rv = mFilter->Skip(aNode, &skipIt);
      if (NS_SUCCEEDED(rv) && skipIt) {
        aDidSkip = true;
        // Get the next/prev node and then 
        // see if we should skip that
        nsCOMPtr<nsIDOMNode> advNode;
        rv = AdvanceNode(aNode, *getter_AddRefs(advNode), aDir);
        if (NS_SUCCEEDED(rv) && advNode) {
          aNode = advNode;
        } else {
          return; // fell out of range
        }
      } else {
        if (aNode != currentNode) {
          nsCOMPtr<nsIContent> content(do_QueryInterface(aNode));
          mCurrentIterator->PositionAt(content);
        }
        return; // found something
      }
    }
  }
}
开发者ID:BitVapor,项目名称:Pale-Moon,代码行数:34,代码来源:nsFilteredContentIterator.cpp

示例7: CleanupUsedNodes

size_t ByteQueue::TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel, bool blocking)
{
	if (blocking)
	{
		lword bytesLeft = transferBytes;
		for (ByteQueueNode *current=m_head; bytesLeft && current; current=current->next)
			bytesLeft -= current->TransferTo(target, bytesLeft, channel);
		CleanupUsedNodes();

		size_t len = (size_t)STDMIN(bytesLeft, (lword)m_lazyLength);
		if (len)
		{
			if (m_lazyStringModifiable)
				target.ChannelPutModifiable(channel, m_lazyString, len);
			else
				target.ChannelPut(channel, m_lazyString, len);
			m_lazyString += len;
			m_lazyLength -= len;
			bytesLeft -= len;
		}
		transferBytes -= bytesLeft;
		return 0;
	}
	else
	{
		Walker walker(*this);
		size_t blockedBytes = walker.TransferTo2(target, transferBytes, channel, blocking);
		Skip(transferBytes);
		return blockedBytes;
	}
}
开发者ID:BreakoutCoin,项目名称:Breakout-Chain-Client,代码行数:31,代码来源:queue.cpp

示例8: Skip

const char* CSvnProp::ReadSingle(const char* data, const char* dataEnd)
{
	//name
	std::string name;
	for(;data != dataEnd && !IsSkip(*data); ++data)
		name += *data;
	Skip(&data, dataEnd);
	
	std::string value;
	for(;data != dataEnd && !IsEnd(*data); ++data)
		value += *data;
	Skip(&data, dataEnd);

	m_NameVal[name].swap(value);
	return data;
}
开发者ID:Jopie64,项目名称:GitSvn2,代码行数:16,代码来源:SvnProp.cpp

示例9: Execute

int TemplateCommand :: Execute( ALib::CommandLine & cmd ) {

	GetSkipOptions( cmd );
	ReadTemplate( cmd );

	if ( cmd.HasFlag( FLAG_FNAMES ) ) {
		mFileTemplate = cmd.GetValue( FLAG_FNAMES );
	}

	IOManager io( cmd );
	CSVRow row;

	while( io.ReadCSV( row ) ) {
		if ( Skip( row ) ) {
			continue;
		}

		if ( mFileTemplate.empty() ) {
			io.Out() << ReplaceColumns( mTemplate, row );
		}
		else {
			FileOut( row );
		}
	}

	return 0;
}
开发者ID:darrennolan,项目名称:csvfix,代码行数:27,代码来源:csved_template.cpp

示例10: ReadID4

void LWOReader::ReadPTAG( UInt32 pChunkSize )
{
    UInt32      dataRead = 0;
    LWIndex     index;
    LWIndex     val;
    UInt32      tagType;

    dataRead += ReadID4( tagType );

    if( tagType != ID_SURF && tagType != ID_PART && tagType != ID_SMGP )
    {
        Skip( pChunkSize - dataRead );
        return;
    }

    while( dataRead < pChunkSize ) 
    {
        dataRead += ReadVX( index );
        dataRead += ReadVX( val );
                
        switch( tagType )
        {
        case ID_SURF:  GetCurrentLayer()->mPolygonList.mPolygons[index]->mSurfaceIndex        = val;  break;
        case ID_PART:  GetCurrentLayer()->mPolygonList.mPolygons[index]->mPartIndex           = val;  break;
        case ID_SMGP:  GetCurrentLayer()->mPolygonList.mPolygons[index]->mSmoothingGroupIndex = val;  break;
        }
    }
}
开发者ID:SebastienLussier,项目名称:Gamedesk,代码行数:28,代码来源:LWOReader.cpp

示例11: ParseTile

// Parse a 'TILE' chunk and any image bearing chunks that immediately follow.
// 'tile_chunk_size' is the previously validated, padded chunk size.
static ParseStatus ParseTile(WebPDemuxer* const dmux,
                             uint32_t tile_chunk_size) {
  const int has_tiles = !!(dmux->feature_flags_ & TILE_FLAG);
  const uint32_t min_size = tile_chunk_size + CHUNK_HEADER_SIZE;
  int added_tile = 0;
  MemBuffer* const mem = &dmux->mem_;
  Frame* frame;
  ParseStatus status =
      NewFrame(mem, min_size, TILE_CHUNK_SIZE, tile_chunk_size, &frame);
  if (status != PARSE_OK) return status;

  frame->is_tile_  = 1;
  frame->x_offset_ = 2 * GetLE24s(mem);
  frame->y_offset_ = 2 * GetLE24s(mem);
  Skip(mem, tile_chunk_size - TILE_CHUNK_SIZE);  // skip any trailing data.

  // Store a (potentially partial) tile only if the tile flag is set
  // and the tile contains some data.
  status = StoreFrame(dmux->num_frames_, mem, frame);
  if (status != PARSE_ERROR && has_tiles && frame->frame_num_ > 0) {
    // Note num_frames_ is incremented only when all tiles have been consumed.
    added_tile = AddFrame(dmux, frame);
    if (!added_tile) status = PARSE_ERROR;
  }

  if (!added_tile) free(frame);
  return status;
}
开发者ID:19Staceys,项目名称:godot,代码行数:30,代码来源:demux.c

示例12: OffsetToAfterNextCRLF

int Buffer::SkipLineCRLF() {
  int after_next_line = OffsetToAfterNextCRLF();
  if (after_next_line < 0)
    return after_next_line;
  else {
    Skip(after_next_line);
    return after_next_line - 2;
  }
}
开发者ID:Ced2911,项目名称:native,代码行数:9,代码来源:buffer.cpp

示例13: Skip

void
CSVLine::Read(char *dest, size_t size)
{
  const char *src = data;
  size_t length = Skip();
  if (length >= size)
    length = size - 1;
  *std::copy_n(src, length, dest) = '\0';
}
开发者ID:Advi42,项目名称:XCSoar,代码行数:9,代码来源:CSVLine.cpp

示例14: Compare

	bool Compare(BufferedLineReader &other) {
		if (Peek(0) != other.Peek(0)) {
			return false;
		}

		Skip(1);
		other.Skip(1);
		return true;
	}
开发者ID:18859966862,项目名称:ppsspp,代码行数:9,代码来源:Compare.cpp

示例15: Skip

	////////////////////////////////////////////////////////////////////////////////
	// LexString:  Lex a quoted string
	// Return value:
	//	RegularExprToken::Type		The type of the matched token.
	//
	// Note: May throw an integer to indicate error.
	////////////////////////////////////////////////////////////////////////////////
	RegularExprToken::Type RegularExprLexerChar::LexString()
	{
		if (current != '"') {
			// Will be caught by NextToken()
			throw 1;
		}
		// Skip opening " 
		Skip();

		//The next character can't be a ".  They need to escape it with a '\' if that's
		//what they intend
		if (current == '"') {
			throw 1;
		}

		while (current != '"' && current > 0) {
			// Check for the escaped quote and backslash here
			if (current == '\\') {
				// Skip the backslash
				Skip();
				if (current != '"' && current != '\\') {
					// whoops, it wasn't an escaped character after all.  Put the backslash back in!
					tokenText += '\\';
				} else {
					// It is an escaped character.  Consume it here so the following code doesn't end
					// the token with no text
					Consume();
				}
			} else {
				// Consume our one character
				Consume();
			}
		}

		// Must end with a '
		if (current != '"') {
			throw 1;
		}
		
		// Skip closing "
		Skip();
		
		return RegularExprToken::String;
	}
开发者ID:h4ck3rm1k3,项目名称:AutoToolsGeocoder,代码行数:51,代码来源:RegularExprLexer.cpp


注:本文中的Skip函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。