NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
CObjectOStreamAsnBinary Class Reference

Search Toolkit Book for CObjectOStreamAsnBinary

CObjectOStreamAsnBinary --. More...

#include <serial/objostrasnb.hpp>

+ Inheritance diagram for CObjectOStreamAsnBinary:
+ Collaboration diagram for CObjectOStreamAsnBinary:

List of all members.

Public Member Functions

 CObjectOStreamAsnBinary (CNcbiOstream &out, EFixNonPrint how=eFNP_Default)
 Constructor.
 CObjectOStreamAsnBinary (CNcbiOstream &out, bool deleteOut, EFixNonPrint how=eFNP_Default)
 Constructor.
 CObjectOStreamAsnBinary (CNcbiOstream &out, EOwnership deleteOut, EFixNonPrint how=eFNP_Default)
 Constructor.
virtual ~CObjectOStreamAsnBinary (void)
 Destructor.
virtual void WriteEnum (const CEnumeratedTypeValues &values, TEnumValueType value)
virtual void CopyEnum (const CEnumeratedTypeValues &values, CObjectIStream &in)
void WriteNull (void)
virtual void WriteAnyContentObject (const CAnyContentObject &obj)
virtual void CopyAnyContentObject (CObjectIStream &in)
virtual void WriteBitString (const CBitString &obj)
virtual void CopyBitString (CObjectIStream &in)
void WriteLongTag (ETagClass tag_class, ETagConstructed tag_constructed, TLongTag tag_value)
void WriteClassTag (TTypeInfo typeInfo)
void WriteLongLength (size_t length)
void SetCStyleBigInt (bool set=true)
bool GetCStyleBigInt (void) const

Protected Member Functions

virtual void WriteBool (bool data)
virtual void WriteChar (char data)
virtual void WriteInt4 (Int4 data)
virtual void WriteUint4 (Uint4 data)
virtual void WriteInt8 (Int8 data)
virtual void WriteUint8 (Uint8 data)
virtual void WriteFloat (float data)
virtual void WriteDouble (double data)
void WriteDouble2 (double data, unsigned digits)
virtual void WriteCString (const char *str)
virtual void WriteString (const string &s, EStringType type=eStringTypeVisible)
virtual void WriteStringStore (const string &s)
virtual void CopyString (CObjectIStream &in, EStringType type=eStringTypeVisible)
virtual void CopyStringStore (CObjectIStream &in)
void CopyStringValue (CObjectIStreamAsnBinary &in, bool checkVisible=false)
virtual void WriteNullPointer (void)
virtual void WriteObjectReference (TObjectIndex index)
virtual void WriteOtherBegin (TTypeInfo typeInfo)
virtual void WriteOtherEnd (TTypeInfo typeInfo)
virtual void WriteOther (TConstObjectPtr object, TTypeInfo typeInfo)
virtual void BeginNamedType (TTypeInfo namedTypeInfo)
virtual void EndNamedType (void)
virtual void BeginContainer (const CContainerTypeInfo *containerType)
virtual void EndContainer (void)
virtual void BeginClass (const CClassTypeInfo *classInfo)
virtual void EndClass (void)
virtual void BeginClassMember (const CMemberId &id)
virtual void EndClassMember (void)
virtual void BeginChoice (const CChoiceTypeInfo *choiceType)
virtual void EndChoice (void)
virtual void BeginChoiceVariant (const CChoiceTypeInfo *choiceType, const CMemberId &id)
virtual void EndChoiceVariant (void)
virtual void BeginBytes (const ByteBlock &block)
virtual void WriteBytes (const ByteBlock &block, const char *bytes, size_t length)
virtual void BeginChars (const CharBlock &block)
virtual void WriteChars (const CharBlock &block, const char *chars, size_t length)

Private Member Functions

