I would like to expose an ATL COM collection of CMainClass objects such that it can be accessed by a C#, VB, or C++ client.
I don't have a problem setting up the collection itself, but I don't know how to allow the COM clients access to classes A, B, and C. Should I make A, B, & C COM objects with the ones containing a std::list<> each ATL collections in their own right?
Is there an easier way to do this?!?!
Thanks, PaulH
class C
{
public:
// get/set functions...
protected:
std::string str1_;
std::list< std::string > list1_;
};
class A
{
public:
// get/set functions...
protected:
std::list< C > list1_;
};
class B
{
public:
// get/set functions...
protected:
std::string str1_;
std::string str2_;
};
class CMainClass
{
public:
void GetA( A* a ) const;
void SetA( const A& a );
void GetB( B* b ) const;
void SetB( const B& b );
protected:
A a_;
B b_;
};