Hi,

When I tried to generate C++ classes for the following schema, all the
namespace keywords are ignored.[
     {
                "name": "Kind", "type": "enum", "namespace" : "A","symbols": 
["FOO","BAZ"]
         },

     {
                "name": "MD5", "namespace" : "B", "type": "fixed", "size": 16
         },

     {   "name": "MyRecord", "type": "record","namespace" : "B",
      "fields": [
          {"name": "kind", "type": "Kind", "order": "descending"},
          {"name": "name", "type": "string", "order": "ignore"},
          {"name": "longType", "type": "int"},
          {"name": "floatType", "type": "long"},
          {"name": "doubleType", "type": "float"},
          {"name": "extra", "type": "string"},
          {"name": "hash", "type": "MD5"},
          {"name": "mapTest", "type": {"type": "map", "values": "Kind"}},
          {"name": "unionTest1", "type": "string"},
          {"name": "unionTest2", "type": ["Kind", "null"]},
          {"name": "arrayTest", "type": {"type": "array", "items": "long"}}
      ]
     }
]

It generated MyRecord struct as below. 

struct MyRecord {

    Kind kind;
    std::string name;
    int32_t longType;
    int64_t floatType;
    float doubleType;
    std::string extra;
    MD5 hash;
    Map_of_Kind mapTest;
    std::string unionTest1;
    Union_of_Kind_null unionTest2;
    Array_of_long arrayTest;
};

But I am execting Kind and MD5 members to be declared with their namespaces
like A::Kind Kind kind;B::MD5 hash;

I am receving a message from Java system and does desrialize work on C++
side?
Does C++ implementation of Avro support namespace? or Am I missing any
thing?
Let me know...

Thanks,
Sri.


--
View this message in context: 
http://apache-avro.679487.n3.nabble.com/Namespace-support-in-C-tp2936004p2936004.html
Sent from the Avro - Developers mailing list archive at Nabble.com.

Reply via email to