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


C++ ResetData函数代码示例

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


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

示例1: ResetData

/////////////////////////////////////////////////////////////////////////
//                                          
// SetAlgorithm
// 
// Description 
//  Set algorithm from a preallocated buffer. The buffer is not copied so must
//  remain valid for the life of the object.
// Parameters:
//	pData : [in] The buffer
//  cData : [in] The length of the buffer
//	ulId  : [in] optional Id to identify the data
//
// Return Values:
//	S_OK, 
//  E_INVALIDARG E_OUTOFMEMORY, E_FAIL
///////////////////////////////////////////////////////////////////////////
HRESULT Classifier::SetAlgorithm(const PBYTE pData, UINT64 cData, ULONG ulId)
{
    HRESULT     hr = 0;

    if (NULL == pData || 0 == cData )
    {
        hr = -1;
    }

    ResetData();

    if (SUCCEEDED(hr))
    {
        hr =  LoadClassifierData(pData, cData);
    }

    if (SUCCEEDED(hr))
    {
        m_pDatabuf = pData;
        m_cDatabuf = cData;
        m_ulID = ulId;
    }

    return hr;
}
开发者ID:mrevow,项目名称:tools-ann,代码行数:41,代码来源:Classifier.cpp

示例2: Flush

	void Flush()
	{
		if (m_mode != eM_Saving)
			return;

		// write tags and types ending with 0
		WriteFccCodes(m_file, m_tags, eBK_tags);
		WriteFccCodes(m_file, m_types, eBK_typs);

		// write toplevel metadata prefixed with data size
		for (size_t i = 0; i < m_metadata.size(); ++i)
		{
			std::vector<uint8> stm;
			m_metadata[i].SerializeTo(stm);
			uint32 sz = stm.size();
			if (sz == 0)
				continue;
			m_file.Write( &sz, sizeof(sz) );
			m_file.Write(&stm[0], sz);
		}

		// a seperator between flushes
		uint32 seperator = eBK_void;
		m_file.Write(&seperator, sizeof(seperator));

		ResetData();
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:27,代码来源:MetadataRecorder.cpp

示例3: ResetData

bool CFCMReadFile::ParsingTextFile(CString szDelimiter)
{
	if(!IsOpen())
	{
		return false;
	}

	CString szLine;

	ResetData();
	// m_nCols = GetNumberColums(szDelimiter);
	m_nCols = GetNumberColumsMulti(szDelimiter);

	while(!Eof())
	{
		if(ReadLine(szLine))
		{
			if (!szLine.IsEmpty()) {
				++m_nRows;
				//ParsingLine(szLine, szDelimiter);
				ParsingLineMulti(szLine, szDelimiter);
			}
		}
	};

	return true;
}
开发者ID:gzumpan,项目名称:fuzzy-cmeans,代码行数:27,代码来源:ReadWriteFile.cpp

示例4: buf

void CBaseGameStats_Driver::SendData()
{
	// if we don't own the data container or there's no valid data, nothing to do
	if ( !m_pGamestatsData || !m_pGamestatsData->m_bHaveData )
		return;

	// save the data to a buffer
	CUtlBuffer buf( 0, 0, CUtlBuffer::TEXT_BUFFER );
	m_pGamestatsData->m_pKVData->RecursiveSaveToFile( buf, 0 );

	if ( CommandLine()->FindParm( "-gamestatsfileoutputonly" ) )
	{
		// write file for debugging
		const char szFileName[] = "gamestats.dat";
		filesystem->WriteFile( szFileName, GAMESTATS_PATHID, buf );
	}
	else
	{
		// upload the file to Steam
		if ( gamestatsuploader )
			gamestatsuploader->UploadGameStats( "", 1, buf.TellPut(), buf.Base() );
	}	

	ResetData();
}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:25,代码来源:gamestats.cpp

示例5: full_typename_

/**********************************************************************
 * Base Renderer interface implementation
 **********************************************************************/
TessResultRenderer::TessResultRenderer(const char* type, const char* extension)
    : full_typename_(type), file_extension_(extension),
      title_(""), imagenum_(-1),
      output_data_(NULL),
      next_(NULL) {
  ResetData();
}
开发者ID:Annyjain29,项目名称:tess-two,代码行数:10,代码来源:renderer.cpp

示例6: ExamplePlugin_LoadCallback

static void ExamplePlugin_LoadCallback(void * reserved)
{
	UInt32	type, version, length;

	ResetData();

	char	buf[512];

	while(g_serialization->GetNextRecordInfo(&type, &version, &length))
	{
		_MESSAGE("record %08X (%.4s) %08X %08X", type, &type, version, length);

		switch(type)
		{
			case 'STR ':
				g_serialization->ReadRecordData(buf, length);
				buf[length] = 0;

				_MESSAGE("got string %s", buf);

				g_strData = buf;
				break;

			case 'ASDF':
				g_serialization->ReadRecordData(buf, length);
				buf[length] = 0;

				_MESSAGE("ASDF chunk = %s", buf);
				break;
			default:
				_MESSAGE("Unknown chunk type $08X", type);
		}
	}
}
开发者ID:nh2,项目名称:obse,代码行数:34,代码来源:main.cpp

示例7: waveOutOpen

int CSoundPlayer::Open(WAVEFORMATEX _tOutWFX)
{
	DWORD dwFlag = 0;
	HRESULT	hr = NOERROR;
	MMRESULT	mmhr;

	if (NULL != soundObj.hWaveOut)	return -1;

	//if (NULL==soundObj.hNotify)	soundObj.hNotify = CreateEvent( NULL, FALSE, FALSE, 0 );

#if 0
	// Query WaveOut Device for _tOutWFX
	dwFlag = WAVE_FORMAT_DIRECT | WAVE_FORMAT_QUERY; //WAVE_MAPPED
	dwFlag |= CALLBACK_NULL;
	mmhr = waveOutOpen( &soundObj.hWaveOut, WAVE_MAPPER, &_tOutWFX, NULL, 0, dwFlag );
	if( MMSYSERR_NOERROR != mmhr ) {
		_TRACE("waveOutOpen Query Fail ret:%d \n", mmhr );
		return -3;
	}
#endif
	// Open WaveOut Device for _tOutWFX
	dwFlag = WAVE_FORMAT_DIRECT;
	dwFlag |= CALLBACK_EVENT;
	mmhr = waveOutOpen( &soundObj.hWaveOut, WAVE_MAPPER, &_tOutWFX, 
						//(DWORD)NULL, (DWORD_PTR)0, dwFlag );
						(DWORD)soundObj.hNotify, (DWORD_PTR)0, dwFlag );
	if( MMSYSERR_NOERROR != mmhr ) {
		_TRACE("waveOutOpen Fail ret:%d \n", mmhr );
		return -4;
	}

	for( unsigned int i=0; i<soundObj.waveHdrNum; i++ ) 
	{
		soundObj.pWaveHdr[i].dwFlags = 0;
		soundObj.pWaveHdr[i].dwBufferLength = MAX_AUDIO_BUFFER_LENGTH;
		mmhr = waveOutPrepareHeader( soundObj.hWaveOut, &soundObj.pWaveHdr[i], sizeof(WAVEHDR) );
		soundObj.pWaveHdr[i].dwBufferLength = 0;
	}
	soundObj.initWaveHdr = 0x01;

	soundObj.samplerate = _tOutWFX.nSamplesPerSec;
	soundObj.channel    = _tOutWFX.nChannels;
	soundObj.bitpersec  = _tOutWFX.wBitsPerSample;

	ResetData();

	if (NULL == soundObj.hThread)
	{
		soundObj.flag = 0x01;
		soundObj.pEx  = this;
		soundObj.hThread = CreateThread(NULL, 0, __SOUND_PLAY_THREAD, &soundObj, 0, NULL);
		while (soundObj.flag != 0x02 && soundObj.flag != 0x00)	{Sleep(100);}
	}
	soundObj.waveHdrWriteIdx = 0;



	return 0;
}
开发者ID:EricChen2013,项目名称:EasyPusher,代码行数:59,代码来源:SoundPlayer.cpp

示例8: ResetData

void SVisualLogger::OnNewWorld(UWorld* NewWorld)
{
	InternalDevice->SerLastWorld(NewWorld);
	if (ULogVisualizerSettings::StaticClass()->GetDefaultObject<ULogVisualizerSettings>()->bResetDataWithNewSession)
	{
		ResetData();
	}
}
开发者ID:a3pelawi,项目名称:UnrealEngine,代码行数:8,代码来源:SVisualLogger.cpp

示例9: Reset

 void Reset()
 {
     spellId = me->m_spells[0];
     meleeClass = false;
     ResetData();
     castTimer = urand(cooldown, 10000);
     targetTimer = 2000;
 }
开发者ID:Exodius,项目名称:chuspi,代码行数:8,代码来源:echo_isles.cpp

示例10: ResetData

void MathCell::Unbreak()
{
  ResetData();
  m_isBroken = false;
  m_nextToDraw = m_next;
  if (m_nextToDraw != NULL)
    m_nextToDraw->m_previousToDraw = this;
}
开发者ID:BigMcLargeHuge,项目名称:wxmaxima,代码行数:8,代码来源:MathCell.cpp

示例11: CloseLine

//_______________________________________________________________________
void CloseLine (MtpDrvPtr data)
{
	SCCPtr scc = &data->scc;
	scc->state = false;
	LockedCall(__CloseLine());
    if (data->powerMgr) PwMngOFF;
	ResetData (scc);
}
开发者ID:AntonLanghoff,项目名称:whitecatlib,代码行数:9,代码来源:SCC.c

示例12: ResetData

void ImgCell::RecalculateWidths(CellParser& parser, int fontsize)
{
  double scale = parser.GetScale();
  m_image->ViewportSize(m_canvasSize.x,m_canvasSize.y,scale);
  
  m_width = (scale * m_image->m_width) + 2 * m_imageBorderWidth;
  ResetData();
}
开发者ID:Kahkonen,项目名称:wxmaxima,代码行数:8,代码来源:ImgCell.cpp

示例13: ResetData

void DiffCell::RecalculateWidths(CellParser& parser, int fontsize)
{
  double scale = parser.GetScale();
  m_baseCell->RecalculateWidthsList(parser, fontsize);
  m_diffCell->RecalculateWidthsList(parser, fontsize);
  m_width = m_baseCell->GetFullWidth(scale) + m_diffCell->GetFullWidth(scale) + 2*MC_CELL_SKIP;
  ResetData();
}
开发者ID:belkacem77,项目名称:wxmaxima,代码行数:8,代码来源:DiffCell.cpp

示例14: ResetData

void DiffCell::RecalculateWidths(int fontsize)
{
  CellParser *parser = CellParser::Get();
  double scale = parser->GetScale();
  m_baseCell->RecalculateWidthsList(fontsize);
  m_diffCell->RecalculateWidthsList(fontsize);
  m_width = m_baseCell->GetFullWidth(scale) + m_diffCell->GetFullWidth(scale) + 2*MC_CELL_SKIP;
  ResetData();
}
开发者ID:minoki,项目名称:wxmaxima,代码行数:9,代码来源:DiffCell.cpp

示例15: ResetData

void GLWidget::GenerateAKnot()
{
    ResetData();

    while(!_isTracingDone)
    {
        TraceOneStep();
    }
}
开发者ID:azer89,项目名称:CelticKnots,代码行数:9,代码来源:GLWidget.cpp


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