Hi All,
Our project is build using VC++(MFC) and few files have structures
declared, few arrays of integers and char's and they are initialized
statically. We have few static member variables initialized with data as
below,
char* class::m_psz[] = {
"COL",
"FAC",
"MAS",
"NOL",
"SET"
};
TYPE_20 class::m_Defaults[] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0}
};
And have few typedefs as below,
typedef unsigned char TYPE_20[20];
My requirement is to use Protocol Buffer concept and achieve the above. So
How can i write the *.proto file (or the schema) to declare the static
array of integers and initialize values to it. And finally i need to
generate the *.cs (cshar file) out of it.
Below are my Basic knowledge on PB:
1) I created the classes, used "optional", "repeated" concepts.
2) created the code to declare 2d array.
3) how do I initialize the array at declaration time as it is done in C++?
Below is code of PB schema for 2d array without initialization(at static
time)
repeated DefaultsForTYPE_20 m_DefaultsForTYPE_20 = 1;
message DefaultsForTYPE_20{
optional bytes m_DefaultsForTYPE_20 = 1;
}
but how can i initialize data to it here?
Please provide me your suggestions, it's kind of Urgent for me.
Thanks in Advance
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.