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


C++ TBuffer类代码示例

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


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

示例1: Streamer

void KVList::Streamer(TBuffer &R__b)
{
    // Backwards-compatible streamer

    UInt_t R__s, R__c;
    if (R__b.IsReading()) {
        Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
        if (R__v < 3) {
            // read in old KVList object which inherited from TList
            TList list;
            list.Streamer(R__b);
            TQObjSender fQObj;
            fQObj.Streamer(R__b);
            SetOwner(list.IsOwner()); // was list owner of objects ?
            list.SetOwner(kFALSE); // make sure old list doesn't delete objects when it goes out of scope
            TIter next(&list);
            TObject* obj;
            while ( (obj = next()) ) Add(obj);
            list.Clear();
        }
        else
            R__b.ReadClassBuffer(KVList::Class(),this,R__v,R__s,R__c);
    } else {
        R__b.WriteClassBuffer(KVList::Class(),this);
    }
}
开发者ID:pwigg,项目名称:kaliveda,代码行数:26,代码来源:KVList.cpp

示例2: Streamer

void KVReconstructedEvent::Streamer(TBuffer & R__b)
{
   //Stream an object of class KVReconstructedEvent.
   //We set the particles' angles depending on whether mean or random angles
   //are wanted (fMeanAngles = kTRUE or kFALSE)

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(KVReconstructedEvent::Class(), this);
      // if the multidetector object exists, update some informations
      // concerning the detectors etc. hit by this particle
      if ( gMultiDetArray ){
      	//set angles
      	KVReconstructedNucleus *par;
      	while ((par = GetNextParticle())) {
         	if (HasMeanAngles())
               par->GetAnglesFromStoppingDetector("mean");
         	else
                par->GetAnglesFromStoppingDetector("random");
         	//reconstruct fAnalStatus information for KVReconstructedNucleus
         	if (par->GetStatus() == 99)        //AnalStatus has not been set for particles in group
            	if (par->GetGroup())
                KVReconstructedNucleus::AnalyseParticlesInGroup( par->GetGroup() );
         }
      }
   } else {
      R__b.WriteClassBuffer(KVReconstructedEvent::Class(), this);
   }
}
开发者ID:pwigg,项目名称:kaliveda,代码行数:28,代码来源:KVReconstructedEvent.cpp

示例3: Streamer

