[Webkit-unassigned] [Bug 34705] New: [BREWMP] Add utility functions to create a BREW instance without local variable declarations.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 8 08:02:50 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34705
Summary: [BREWMP] Add utility functions to create a BREW
instance without local variable declarations.
Product: WebKit
Version: 528+ (Nightly build)
Platform: Other
OS/Version: Other
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Template Framework
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: kwangyul.seo at gmail.com
It is too verbose to create a BREW instance. For example, to create a IFileMgr
instance, it takes three lines:
IFileMgr* fileMgr;
IShell* shell = reinterpret_cast<AEEApplet*>(GETAPPINSTANCE())->m_pIShell;
ISHELL_CreateInstance(shell, AEECLSID_FILEMGR,
reinterpret_cast<void**>(&fileMgr));
This pattern is repeated all over the code, so we need a shortcut here. Add a
template function to create a BREW instance in one line.
IFileMgr* fileMgr = createInstanceBrew<IFileMgr>(AEECLSID_FILEMGR);
This can be nicely combined with OwnPtrBrew.
OwnPtrBrew<IFileMgr> fileMgr(createInstanceBrew<IFileMgr>(AEECLSID_FILEMGR));
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list