Example #1
0
    virtual void CopyObject(CObjectStreamCopier& copier,
                            const CObjectTypeInfo& passed_info)
    {
        cout << copier.In().GetStackPath() << endl;
#if 1
        DefaultCopy(copier, passed_info);

#else
#if 1
// or skip the object
        copier.In().SkipObject(passed_info.GetTypeInfo());
#endif
#if 0
// or read object
        CSeq_annot annot;
        copier.In().ReadObject(&annot, CSeq_annot::GetTypeInfo());
        cout << MSerial_AsnText << annot << endl;
// and maybe write it as well
        copier.Out().WriteObject(&annot, CSeq_annot::GetTypeInfo());
#endif
#if 0
// or read object and write it
        CObjectInfo oi(passed_info.GetTypeInfo());
        copier.In().ReadObject(oi);
        copier.Out().WriteObject(oi);
#endif
        
        // typeinfo of the object (Seq-annot)
        TTypeInfo ti = passed_info.GetTypeInfo();
#endif
    }
Example #2
0
 static bool Match(const CObjectTypeInfo& type, TTypeInfo typeInfo)
 {
     return type.GetTypeInfo()->IsType(typeInfo);
 }
Example #3
0
void CReadObjectHook::DefaultSkip(CObjectIStream& in,
                                  const CObjectTypeInfo& object)
{
    object.GetTypeInfo()->DefaultSkipData(in);
}
Example #4
0
void CCopyObjectHook::DefaultCopy(CObjectStreamCopier& copier,
                                  const CObjectTypeInfo& type)
{
    type.GetTypeInfo()->DefaultCopyData(copier);
}
Example #5
0
void CSkipObjectHook::DefaultSkip(CObjectIStream& in,
                                  const CObjectTypeInfo& type)
{
    type.GetTypeInfo()->DefaultSkipData(in);
}