//______________________________________________________________________________
void RunStat::Streamer(TBuffer &R__b)
{
   // Stream an object of class RunStat.

   UInt_t R__s, R__c;
   if (R__b.IsReading()) {
      Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
      TObject::Streamer(R__b);
      R__b >> RunNumber;
      R__b >> IsCalib;
      R__b >> Axis;
      R__b >> Source;
      R__b >> Z;
      R__b >> Site;
      R__b >> StartSec;
      R__b >> StartNano;
      R__b >> EndSec;
      R__b >> EndNano;
      R__b >> FullTime;
      R__b >> Veto1;
      R__b >> Veto2;
      R__b >> Veto3;
      R__b >> Veto4;
      R__b >> Scale1;
      R__b >> Scale2;
      R__b >> Scale3;
      R__b >> Scale4;
      R__b >> ScaleE1;
      R__b >> ScaleE2;
      R__b >> ScaleE3;
      R__b >> ScaleE4;
      R__b.CheckByteCount(R__s, R__c, RunStat::IsA());
   } else {
开发者ID:zhangzc11,项目名称:CPTV,代码行数:34,代码来源:RunStatDict.C

示例4: FireReceive

EnHandleResult CTcpPullServer::FireReceive(TSocketObj* pSocketObj, const BYTE* pData, int iLength)
{
	TBuffer* pBuffer = m_bfPool[pSocketObj->connID];
	ASSERT(pBuffer && pBuffer->IsValid());

	pBuffer->Cat(pData, iLength);

	return __super::FireReceive(pSocketObj, pBuffer->Length());
}
开发者ID:YonQua,项目名称:HP-Socket,代码行数:9,代码来源:TcpPullServer.cpp

示例5: DecryptSymmetrical

std::string DecryptSymmetrical(const std::string& key, const TBuffer& data) {
    assert(key.size() == AES::MAX_KEYLENGTH + AES::BLOCKSIZE);
    string result;
    result.resize(data.Size());
    CFB_Mode<AES>::Decryption cfbDecryption((byte*)key.data(), AES::MAX_KEYLENGTH,
                                            (byte*)key.data() + AES::MAX_KEYLENGTH);
    cfbDecryption.ProcessData((byte*)result.data(), (byte*)data.Data(), data.Size());
    return result;
}
开发者ID:GoBudokai,项目名称:ozifi,代码行数:9,代码来源:crypto.cpp

示例6: Streamer

//______________________________________________________________________________
void GmpNormAna::Streamer(TBuffer &R__b)
{
   // Stream an object of class GmpNormAna.

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(GmpNormAna::Class(),this);
   } else {
      R__b.WriteClassBuffer(GmpNormAna::Class(),this);
   }
}
开发者ID:xulongwu4,项目名称:gmp_tools,代码行数:11,代码来源:GmpNormAnaDict.C

示例7: SaveResult

 void SaveResult(xmlDocPtr doc, xsltStylesheetPtr stylesheet, TBuffer& to) {
     xmlOutputBufferPtr buf = xmlAllocOutputBuffer(NULL); // NULL means UTF8
     xsltSaveResultTo(buf, doc, stylesheet);
     if (buf->conv != NULL) {
         to.Assign((const char*)buf->conv->content, buf->conv->use);
     } else {
         to.Assign((const char*)buf->buffer->content, buf->buffer->use);
     }
     xmlOutputBufferClose(buf);
 }
开发者ID:Frankie-666,项目名称:tomita-parser,代码行数:10,代码来源:xsltransform.cpp

示例8: Set

//_______________________________________________________________________
void TArrayL64::Streamer(TBuffer &b)
{
    // Stream a TArrayL64 object.

    if (b.IsReading()) {
        Int_t n;
        b >> n;
        Set(n);
        b.ReadFastArray(fArray,n);
    } else {
开发者ID:cjpl,项目名称:rome,代码行数:11,代码来源:TArrayL64.cpp

示例9: Streamer

//______________________________________________________________________________
void Event::Streamer(TBuffer &R__b)
{
   // Stream an object of class Event.

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(Event::Class(),this);
   } else {
      R__b.WriteClassBuffer(Event::Class(),this);
   }
}
开发者ID:sakamoto-poteko,项目名称:Monicelli,代码行数:11,代码来源:EventDict.C

示例10: FireReceive

EnHandleResult CTcpPullAgent::FireReceive(TSocketObj* pSocketObj, const BYTE* pData, int iLength)
{
	TBuffer* pBuffer = nullptr;
	GetConnectionReserved(pSocketObj, (PVOID*)&pBuffer);
	ASSERT(pBuffer && pBuffer->IsValid());

	pBuffer->Cat(pData, iLength);

	return __super::FireReceive(pSocketObj, pBuffer->Length());
}
开发者ID:clearlylin,项目名称:HP-Socket,代码行数:10,代码来源:TcpPullAgent.cpp

示例11: Streamer

//______________________________________________________________________________
void RapidRun::Streamer(TBuffer &R__b)
{
   // Stream an object of class RapidRun.

   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(RapidRun::Class(),this);
   } else {
      R__b.WriteClassBuffer(RapidRun::Class(),this);
   }
}
开发者ID:gcowan,项目名称:mphys-parallel,代码行数:11,代码来源:rapidfit_dict.cpp

示例12: Streamer

//______________________________________________________________________________
void TMatlab::Streamer(TBuffer &R__b)
{
   // Stream an object of class TMatlab.

   UInt_t R__s, R__c;
   if (R__b.IsReading()) {
      Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
      TQQObject::Streamer(R__b);
      R__b >> fEvalReturn;
      R__b.CheckByteCount(R__s, R__c, TMatlab::IsA());
   } else {
开发者ID:mvancompernolle,项目名称:ai_project,代码行数:12,代码来源:MatlabDict.cpp

示例13: SendOfflineMessage

void TClient::SendOfflineMessage(const string& friendLogin, const TBuffer& data) {
    string response;
    response.resize(1);
    response[0] = RT_SendMessage;
    TOfflineMessage offlineMessage;
    offlineMessage.set_friendlogin(friendLogin);
    offlineMessage.set_encryptedmessage(data.Data(), data.Size());
    response += offlineMessage.SerializeAsString();
    response = EncryptSymmetrical(State.sessionkey(), Compress(response));
    UdtClient->Send(Serialize(response));
}
开发者ID:GoBudokai,项目名称:ozifi,代码行数:11,代码来源:client.cpp

示例14: Streamer

//___________________________________________________________________________________________
void KVIntegerList::Streamer(TBuffer& R__b)
{
//Streamer specifique
//l'écriture dans un fichier root se fait par l'intermédiaire de la classe TNamed
//seul, le nom et la partition et sa population sont enregistrées dans le fichier
//la lecture utilise aussi le streamer de TNamed, puis il y a un appel a la routine
// protected DeducePartitionFromTNamed() qui permet de recréer complètement l'objet KVIntegerList
   if (R__b.IsReading()) {
      R__b.ReadClassBuffer(TNamed::Class(), this);
      DeducePartitionFromTNamed();
   } else {
      SetTitle(Form("%d", GetPopulation()));
      R__b.WriteClassBuffer(TNamed::Class(), this);
   }
}
开发者ID:GiuseppePast,项目名称:kaliveda,代码行数:16,代码来源:KVIntegerList.cpp

示例15: Streamer

void KVINDRAReconEvent::Streamer(TBuffer & R__b)
{
   //Stream an object of class KVINDRAReconEvent.
   //We loop over the newly-read particles in order to set their
   //IsOK() status by comparison with the event's code mask.

    if (R__b.IsReading()) {
        R__b.ReadClassBuffer(KVINDRAReconEvent::Class(), this);
        KVINDRAReconNuc *par;
        while ((par = GetNextParticle())) {
            par->SetIsOK(CheckCodes(par->GetCodes()));
        }
    } else {
        R__b.WriteClassBuffer(KVINDRAReconEvent::Class(), this);
    }
}
开发者ID:pwigg,项目名称:kaliveda,代码行数:16,代码来源:KVINDRAReconEvent.cpp


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