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


C++ SetBuffer函数代码示例

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


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

示例1: SetAttribute

bool XMLElement::SetBuffer(const String& name, const PODVector<unsigned char>& value)
{
    if (!value.Size())
        return SetAttribute(name, String::EMPTY);
    else
        return SetBuffer(name, &value[0], value.Size());
}
开发者ID:zhzhxtrrk,项目名称:Urho3D,代码行数:7,代码来源:XMLElement.cpp

示例2: SetAttribute

bool XMLElement::SetBuffer(const ea::string& name, const ea::vector<unsigned char>& value)
{
    if (!value.size())
        return SetAttribute(name, EMPTY_STRING);
    else
        return SetBuffer(name, &value[0], value.size());
}
开发者ID:rokups,项目名称:Urho3D,代码行数:7,代码来源:XMLElement.cpp

示例3: m_Buffer

String::String(const String& other) :
m_Buffer(NULL),
m_BufferSize(NULL),
m_Length(NULL)
{
	SetBuffer(other.GetBuffer());
}
开发者ID:m1h4,项目名称:AudioAnalyzer,代码行数:7,代码来源:String.cpp

示例4: ATLTRACE

	/// <summary>Read the full method from the supplied buffer.</summary>
	void Method::ReadMethod(IMAGE_COR_ILMETHOD* pMethod)
	{
		BYTE* pCode;
		auto fatImage = static_cast<COR_ILMETHOD_FAT*>(&pMethod->Fat);
		if (!fatImage->IsFat())
		{
			#ifdef TRACE_ENABLED
			ATLTRACE(_T("TINY"));
			#endif
			auto tinyImage = static_cast<COR_ILMETHOD_TINY*>(&pMethod->Tiny);
			m_header.CodeSize = tinyImage->GetCodeSize();
			pCode = tinyImage->GetCode();
			#ifdef TRACE_ENABLED
			ATLTRACE(_T("TINY(%X) => (%d + 1) : %d"), m_header.CodeSize, m_header.CodeSize, m_header.MaxStack);
			#endif		
		}
		else
		{
			memcpy(&m_header, pMethod, fatImage->Size * sizeof(DWORD));
			pCode = fatImage->GetCode();
			#ifdef TRACE_ENABLED
			ATLTRACE(_T("FAT(%X) => (%d + 12) : %d"), m_header.CodeSize, m_header.CodeSize, m_header.MaxStack);
			#endif
		}
		SetBuffer(pCode);
		ReadBody();
	}
开发者ID:secdec,项目名称:codepulse,代码行数:28,代码来源:Method.cpp

示例5: Stop

Sound& Sound::operator =(const Sound& right)
{
    // Here we don't use the copy-and-swap idiom, because it would mess up
    // the list of sound instances contained in the buffers

    // Detach the sound instance from the previous buffer (if any)
    if (myBuffer)
    {
        Stop();
        myBuffer->DetachSound(this);
        myBuffer = NULL;
    }

    // Copy the sound attributes
    if (right.myBuffer)
        SetBuffer(*right.myBuffer);
    SetLoop(right.GetLoop());
    SetPitch(right.GetPitch());
    SetVolume(right.GetVolume());
    SetPosition(right.GetPosition());
    SetRelativeToListener(right.IsRelativeToListener());
    SetMinDistance(right.GetMinDistance());
    SetAttenuation(right.GetAttenuation());

    return *this;
}
开发者ID:Smurf,项目名称:sfml-audio,代码行数:26,代码来源:Sound.cpp

示例6: SetBuffer

HRESULT StringBuffer::Concat(__deref_in const WCHAR* pszString, __in_z const UINT &length)
{
    if (!m_pszString)
    {
        return SetBuffer(pszString, length);
    }
        
    if (length > 0)
    {
        size_t actualLen = wcslen(m_pszString);
        size_t newSize = (actualLen + length + 1) * sizeof(WCHAR);

        WCHAR* temp = (WCHAR*)realloc(m_pszString, newSize);

        if (!temp)
        {
            return E_OUTOFMEMORY;
        }

        m_pszString = temp;
        memcpy(m_pszString + actualLen, pszString, (length + 1) * sizeof(WCHAR));
    }

    return S_OK;
}
开发者ID:kovacik,项目名称:DeepZoom,代码行数:25,代码来源:String.cpp

示例7: CMediaBufferDecode

 CMediaBufferDecode(const BYTE *pData, DWORD dwLength) 
   : CMediaBuffer(NULL, 0, false)
 {
   m_pBuffer = (BYTE *)av_malloc(dwLength + FF_INPUT_BUFFER_PADDING_SIZE);
   memcpy(m_pBuffer, pData, dwLength);
   SetBuffer(m_pBuffer, dwLength);
 }
