Skip to content

MlbDev/ProtoBuf/GpbElementInfoMaxLengths.{c|h}pp #5

@mlbrock

Description

@mlbrock

Change the GpbElementInfoMaxLengths (and its use in anonymous namespaces in GpbElementInfo.cpp) to include GetCppName() and GetCppNameFull() .

GpbElementInfoNameFunc NameFuncList[GpbElementInfoMaxLengths::Count] = {
&GpbElementInfo::GetTypeNameFullPtr,
&GpbElementInfo::GetTypeNamePtr,
&GpbElementInfo::GetMemberNamePtr,
&GpbElementInfo::GetNamePtr,
&GpbElementInfo::GetNameFullPtr,
&GpbElementInfo::GetTypeFileNamePtr,
&GpbElementInfo::GetMemberFileNamePtr,
&GpbElementInfo::GetFileNamePtr,
&GpbElementInfo::GetLabelNamePtr
};

// ////////////////////////////////////////////////////////////////////////////
struct CompareByNameAndType {
bool operator () (const GpbElementInfo &lhs, const GpbElementInfo &rhs)
{
int cmp;

    if ((cmp = ::strcmp(lhs.GetMemberNamePtr(), rhs.GetMemberNamePtr())) == 0)
        cmp = ::strcmp(lhs.GetTypeNameFullPtr(), rhs.GetTypeNameFullPtr());

    return(cmp < 0);
}

};
// ////////////////////////////////////////////////////////////////////////////

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions