Example Code
// Association or non-composite Aggregation
// Forward declarations
#include <map>
using namespace std;
// Forward declarations
class Class2;
class Class1
{
Private:
// Private Roles
map< start_qualifier, Class2* > rClass2;
};
// Composite Aggregation
// Forward declarations
#include <map>
using namespace std;
#include "Class2.h"
class Class1
{
private:
// private roles
map< start_qualifier, Class2 > rClass2;
};
Was this helpful?