1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
// Commands.h : header file
//
#if !defined(AFX_COMMANDS_H__2AB447BF_A834_11D3_AFED_444553540000__INCLUDED_)
#define AFX_COMMANDS_H__2AB447BF_A834_11D3_AFED_444553540000__INCLUDED_
#include "CcccDevStudioAddInTypes.h"
#include "DevStudioFileStore.h"
class CCommands :
public CComDualImpl<ICommands, &IID_ICommands, &LIBID_CcccDevStudioAddIn>,
public CComObjectRoot,
public CComCoClass<CCommands, &CLSID_Commands>
{
protected:
IApplication* m_pApplication;
public:
CCommands();
~CCommands();
void SetApplicationObject(IApplication* m_pApplication);
BEGIN_COM_MAP(CCommands)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(ICommands)
END_COM_MAP()
DECLARE_NOT_AGGREGATABLE(CCommands)
public:
STDMETHOD(configureAddIn)();
STDMETHOD(runCCCCOnWorkspaceFiles)();
STDMETHOD(runCCCCOnProjectFiles)();
STDMETHOD(runCCCCOnActiveFile)();
STDMETHOD(configureCCCCDevStudioAddIn)();
STDMETHOD(userCommand1)();
STDMETHOD(userCommand2)();
STDMETHOD(userCommand3)();
STDMETHOD(userCommand4)();
STDMETHOD(userCommand5)();
STDMETHOD(userCommand6)();
// ICommands methods
STDMETHOD(CcccDevStudioAddInCommandMethod)(THIS);
private:
// member variable for the full path to the CCCC binary
std::string m_CCCCName;
// member variable for the full path to the web browser
std::string m_BrowserName;
// A utility function to run a process, copying the process's console
// output to the Macro tab in the output pane.
void runProcess(const std::string& commandLine);
// A utility function to run CCCC on a list of files
void runCCCC(const FilenameList& fileList);
};
typedef CComObject<CCommands> CCommandsObj;
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_COMMANDS_H__2AB447BF_A834_11D3_AFED_444553540000__INCLUDED)
|