A
Audrius
Hello,
what is the best solution to hold the collection of Objects. Lets say I
have such class:
class Task{
private:
CString title;
CString description;
CString owner;
CString date;
CString state;
public:
/* some public methods */
Task();
~Task();
};
This class is used only to hold the data and perform no business logic.
And I have another class, where I want to hold public _static_ variable
of Tasks' collection. It's public and static because I use this class
as mediator in my application. So what collection "manager" should I
use (vector, CObjList, ...)? And can anyone write me working class
"TaskList", where I could have list of Task objects with static
add(Task) and get(int) methods using any suitable collection "manager".
Thank you,
Audrius
what is the best solution to hold the collection of Objects. Lets say I
have such class:
class Task{
private:
CString title;
CString description;
CString owner;
CString date;
CString state;
public:
/* some public methods */
Task();
~Task();
};
This class is used only to hold the data and perform no business logic.
And I have another class, where I want to hold public _static_ variable
of Tasks' collection. It's public and static because I use this class
as mediator in my application. So what collection "manager" should I
use (vector, CObjList, ...)? And can anyone write me working class
"TaskList", where I could have list of Task objects with static
add(Task) and get(int) methods using any suitable collection "manager".
Thank you,
Audrius