Generic class syntax help needed

  • Thread starter Thread starter RYoung
  • Start date Start date
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
 
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
 
Back
Top