void WriteByte (Uint1 byte)
template<typename T >
void WriteBytesOf (const T &value, size_t count)
void WriteBytes (const char *bytes, size_t size)
void WriteShortTag (ETagClass tag_class, ETagConstructed tag_constructed, ETagValue tag_value)
void WriteSysTag (ETagValue tag)
void WriteStringTag (EStringType type)
void WriteTag (ETagClass tag_class, ETagConstructed tag_constructed, TLongTag tag_value)
void WriteIndefiniteLength (void)
void WriteShortLength (size_t length)
void WriteLength (size_t length)
void WriteEndOfContent (void)
void WriteNumberValue (Int4 data)
void WriteNumberValue (Int8 data)
void WriteNumberValue (Uint4 data)
void WriteNumberValue (Uint8 data)

Static Private Member Functions

static TByte GetUTF8StringTag (void)
static TByte MakeUTF8StringTag (void)

Private Attributes

bool m_CStyleBigInt
bool m_SkipNextTag
bool m_AutomaticTagging

Friends

class CObjectOStream::AsnIo

Detailed Description

CObjectOStreamAsnBinary --.

Encode serial object using ASN binary format (BER)

Definition at line 56 of file objostrasnb.hpp.


Constructor & Destructor Documentation

Constructor.

Parameters:
outOutput stream
howDefines how to fix unprintable characters in ASN VisiableString

Definition at line 72 of file objostrasnb.cpp.

References CObjectOStream::FixNonPrint().

Constructor.

Parameters:
outOutput stream
deleteOutwhen TRUE, the output stream will be deleted automatically when the writer is deleted
howDefines how to fix unprintable characters in ASN VisiableString
Deprecated:
Use one with EOwnership enum instead

Definition at line 85 of file objostrasnb.cpp.

References CObjectOStream::FixNonPrint().

Constructor.

Parameters:
outOutput stream
deleteOutWhen eTakeOwnership, the output stream will be deleted automatically when the writer is deleted
howDefines how to fix unprintable characters in ASN VisiableString

Definition at line 99 of file objostrasnb.cpp.

References CObjectOStream::FixNonPrint().

Destructor.

Definition at line 113 of file objostrasnb.cpp.

References ERR_POST_X.


Member Function Documentation

void CObjectOStreamAsnBinary::BeginBytes ( const ByteBlock block) [protected, virtual]
void CObjectOStreamAsnBinary::BeginChars ( const CharBlock block) [protected, virtual]
void CObjectOStreamAsnBinary::BeginChoice ( const CChoiceTypeInfo choiceType) [protected, virtual]
void CObjectOStreamAsnBinary::BeginChoiceVariant ( const CChoiceTypeInfo choiceType,
const CMemberId id 
) [protected, virtual]
void CObjectOStreamAsnBinary::BeginClass ( const CClassTypeInfo classInfo) [protected, virtual]
void CObjectOStreamAsnBinary::BeginClassMember ( const CMemberId id) [protected, virtual]
virtual void CObjectOStreamAsnBinary::BeginContainer ( const CContainerTypeInfo containerType) [protected, virtual]

Implements CObjectOStream.

virtual void CObjectOStreamAsnBinary::BeginNamedType ( TTypeInfo  namedTypeInfo) [protected, virtual]

Reimplemented from CObjectOStream.

Implements CObjectOStream.

Definition at line 444 of file objostrasnb.cpp.

References CObjectOStream::fNotImplemented, and ThrowError.

Implements CObjectOStream.

Definition at line 524 of file objostrasnb.cpp.

References CObjectIStream::ReadBitString(), and WriteBitString().

void CObjectOStreamAsnBinary::CopyString ( CObjectIStream in,
EStringType  type = eStringTypeVisible 
) [protected, virtual]
void CObjectOStreamAsnBinary::CopyStringStore ( CObjectIStream in) [protected, virtual]
void CObjectOStreamAsnBinary::CopyStringValue ( CObjectIStreamAsnBinary in,
bool  checkVisible = false 
) [protected]
void CObjectOStreamAsnBinary::EndChoice ( void  ) [protected, virtual]

Reimplemented from CObjectOStream.

