D002199
January 27th, 2003, 05:29 AM
Hi,
Can some of you give me some tips about how to build an application framework?
What I have done is;
(1) Define a base class with some virtual functions (abstract class)
(2) Derive a class from base and implement all the functions
(3) Build implementation into a static library
(3) Provide a header file which include only base class & library to client application (I want to hide all the impelmentation details from client application.
(4) in client application, declare a void pointer
(5) in client app, try to downcast pointer to derived class in library (no compiling error)
(6) make a call to functions (e.g ptr->method1, compilig error ???)
I know some wrong, but don't know where problem is? Is it the right way to build an application framework?
Please help,
Thanks in advance,
Can some of you give me some tips about how to build an application framework?
What I have done is;
(1) Define a base class with some virtual functions (abstract class)
(2) Derive a class from base and implement all the functions
(3) Build implementation into a static library
(3) Provide a header file which include only base class & library to client application (I want to hide all the impelmentation details from client application.
(4) in client application, declare a void pointer
(5) in client app, try to downcast pointer to derived class in library (no compiling error)
(6) make a call to functions (e.g ptr->method1, compilig error ???)
I know some wrong, but don't know where problem is? Is it the right way to build an application framework?
Please help,
Thanks in advance,