Beispiel #1
0
BEGIN_NCBI_SCOPE

TObjectPtr CStaticDataType::CreateDefault(const CDataValue& ) const
{
    NCBI_THROW(CDatatoolException, eNotImplemented,
                 GetASNKeyword() + string(" default not implemented"));
}
Beispiel #2
0
void CDataMemberContainerType::PrintASN(CNcbiOstream& out, int indent) const
{
    PrintASNTag(out);
    out << GetASNKeyword() << " {";
    ++indent;
    ITERATE ( TMembers, i, m_Members ) {
        PrintASNNewLine(out, indent);
        const CDataMember& member = **i;
        TMembers::const_iterator next = i;
        bool last = ++next == m_Members.end();
        member.PrintASN(out, indent, last);
    }
Beispiel #3
0
void CEnumDataType::PrintASN(CNcbiOstream& out, int indent) const
{
    out << GetASNKeyword() << " {";
    ++indent;
    ITERATE ( TValues, i, m_Values ) {
        PrintASNNewLine(out, indent);
        TValues::const_iterator next = i;
        bool last = ++next == m_Values.end();

        bool oneLineComment = i->GetComments().OneLine();
        if ( !oneLineComment )
            i->GetComments().PrintASN(out, indent);
        out << CDataTypeModule::ToAsnId(i->GetName()) << " (" << i->GetValue() << ")";
        if ( !last )
            out << ',';
        if ( oneLineComment ) {
            out << ' ';
            i->GetComments().PrintASN(out, indent, CComments::eOneLine);
        }
    }
Beispiel #4
0
void CAnyContentDataType::PrintASN(CNcbiOstream& out, int /* indent */) const
{
    out << GetASNKeyword();
}
Beispiel #5
0
void CStaticDataType::PrintASN(CNcbiOstream& out, int /*indent*/) const
{
    out << GetASNKeyword();
}