Definition at line 1566 of file objostrasnb.cpp.

References CObjectStack::TopFrame(), and WriteEndOfContent().

void CObjectOStreamAsnBinary::EndChoiceVariant ( void  ) [protected, virtual]
void CObjectOStreamAsnBinary::EndClass ( void  ) [protected, virtual]

Reimplemented from CObjectOStream.

Definition at line 1254 of file objostrasnb.cpp.

References CObjectStack::TopFrame(), and WriteEndOfContent().

void CObjectOStreamAsnBinary::EndClassMember ( void  ) [protected, virtual]

Reimplemented from CObjectOStream.

Definition at line 1286 of file objostrasnb.cpp.

References CObjectStackFrame::GetMemberId(), CObjectStack::TopFrame(), and WriteEndOfContent().

virtual void CObjectOStreamAsnBinary::EndContainer ( void  ) [protected, virtual]

Reimplemented from CObjectOStream.

virtual void CObjectOStreamAsnBinary::EndNamedType ( void  ) [protected, virtual]

Reimplemented from CObjectOStream.

Definition at line 127 of file objostrasnb.hpp.

Definition at line 293 of file objostrasnb.cpp.

References MakeUTF8StringTag().

Referenced by WriteStringTag().

void CObjectOStreamAsnBinary::SetCStyleBigInt ( bool  set = true) [inline]

Definition at line 123 of file objostrasnb.hpp.

Referenced by CAsnConverter< TCpp, TC >::ToC().

Implements CObjectOStream.

Definition at line 437 of file objostrasnb.cpp.

References CObjectOStream::fNotImplemented, and ThrowError.

void CObjectOStreamAsnBinary::WriteBool ( bool  data) [protected, virtual]

Implements CObjectOStream.

Definition at line 653 of file objostrasnb.cpp.

References CAsnBinaryDefs::eBoolean, WriteByte(), WriteShortLength(), and WriteSysTag().

void CObjectOStreamAsnBinary::WriteByte ( Uint1  byte) [inline, private]
void CObjectOStreamAsnBinary::WriteBytes ( const char *  bytes,
size_t  size 
) [inline, private]
void CObjectOStreamAsnBinary::WriteBytes ( const ByteBlock block,
const char *  bytes,
size_t  length 
) [protected, virtual]

Implements CObjectOStream.

Definition at line 1623 of file objostrasnb.cpp.

References WriteBytes().

template<typename T >
void CObjectOStreamAsnBinary::WriteBytesOf ( const T &  value,
size_t  count 
) [inline, private]

Definition at line 251 of file objostrasnb.cpp.

References WriteByte().

Referenced by WriteLongLength(), and WriteNumberValue().

void CObjectOStreamAsnBinary::WriteChar ( char  data) [protected, virtual]
void CObjectOStreamAsnBinary::WriteChars ( const CharBlock block,
const char *  chars,
size_t  length 
) [protected, virtual]
void CObjectOStreamAsnBinary::WriteCString ( const char *  str) [protected, virtual]
void CObjectOStreamAsnBinary::WriteDouble ( double  data) [protected, virtual]

Implements CObjectOStream.

Definition at line 779 of file objostrasnb.cpp.

References WriteDouble2().

void CObjectOStreamAsnBinary::WriteDouble2 ( double  data,
unsigned  digits 
) [protected]
void CObjectOStreamAsnBinary::WriteEndOfContent ( void  ) [inline, private]
void CObjectOStreamAsnBinary::WriteFloat ( float  data) [protected, virtual]

Reimplemented from CObjectOStream.

Definition at line 784 of file objostrasnb.cpp.

References WriteDouble2().

void CObjectOStreamAsnBinary::WriteIndefiniteLength ( void  ) [inline, private]
void CObjectOStreamAsnBinary::WriteInt4 ( Int4  data) [protected, virtual]

Implements CObjectOStream.

Definition at line 667 of file objostrasnb.cpp.

References CAsnBinaryDefs::eInteger, WriteNumberValue(), and WriteSysTag().

