Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Topic |
Prev | Next |
Example Use of Collection Classes
Consider this source code:
class Class1
{
public:
Class1();
virtual ~Class1();
CMap<CString,LPCTSTR,Class3*,Class3*> att;
Vector<Class2> *att1;
TemplatedClass<class1,class2> *att2;
CList<Class4> *att3;
};
class Class2
{
public:
Class2();
virtual ~Class2();
};
class Class3
{
public:
Class3();
virtual ~Class3();
};
class Class4
{
public:
Class4();
virtual ~Class4();
};
template<class TParam1, class TParam2>
class TemplatedClass
{
public:
TemplatedClass() {
}
virtual ~TemplatedClass() {
}
};
If this code is imported into the system with default import options, this diagram is generated:
If, however, you enter the value 'CList<#Type#>' in the 'Additional Collection Classes' field in the model-specific language options page (C#, Java, C++), an Association connector is also created to Class 4:
Learn more