Re: prepare_create_table wrapping - part2



ok, good to know. I will try to build a class inside ServerOperation. What I found, traits class needs a copy constructor for CppType method. I don't see a simple way to overcome this just by using:
typedef GdaServerOperationCreateTableArg CreateTableArg

and traits class.

Probably a full class should be built. Thanks.


-Pavlo Solntsev


On Fri, May 12, 2017 at 6:32 AM, Kjell Ahlstedt <kjellahlstedt gmail com> wrote:

I don't think it's possible to use _CLASS_GENERIC or any of the other _CLASS_* macros in a class within another class.


Den 2017-05-11 kl. 15:21, skrev Pavlo Solntsev:
Dear Kjell.

My initial idea was to wrap struct GdaServerOperationCreateTableArg as a class inside the Gda::ServerOperatio. It should look like: Gda::ServerOperation::CreateTableArg. To do so I used _CLASS_GENERIC macros. I wasn't successful. It may be implemented manually, but in that case, it will not be wrap. I see not option now how to transform C-style struct to C++ class. I am talking about struct to class conversion because in C API there are a set of functions that can logically be wrapped as methods for C++ class. However, simple macros will not give enough flexibility for expansion the class. Do you think it is a good idea to write a class from scratch (without using macroses) based on C API? I may try this route but I want to make sure it is not against *mm rules of porting. 

I will play with your suggestion. 

Thanks,

-Pavlo Solntsev






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]