Skip to content

MlbDev/ProtoBuf #3

@mlbrock

Description

@mlbrock

Mv MlbDev/ProtoBuf/Messages to MlbDev/ProtoBuf/MessageTypes (same as MSVC++ Filter name)

Add and commit the existing MessageTypes .hpp and .cpp files (and add to the build!)

Copy the MlbDev/ProtoBuf/MessageTypes/CppOut .pb.h files to MlbDev/include/ProtoBuf/MessageTypes/.pb.h

Re-factor the approach taken to protobuf static initialization like:

// ////////////////////////////////////////////////////////////////////////////
struct Ensure_Mlb_ProtoBuf_Message_Types_Linked {
Ensure_Mlb_ProtoBuf_Message_Types_Linked()
:msg_list_()
{
std::vector msgs;

    msgs.push_back(GpbMessageSPtr(new ArraySInt32));
    msgs.push_back(GpbMessageSPtr(new ArrayInt32));

      // Et cetera...

    msg_list_.swap(msgs);
}

std::vector<GpbMessageSPtr> GetTypesList() const
{
    return(msg_list_);
}

std::vector<std::string> GetNamesList() const
{
    std::vector<std::string> name_list;

    name_list.reserve(msg_list_.size());

    for (std::size_t count_1 =  0; count_1 < msg_list_.size(); ++count_1)
        name_list.push_back(msg_list_[count_1]->GetTypeName());

    return(name_list);
}

private:
std::vector msg_list_;
} Ensure_Mlb_ProtoBuf_Message_Types_Linked_INSTANCE;

std::vector GetMessageTypesList();
std::vectorstd::string GetMessageTypesNameList();

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