Generic class syntax help needed

R

RYoung

Hello all,

Given this C# generic class definition:

class Command<Key, Data>
{
BerkeleyParameter<Key> key;
BerkeleyParameter<Data> data;

public void AddParameters(BerkeleyParameter<Key> key,
BerkeleyParameter<Data> data)
{
this.key = key;
this.data = data;
}
}

Can someone please show me the C++/CL definition? The BerkeleyParameter
field is also a generic class which I've already got as the following:

generic <class T>
public ref class BerkeleyParameter
{
private:
T _value;

public:
array<unsigned char>^ Serialize();
void Deserialize(array<unsigned char>^ buffer);

public:
BerkeleyParameter(T t);

property T Value{ T get(); void set(T value); }
};

Any help is appreciated,
Ron
 
G

Guest

Our Instant C++ (C# Edition) C# to C++ converter produces:

generic<typename Key, typename Data>
private ref class Command
{
private:
BerkeleyParameter<Key> ^key;
BerkeleyParameter<Data> ^data;

public:
void AddParameters(BerkeleyParameter<Key> ^key, BerkeleyParameter<Data>
^data)
{
this->key = key;
this->data = data;
}
};
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top