开发者ID:betaking,项目名称:LAVFilters,代码行数:7,代码来源:wmv9.cpp

示例8: SetString

void JSONValue::SetBuffer(const String& name, const PODVector<unsigned char>& value)
{
    if (!value.Size())
        SetString(name, String::EMPTY);
    else
        SetBuffer(name, &value[0], value.Size());
}
开发者ID:Boshin,项目名称:Urho3D,代码行数:7,代码来源:JSONValue.cpp

示例9: SoundSource

Sound::Sound(const Sound& copy) :
SoundSource(copy),
myBuffer   (NULL)
{
    if (copy.myBuffer)
        SetBuffer(*copy.myBuffer);
    SetLoop(copy.GetLoop());
}
开发者ID:Smurf,项目名称:sfml-audio,代码行数:8,代码来源:Sound.cpp

示例10: sfSound_SetBuffer

////////////////////////////////////////////////////////////
/// Bind a sound buffer to a sound
////////////////////////////////////////////////////////////
void sfSound_SetBuffer(sfSound* Sound, sfSoundBuffer* Buffer)
{
    if (Buffer)
    {
        CSFML_CALL(Sound, SetBuffer(Buffer->This))
        Sound->Buffer = Buffer;
    }
}
开发者ID:fu7mu4,项目名称:entonetics,代码行数:11,代码来源:Sound.cpp

示例11: SetBuffer

	void Source::SetBuffer(Buffer* value)
	{
	    #ifdef HAS_AUDIO_SOURCE
		impl->SetBuffer(value);
		#else
        (void)value;
		throw System::PunkException(L"Audio source is not available");
		#endif
	}
开发者ID:Mikalai,项目名称:punk_project_a,代码行数:9,代码来源:audio_source.cpp

示例12: myBuffer

Sound::Sound(const SoundBuffer& buffer, bool loop, float pitch, float volume, const Vector3f& position) :
myBuffer(NULL)
{
    SetBuffer(buffer);
    SetLoop(loop);
    SetPitch(pitch);
    SetVolume(volume);
    SetPosition(position);
}
开发者ID:Smurf,项目名称:sfml-audio,代码行数:9,代码来源:Sound.cpp

示例13: SetBuffer

KaxBlockVirtual::KaxBlockVirtual(const KaxBlockVirtual & ElementToClone)
 :EbmlBinary(ElementToClone)
 ,Timecode(ElementToClone.Timecode)
 ,TrackNumber(ElementToClone.TrackNumber)
 ,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly
{
    SetBuffer(DataBlock,sizeof(DataBlock));
    SetValueIsSet(false);
}
开发者ID:ares89,项目名称:vlc,代码行数:9,代码来源:KaxBlock.cpp

示例14: SetParameters

CTokenBufferInfo::CTokenBufferInfo(CTokenParser* Parser, char* pTxt)
  {
  bUseLineEnd = 0;
  pParser = Parser;
  pBigBuff = NULL;
  bMyBigBuff = 0;
  SetParameters();
  SetBuffer(pTxt);
  }
开发者ID:abcweizhuo,项目名称:Test3,代码行数:9,代码来源:TKNPARS.CPP

示例15: TXT_SpinControlDrawer

static void TXT_SpinControlDrawer(TXT_UNCAST_ARG(spincontrol), int selected)
{
    TXT_CAST_ARG(txt_spincontrol_t, spincontrol);
    unsigned int i;
    unsigned int padding;

    TXT_FGColor(TXT_COLOR_BRIGHT_CYAN);
    TXT_BGColor(TXT_COLOR_BLUE, 0);

    TXT_DrawString("\x1b ");

    TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);

    // Choose background color

    if (selected && spincontrol->editing)
    {
        TXT_BGColor(TXT_COLOR_BLACK, 0);
    }
    else if (selected)
    {
        TXT_BGColor(TXT_COLOR_GREY, 0);
    }
    else
    {
        TXT_BGColor(TXT_COLOR_BLUE, 0);
    }

    if (!spincontrol->editing)
    {
        SetBuffer(spincontrol);
    }

    i = 0;

    padding = spincontrol->widget.w - strlen(spincontrol->buffer) - 4;

    while (i < padding)
    {
        TXT_DrawString(" ");
        ++i;
    }

    TXT_DrawString(spincontrol->buffer);
    i += strlen(spincontrol->buffer);

    while (i < spincontrol->widget.w - 4)
    {
        TXT_DrawString(" ");
        ++i;
    }

    TXT_FGColor(TXT_COLOR_BRIGHT_CYAN);
    TXT_BGColor(TXT_COLOR_BLUE, 0);
    TXT_DrawString(" \x1a");
}
开发者ID:JohnnyonFlame,项目名称:odamex,代码行数:56,代码来源:txt_spinctrl.cpp


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