void CObjectOStreamAsnBinary::WriteInt8 ( Int8  data) [protected, virtual]
void CObjectOStreamAsnBinary::WriteLength ( size_t  length) [inline, private]

Definition at line 391 of file objostrasnb.cpp.

References WriteByte(), and WriteBytesOf().

Referenced by WriteLength().

void CObjectOStreamAsnBinary::WriteLongTag ( ETagClass  tag_class,
ETagConstructed  tag_constructed,
TLongTag  tag_value 
)
void CObjectOStreamAsnBinary::WriteNull ( void  ) [virtual]

Implements CObjectOStream.

Definition at line 431 of file objostrasnb.cpp.

References CAsnBinaryDefs::eNull, WriteShortLength(), and WriteSysTag().

void CObjectOStreamAsnBinary::WriteNullPointer ( void  ) [protected, virtual]

Implements CObjectOStream.

Definition at line 964 of file objostrasnb.cpp.

References CAsnBinaryDefs::eNull, WriteShortLength(), and WriteSysTag().

Definition at line 554 of file objostrasnb.cpp.

References data, WriteBytesOf(), and WriteShortLength().

Definition at line 581 of file objostrasnb.cpp.

References data, WriteByte(), WriteBytesOf(), and WriteShortLength().

Definition at line 617 of file objostrasnb.cpp.

References data, WriteByte(), WriteBytesOf(), and WriteShortLength().

void CObjectOStreamAsnBinary::WriteObjectReference ( TObjectIndex  index) [protected, virtual]
void CObjectOStreamAsnBinary::WriteOther ( TConstObjectPtr  object,
TTypeInfo  typeInfo 
) [protected, virtual]
void CObjectOStreamAsnBinary::WriteOtherBegin ( TTypeInfo  typeInfo) [protected, virtual]

Implements CObjectOStream.

Definition at line 970 of file objostrasnb.cpp.

References WriteClassTag(), and WriteIndefiniteLength().

void CObjectOStreamAsnBinary::WriteOtherEnd ( TTypeInfo  typeInfo) [protected, virtual]

Reimplemented from CObjectOStream.

Definition at line 976 of file objostrasnb.cpp.

References WriteEndOfContent().

void CObjectOStreamAsnBinary::WriteShortLength ( size_t  length) [inline, private]
void CObjectOStreamAsnBinary::WriteShortTag ( ETagClass  tag_class,
ETagConstructed  tag_constructed,
ETagValue  tag_value 
) [inline, private]
void CObjectOStreamAsnBinary::WriteString ( const string s,
EStringType  type = eStringTypeVisible 
) [protected, virtual]
void CObjectOStreamAsnBinary::WriteStringStore ( const string s) [protected, virtual]
void CObjectOStreamAsnBinary::WriteStringTag ( EStringType  type) [inline, private]
void CObjectOStreamAsnBinary::WriteSysTag ( ETagValue  tag) [inline, private]
void CObjectOStreamAsnBinary::WriteTag ( ETagClass  tag_class,
ETagConstructed  tag_constructed,
TLongTag  tag_value 
) [inline, private]
void CObjectOStreamAsnBinary::WriteUint4 ( Uint4  data) [protected, virtual]

Implements CObjectOStream.

Definition at line 673 of file objostrasnb.cpp.

References CAsnBinaryDefs::eInteger, WriteNumberValue(), and WriteSysTag().

void CObjectOStreamAsnBinary::WriteUint8 ( Uint8  data) [protected, virtual]

Friends And Related Function Documentation

friend class CObjectOStream::AsnIo [friend]

Definition at line 229 of file objostrasnb.hpp.


Member Data Documentation

Definition at line 262 of file objostrasnb.hpp.

Definition at line 260 of file objostrasnb.hpp.

Referenced by WriteInt8(), and WriteUint8().


The documentation for this class was generated from the following files:
Modified on Fri Mar 27 11:55:58 2015 by modify_doxy.py rev. 426318