E:/mywork/1.7 sp1/ginfo/client/SRC/skdesigner/dsgquerydlg. H. (295) : error C2259: ‘CDsgFormatDataMgrDlg’ : Always instantiate the abstract class due to the following members:
e:/mywork/1.7 sp1/ginfo/client/SRC/skdesigner/dsgformatdatamgrdlg. H (14) : see declaration of ‘CDsgFormatDataMgrDlg’
Reason for error:
An implementation class inherits an abstract base class, but does not implement all the methods in the abstract base class.
Can be similarly implemented:
Virtual Void EnableControl(PSKOPEROBJECT Lpoo, BOOL bEnable) {}//
Code example:
class CDsgFormatDataMgrDlg : public CDialogImpl< CDsgFormatDataMgrDlg> ,
public ISkBusinessEngineSink// abstract base class
{
public:
enum {IDD = IDD_FORMATDATAMGR_DLG};
CDsgFormatDataMgrDlg ();
virtual ~ CDsgFormatDataMgrDlg ();
virtual BOOL PreTranslateMessage(MSG* pMsg);
…
}
The class ISkBusinessEngineSink
{
public:
virtual void HandleOneCSObject (LPCTSTR lpszName) {}
virtual BOOL HandleUpdateCalendarResult (int nType, PCALENDAREVENT lpce,
DWORD dwClientTmpId, BOOL bRet, DWORD dwErrorCode) {return FALSE; }
virtual BOOL HandleUpdateDesktopResult (int nType, PDESKTOPITEM lpdi,
DWORD dwClientTmpId, BOOL bRet, dwords dwErrorCode) = 0.
virtual void HandleHotBUList(PHOTBU LPHB, int nCount) {}
virtual void OnDBFuncReady(BOOL bReady) = 0;
virtual void OnDBViewReady(BOOL bReady) = 0;
virtual void OnSNReady(BOOL bReady) = 0;
virtual void OnTableReady(BOOL bReady) = 0;
…
}
Methods in the abstract base class must fully implement…
Appendix:
The choice of http://www.cnblogs.com/shenfx318/archive/2007/01/25/630760.html (abstract base classes and interfaces) and the difference between
http://www.cnblogs.com/TravelingLight/archive/2010/06/02/1750073.html (abstract base class for some of the problems)
http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Companion/cxx_crib/interfaces.html
(OO concepts and abstract classes and interfaces)
Read More:
- C++ Error: allocating an object of abstract class type
- Report error when using microwave “must either be declared abstract” abstract method “getWXPayDomain()” in WXPayConfig
- C# Member XXX cannot be accessed with an instance with an instance reference;qualify it with a type
- Abstract precautions
- C++:error C2228: left of ‘.str’ must have class/struct/union
- Error c2011: “a certain class”: redefinition of “class” type
- Andorid: Installation failed due to invalid APK file due to version mismatch
- The scan of annotations for web application [] could not be completed due to a stackoverflower error. Possible root causes include the low setting of – XSS and illegal circular inheritance dependencies. The class hierarchy being processed is
- C++: terminate called after throwing an instance of ‘std::length_error‘ (sort function cmp sorting rules problem)
- C++ ERROR redefinition of ‘class ***’
- c++ terminate called after throwing an instance of ‘std::system_error‘ what(): Unknown error -1
- Unit Android converts c# class to JSON file and reports an error
- Android “handler” is abstract; can’t be identified solution
- C++ foundation — clear/erase/pop of string class_back
- C + + error prototype for… Does not match any in class
- Error java.lang.IllegalArgumentException: Validation failed for query for method public abstract
- [Solved] failed to req API:/nacos/v1/ns/instance after all servers
- Git authentication failure solution, due to the problem of password modification
- Cannot read configuration file due to insufficient permissions
- Error c2951: template declaration can only be used at the global, namespace, or class scope. Error c2598: link specification must be at the global scope