S
shuisheng
Dear All,
I have a question, maybe simple, but it puzzles me a lot.
Assume I have a class
class CMyClass
{
public:
// Set a
void SetA( );
// Set b
void SetB( );
// Set c
void SetC( );
// Operation A
void OpA( );
// Operation B
void OpB( );
// Operation C
void OpC( );
};
There is some order requirement in using those functions due to the
class design. For the settings, we must first Set A, then B and C. And
similar to the operations. But the users don't know it. How can I make
a good interface or class design to avoid such problem?
Thank you for your help.
Shuisheng.
I have a question, maybe simple, but it puzzles me a lot.
Assume I have a class
class CMyClass
{
public:
// Set a
void SetA( );
// Set b
void SetB( );
// Set c
void SetC( );
// Operation A
void OpA( );
// Operation B
void OpB( );
// Operation C
void OpC( );
};
There is some order requirement in using those functions due to the
class design. For the settings, we must first Set A, then B and C. And
similar to the operations. But the users don't know it. How can I make
a good interface or class design to avoid such problem?
Thank you for your help.
Shuisheng.