void SourceBuffer::AppendBuffer(const ArrayBufferView& aData, ErrorResult& aRv) { aData.ComputeLengthAndData(); AppendData(aData.Data(), aData.Length(), aRv); }
void CFX_SAXReader::ParseNodeStart() { if (m_CurByte == '?') { m_pCurItem->m_eNode = FX_SAXNODE_Instruction; m_eMode = FX_SAXMODE_TagName; return; } if (m_CurByte == '!') { m_eMode = FX_SAXMODE_DeclOrComment; return; } if (m_CurByte == '/') { m_eMode = FX_SAXMODE_TagEnd; return; } if (m_CurByte == '>') { Pop(); m_eMode = FX_SAXMODE_Text; return; } if (m_CurByte > 0x20) { m_dwDataOffset = m_File.m_dwBufIndex; m_pCurItem->m_eNode = FX_SAXNODE_Tag; m_eMode = FX_SAXMODE_TagName; AppendData(m_CurByte); } }
void CFX_SAXReader::ParseMaybeClose() { if (m_CurByte == '>') { if (m_pCurItem->m_eNode == FX_SAXNODE_Instruction) { m_iNameLength = m_iDataPos; m_iDataPos = 0; if (m_pHandler) { NotifyTargetData(); } } ParseTagClose(); m_eMode = FX_SAXMODE_Text; } else if (m_ePrevMode == FX_SAXMODE_TagName) { AppendData('/'); m_eMode = FX_SAXMODE_TagName; m_ePrevMode = FX_SAXMODE_Text; ParseTagName(); } else if (m_ePrevMode == FX_SAXMODE_TagAttributeName) { AppendName('/'); m_eMode = FX_SAXMODE_TagAttributeName; m_ePrevMode = FX_SAXMODE_Text; ParseTagAttributeName(); } else if (m_ePrevMode == FX_SAXMODE_TargetData) { AppendName('?'); m_eMode = FX_SAXMODE_TargetData; m_ePrevMode = FX_SAXMODE_Text; ParseTargetData(); } }
void AddStatic(LPCSTR caption, DWORD style, DWORD exStyle, int x, int y, int w, int h, WORD id) { AddStandardComponent(0x0082, caption, style, exStyle, x, y, w, h, id); WORD creationDataLength = 0; AppendData(&creationDataLength, sizeof(WORD)); }
void scRedispList::AddCell( scColumn* col ) { scAssert( !FindCell( col ) ); scColRedisplay colredisp( col, col->GetAPPName() ); AppendData( (ElementPtr)&colredisp ); }
void PCL6Writer::SetSourceTxMode(Transparency transparency) { AppendData((uint8)transparency); AppendAttribute(kTxMode); AppendOperator(kSetSourceTxMode); }
void CDialogTemplate::AddEditBox(LPCSTR caption, DWORD style, DWORD exStyle, int x, int y, int w, int h, WORD id) { AddStandardComponent(0x0081, caption, style, exStyle, x, y, w, h, id); WORD creationDataLength = 0; AppendData(&creationDataLength, sizeof(WORD)); }
void SourceBuffer::AppendBuffer(const ArrayBufferView& aData, ErrorResult& aRv) { MOZ_ASSERT(NS_IsMainThread()); MSE_API("AppendBuffer(ArrayBufferView)"); aData.ComputeLengthAndData(); AppendData(aData.Data(), aData.Length(), aRv); }
void PCL6Writer::SetColorSpace(ColorSpace colorSpace) { AppendData((uint8)colorSpace); AppendAttribute(kColorSpace); AppendOperator(kSetColorSpace); }
void PCL6Writer::SetROP(uint8 rop) { AppendData((uint8)rop); AppendAttribute(kROP3); AppendOperator(kSetROP); }
void CStaticLearningEngine::SetData(int dim, const CEvidence * const* pEvidences) { m_critValue.clear(); m_Vector_pEvidences.clear(); ClearStatisticData(); AppendData(dim, pEvidences); m_numberOfAllEvidences=m_Vector_pEvidences.size(); }
//==================================================================================================================== // Transform temp data as a normal block (filling it will null sound to complet block) //==================================================================================================================== void cSoundBlockList::UseLatestData() { // Use data in TempData to create a latest block if (CurrentTempSize>0) { int8_t *EndData=(int8_t *)av_malloc(SoundPacketSize+8); memset(EndData,0,SoundPacketSize+8); AppendData(0,(int16_t *)EndData,SoundPacketSize-CurrentTempSize); av_free(EndData); } }
// add rubi data and sort the data BOOL scRubiArray::AddRubiData( scRubiData& rd ) { if ( IsRubiData( rd.fStartOffset, rd.fEndOffset ) ) return false; AppendData( (ElementPtr)&rd ); QuickSort( rubi_sort ); return true; }
void AddListBox(LPCSTR caption, DWORD style, DWORD exStyle, int x, int y, int w, int h, WORD id) { AddStandardComponent(0x0083, caption, style, exStyle, x, y, w, h, id); WORD creationDataLength = sizeof(WORD) + 5 * sizeof(WCHAR); AppendData(&creationDataLength, sizeof(WORD)); AppendString("TEST"); }
void CBayesLearningEngine::SetData( int size, const CEvidence* const* pEvidencesIn ) { //clear previously set data. Clear learning data m_Vector_pEvidences.clear(); AppendData(size, pEvidencesIn); ClearStatisticData(); m_numberOfAllEvidences = m_Vector_pEvidences.size(); m_numberOfLearnedEvidences = 0; }
void MaterialShellObject::AppendData(const std::vector<glm::vec3>& vertices, const std::vector<glm::ivec3>& indices, const Material& material) { // Calculate and copy normals std::vector<glm::vec3> normals(vertices.size(), glm::vec3(0.0, 0.0, 0.0)); CalculateNormals(vertices, indices, normals); AppendData(vertices, normals, indices, material); }
//private int KNetServer::Receive(unsigned long nId) { //获得数据 size_t nDataLen = 0; TRoleNetMsg *pMsg; pMsg =(TRoleNetMsg*) m_pNetServer->GetPackFromClient(nId, nDataLen); if (nDataLen == 0 || pMsg == NULL) return 0; return AppendData(nId, pMsg, nDataLen); }
void CFX_SAXReader::ParseCommentContent() { if (m_CurByte == '-') { m_pCommentContext->m_iTailCount++; } else if (m_CurByte == '>' && m_pCommentContext->m_iTailCount == 2) { m_iDataLength = m_iDataPos; m_iDataPos = 0; if (m_pHandler) { NotifyTargetData(); } Pop(); m_eMode = FX_SAXMODE_Text; } else { while (m_pCommentContext->m_iTailCount > 0) { AppendData('-'); m_pCommentContext->m_iTailCount--; } AppendData(m_CurByte); } }
void CFuncInfoArr::AppendData( CLogicInt nFuncLineCRLF, //!< 関数のある行(CRLF単位) CLayoutInt nFuncLineLAYOUT, //!< 関数のある行(折り返し単位) const NOT_TCHAR* pszFuncName, //!< 関数名 int nInfo, //!< 付加情報 int nDepth //!< 深さ ) { AppendData(nFuncLineCRLF,nFuncLineLAYOUT,to_tchar(pszFuncName),nInfo,nDepth); }
void AppendString(LPCSTR string) { int length = MultiByteToWideChar(CP_ACP, 0, string, -1, NULL, 0); WCHAR* wideString = (WCHAR*)malloc(sizeof(WCHAR) * length); MultiByteToWideChar(CP_ACP, 0, string, -1, wideString, length); AppendData(wideString, length * sizeof(WCHAR)); free(wideString); }
void PCL6Writer::EndPage(uint16 copies) { // if (copies != 1) { AppendData(copies); AppendAttribute(kPageCopies); // } AppendOperator(kEndPage); }
void CFuncInfoArr::AppendData( CLogicInt nFuncLineCRLF, //!< 関数のある行(CRLF単位) CLayoutInt nFuncLineLAYOUT, //!< 関数のある行(折り返し単位) const TCHAR* pszFuncName, //!< 関数名 int nInfo, //!< 付加情報 int nDepth //!< 深さ ) { AppendData(nFuncLineCRLF,CLogicInt(1),nFuncLineLAYOUT,CLayoutInt(1),pszFuncName,NULL,nInfo,nDepth); return; }
void PCL6Writer::BeginPage(Orientation orientation, MediaSize mediaSize, MediaSource mediaSource, DuplexPageMode duplexPageMode, MediaSide mediaSide) { AppendData((uint8)orientation); AppendAttribute(kOrientation); AppendData((uint8)mediaSize); AppendAttribute(kMediaSize); AppendData((uint8)mediaSource); AppendAttribute(kMediaSource); AppendData((uint8)duplexPageMode); AppendAttribute(kDuplexPageMode); AppendData((uint8)mediaSide); AppendAttribute(kDuplexPageSide); AppendOperator(kBeginPage); }
void PCL6Writer::BeginImage(ColorMapping colorMapping, ColorDepth colorDepth, uint16 sourceWidth, uint16 sourceHeight, uint16 destWidth, uint16 destHeight) { AppendData((uint8)colorMapping); AppendAttribute(kColorMapping); AppendData((uint8)colorDepth); AppendAttribute(kColorDepth); AppendData(sourceWidth); AppendAttribute(kSourceWidth); AppendData(sourceHeight); AppendAttribute(kSourceHeight); AppendDataXY(destWidth, destHeight); AppendAttribute(kDestinationSize); AppendOperator(kBeginImage); }
void AddStandardComponent(WORD type, LPCSTR caption, DWORD style, DWORD exStyle, int x, int y, int w, int h, WORD id, LPSTR font = NULL, WORD fontSize = 8) { DLGITEMTEMPLATE item; // DWORD align the beginning of the component data AlignData(sizeof(DWORD)); item.style = style; if(font != NULL) { item.style |= DS_SETFONT; } item.x = (short)x; item.y = (short)y; item.cx = (short)w; item.cy = (short)h; item.id = id; item.dwExtendedStyle = exStyle; AppendData(&item, sizeof(DLGITEMTEMPLATE)); WORD preType = 0xFFFF; AppendData(&preType, sizeof(WORD)); AppendData(&type, sizeof(WORD)); AppendString(caption); if(font != NULL) { AppendData(&fontSize, sizeof(WORD)); AppendString(font); } // Increment the component count dialogTemplate->cdit++; }
void PCL6Writer::ReadImage(Compression compression, uint16 startLine, uint16 blockHeight, uint8 padBytes) { AppendData(startLine); AppendAttribute(kStartLine); AppendData(blockHeight); AppendAttribute(kBlockHeight); AppendData((uint8)compression); AppendAttribute(kCompressMode); if (padBytes < 1 || padBytes > 4) { // XXX throw exception return; } if (padBytes != 4) { AppendData((uint8)padBytes); AppendAttribute(kPadBytesMultiple); } AppendOperator(kReadImage); }
CDialogTemplate::CDialogTemplate(LPCSTR caption, DWORD style, int x, int y, int w, int h, LPCSTR font, WORD fontSize) { usedBufferLength = sizeof(DLGTEMPLATE); totalBufferLength = usedBufferLength; dialogTemplate = (DLGTEMPLATE*)malloc(totalBufferLength); dialogTemplate->style = style; if (font != NULL) { dialogTemplate->style |= DS_SETFONT; } dialogTemplate->x = x; dialogTemplate->y = y; dialogTemplate->cx = w; dialogTemplate->cy = h; dialogTemplate->cdit = 0; dialogTemplate->dwExtendedStyle = 0; // Assume no menu or special class AppendData(_T("\0"), 2); AppendData(_T("\0"), 2); // Add the dialog's caption to the template AppendString(caption); if (font != NULL) { AppendData(&fontSize, sizeof(WORD)); AppendString(font); } }
void AddComponent(LPCSTR type, LPCSTR caption, DWORD style, DWORD exStyle, int x, int y, int w, int h, WORD id) { DLGITEMTEMPLATE item; item.style = style; item.x = (short)x; item.y = (short)y; item.cx = (short)w; item.cy = (short)h; item.id = id; item.dwExtendedStyle = exStyle; AppendData(&item, sizeof(DLGITEMTEMPLATE)); AppendString(type); AppendString(caption); WORD creationDataLength = 0; AppendData(&creationDataLength, sizeof(WORD)); // Increment the component count dialogTemplate->cdit++; }
/*! 配列の最後にデータを追加する @date 2002.04.01 YAZAKI 深さ導入 */ void CFuncInfoArr::AppendData( CLogicInt nFuncLineCRLF, //!< 関数のある行(CRLF単位) CLogicInt nFuncColCRLF, //!< 関数のある桁(CRLF単位) CLayoutInt nFuncLineLAYOUT, //!< 関数のある行(折り返し単位) CLayoutInt nFuncColLAYOUT, //!< 関数のある桁(折り返し単位) const TCHAR* pszFuncName, //!< 関数名 const TCHAR* pszFileName, //!< ファイル名 int nInfo, //!< 付加情報 int nDepth //!< 深さ ) { CFuncInfo* pcFuncInfo = new CFuncInfo( nFuncLineCRLF, nFuncColCRLF, nFuncLineLAYOUT, nFuncColLAYOUT, pszFuncName, pszFileName, nInfo ); pcFuncInfo->m_nDepth = nDepth; AppendData( pcFuncInfo ); return; }
void CFX_SAXReader::ParseTagName() { if (m_CurByte < 0x21 || m_CurByte == '/' || m_CurByte == '>' || m_CurByte == '?') { m_iDataLength = m_iDataPos; m_iDataPos = 0; if (m_pHandler) { NotifyEnter(); } if (m_CurByte < 0x21) { m_eMode = FX_SAXMODE_TagAttributeName; } else if (m_CurByte == '/' || m_CurByte == '?') { m_ePrevMode = m_eMode; m_eMode = FX_SAXMODE_TagMaybeClose; } else { if (m_pHandler) { NotifyBreak(); } m_eMode = FX_SAXMODE_Text; } } else { AppendData(m_CurByte); } }