Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

WWhizInterface2.h

Go to the documentation of this file.
00001 
00002 // $Workfile: WWhizInterface2.h $
00003 // $Archive: /WorkspaceWhiz/Src/Shared/WWhizInterface2.h $
00004 // $Date:: 1/03/01 12:13a  $ $Revision:: 34   $ $Author: Jjensen $
00006 // This source file is part of the Workspace Whiz! source distribution and
00007 // is Copyright 1997-2001 by Joshua C. Jensen.  (http://workspacewhiz.com/)
00008 //
00009 // The code presented in this file may be freely used and modified for all
00010 // non-commercial and commercial purposes so long as due credit is given and
00011 // this header is left intact.
00013 #pragma once
00014 
00015 struct WWhizReg;
00016 class WWhizProjectList;
00017 class WWhizProject;
00018 class WWhizFileList;
00019 class WWhizFile;
00020 class WWhizTagList;
00021 class WWhizTag;
00022 class WWhizConfig;
00023 class XmlData;
00024 
00029 class WWhizBase
00030 {
00031 public:
00035     virtual UINT GetRefCount() = 0;
00036 
00041     virtual UINT AddRef() = 0;
00042 
00047     virtual UINT Release() = 0;
00048 };
00049 
00050 
00055 class WWhizTag //: public WWhizBase
00056 {
00057 public:
00061     enum Access
00062     {
00063         PUBLIC,         
00064         PROTECTED,      
00065         PRIVATE,        
00066         FRIEND,
00067     };
00068 
00072     enum ImplementationType
00073     {
00074         DEFAULT,
00075         ABSTRACT,
00076         VIRTUAL,
00077         PUREVIRTUAL,
00078     };
00079 
00083     enum Type
00084     {
00085         CLASS,          
00086         DECLARATION,    
00087         DEFINE,         
00088         ENUM,           
00089         ENUMMEMBER,     
00090         FILE,           
00091         FUNCTION,       
00092         MEMBER,         
00093         NAMESPACE,      
00094         STRUCTURE,      
00095         TYPEDEF,        
00096         UNION,          
00097         VARIABLE,       
00098         LAST_TYPE,
00099     };
00100 
00104     virtual Type GetType(void) const = 0;
00105 
00114     virtual LPCSTR GetShortIdent(void) const = 0;
00115 
00119     virtual LPCSTR GetIdent(void) const = 0;
00120 
00124     virtual LPCSTR GetFilename(void) const = 0;
00125 
00129     virtual LPCSTR GetSearchString(void) const = 0;
00130 
00139     virtual LPCSTR GetShortParentIdent(void) const = 0;
00140 
00144     virtual LPCSTR GetParentIdent(void) const = 0;
00145 
00148     virtual int GetLineNumber(void) const = 0;
00149 
00154     virtual WWhizTag* GetMatchNext(void) const = 0;
00155 
00160     virtual WWhizTag* GetMatchPrev(void) const = 0;
00161 
00165     virtual Access GetAccess(void) const = 0;
00166 
00170     virtual LPCSTR GetNamespace(void) const = 0;
00171 
00178     virtual WWhizTag* GetBuddy(void) const = 0;
00179 
00183     virtual ImplementationType GetImplementationType(void) const = 0;
00184 };
00185 
00186 
00195 class WWhizInterface
00196 {
00197 public:
00203     struct TagCallbackInfo
00204     {
00205         void* m_userData;           
00206         int m_curFile;              
00207         int m_numFiles;             
00208         LPCTSTR m_curFilename;      
00209 
00210         enum Type
00211         {
00212             REFRESH,
00213             LOAD,
00214             SAVE,
00215         };
00216 
00217         Type m_type;
00218     };
00219 
00223     typedef void (*TagRefreshCallback)(const TagCallbackInfo& info);
00224 
00228     virtual void Reserved0() = 0;
00229 
00231     // File support
00233 
00239     virtual WWhizProjectList& GetProjectList(void) const = 0;
00240 
00246     virtual WWhizFileList& GetFileList(void) const = 0;
00247 
00251     virtual CString GetWorkspaceName(void) const = 0;
00252 
00258     virtual const CString& GetWorkspaceLocation(void) const = 0;
00259 
00287     virtual void SetWorkspaceLocation(void) = 0;
00288 
00292     virtual const CString& GetExtraFilename(void) = 0;
00293 
00301     virtual bool GetCurrentFilename(CString& filename) const = 0;
00302 
00307     virtual WWhizProject* GetCurrentProject() const = 0;
00308 
00324     virtual void ResolveFilename(const CString& rootDir, CString& filename) = 0;
00325 
00348     virtual bool RefreshFileList(void) = 0;
00349 
00356     virtual void AddProject(CString projectName) = 0;
00357 
00361     virtual void RemoveAllFiles(void) = 0;
00362 
00365     virtual void Reserved1() = 0;
00366 
00368     // Tag support
00370 
00374     virtual const WWhizTag* GetTagMatchHead(void) const = 0;
00375 
00380     virtual const WWhizTag* GetTagMatchTail(void) const = 0;
00381 
00386     virtual int GetTagMatchCount(void) const = 0;
00387 
00392     virtual const WWhizTag* GetLastMatchedTag(void) const = 0;
00393 
00398     virtual const WWhizTagList& GetTagList(void) const = 0;
00399 
00403     virtual void RemoveAllTags(void) = 0;
00404 
00415     virtual void MatchTag(const WWhizTagList& tags, LPCTSTR name, WWhizTag::Type forceType = WWhizTag::LAST_TYPE) const = 0;
00416 
00423     virtual bool GotoTag(const WWhizTag* tag) const = 0;
00424 
00432     virtual void SetTagCallback(TagRefreshCallback callback, void* userData) = 0;
00433 
00440     virtual void RefreshTagList(bool forceRefresh = false, bool forceSave = false) = 0;
00441 
00445     virtual void LoadTags() = 0;
00446 
00451     virtual void SaveTags() = 0;
00452 
00458     virtual bool GetTagUseType(WWhizTag::Type type) = 0;
00459 
00468     virtual void SetTagUseType(WWhizTag::Type type, bool use) = 0;
00469 
00470     // Global files
00476     virtual WWhizFileList& GetGlobalFileList(void) const = 0;
00477 
00481     virtual bool RefreshGlobalFileList(void) = 0;
00482     
00483     // Misc
00487     virtual WWhizConfig& GetConfig() = 0;
00488 
00489     // More stuff appended to the end.
00493     virtual CTime GetLastFileRefreshTime() const = 0;
00494 
00498     virtual CTime GetLastTagRefreshTime() const = 0;
00499 
00505     virtual void SetWWhizReg(WWhizReg* wwhizReg) = 0;
00506 
00512     virtual WWhizFileList& GetActiveFileList(void) const = 0;
00513 
00519     virtual DWORD GetVersion(void) const = 0;
00520 
00528     virtual void AddChangedFile(CString filename) = 0;
00529 
00534     virtual void CheckActiveFilesForChanges() = 0;
00535 
00544     virtual const WWhizTag* GetTagScope(const CString& filename, UINT lineNumber) = 0;
00545 
00549     virtual const CString& GetWorkspaceFullPath(void) const = 0;
00550 };
00551 
00552 
00556 class WWhizConfig
00557 {
00558 public:
00560     // Files extension list.
00562 
00570     virtual void FilesExtReset() = 0;
00571 
00575     virtual void FilesExtRemoveAll() = 0;
00576 
00580     virtual void FilesExtAdd(CString ext) = 0;
00581 
00585     virtual void FilesExtRemove(int index) = 0;
00586 
00590     virtual const CString& FilesExtGet(int index) = 0;
00591 
00595     virtual int FilesExtGetCount() = 0;
00596 
00598     // Tags extension list.
00600 
00608     virtual void TagsExtReset() = 0;
00609 
00613     virtual void TagsExtRemoveAll() = 0;
00614 
00618     virtual void TagsExtAdd(CString ext) = 0;
00619 
00623     virtual void TagsExtRemove(int index) = 0;
00624 
00628     virtual int TagsExtGetCount() = 0;
00629 
00634     virtual const CString& TagsExtGet(int index) = 0;
00635 
00637     // Misc.
00639 
00645     virtual UINT GetTagAutoPackAmount() = 0;
00646 
00653     virtual void SetTagAutoPackAmount(UINT amount) = 0;
00654 
00659     virtual bool GetAutoRefreshTags() = 0;
00660 
00665     virtual void SetAutoRefreshTags(bool autoRefresh) = 0;
00666 
00671     virtual bool GetScanFilesTaskSwitch() = 0;
00672 
00677     virtual void SetScanFilesTaskSwitch(bool scanFiles) = 0;
00678     
00680     // Tokens to ignore.
00682 
00689     virtual void IgnoreTokensReset() = 0;
00690 
00694     virtual void IgnoreTokensRemoveAll() = 0;
00695 
00699     virtual void IgnoreTokensAdd(CString ext) = 0;
00700 
00704     virtual void IgnoreTokensRemove(int index) = 0;
00705 
00709     virtual int IgnoreTokensGetCount() = 0;
00710 
00715     virtual const CString& IgnoreTokensGet(int index) = 0;
00716 
00718     // Misc.
00720 
00726     virtual UINT GetTagAutoSaveAmount() = 0;
00727 
00734     virtual void SetTagAutoSaveAmount(UINT amount) = 0;
00735 };
00736 
00737 
00742 class WWhizProjectList
00743 {
00744 public:
00748     virtual int GetProjectCount() const = 0;
00749 
00754     virtual WWhizProject* GetProjectByIndex(int index) const = 0;
00755 
00762     virtual WWhizProject* Find(CString projectName) const = 0;
00763 };
00764 
00765 
00769 class WWhizProject
00770 {
00771 public:
00775     virtual const CString& GetName(void) const = 0;
00776 
00780     virtual bool IsActive(void) const = 0;
00781 
00786     virtual const CTime& GetTimeStamp(void) const = 0;
00787 
00791     virtual WWhizFileList& GetFileList(void) const = 0;
00792 
00796     virtual WWhizTagList& GetTagList(void) const = 0;
00797 
00802     virtual bool IsWorkspaceProject(void) const = 0;
00803 
00810     virtual void SetActive(bool active = true) = 0;
00811 
00817     virtual XmlData& GetXmlData() = 0;
00818 };
00819 
00820 
00824 class WWhizFileList
00825 {
00826 public:
00830     virtual int GetCount(void) const = 0;
00831 
00836     virtual WWhizFile* Get(int index) const = 0;
00837 
00845     virtual WWhizFile* Find(CString fullName) const = 0;
00846 
00855     virtual int FindExact(WWhizFile& file) const = 0;
00856 
00865     virtual int FindNext(int startPos, WWhizFile& file) const = 0;
00866 
00875     virtual int FindPrevious(int startPos, WWhizFile& file) const = 0;
00876 
00885     virtual WWhizFile& Create(const CString& filename) = 0;
00886 };
00887 
00888 
00892 class WWhizFile : public WWhizBase
00893 {
00894 public:
00898     virtual const CString& GetFullName() const = 0;
00899 
00904     virtual CString GetCaseFullName() const = 0;
00905 
00915     virtual const CString& GetShortName(void) const = 0;
00916 
00920     virtual const CString& GetTitle(void) const = 0;
00921 
00925     virtual const CString& GetExt(void) const = 0;
00926 
00930     virtual const CString& GetPath(void) const = 0;
00931 
00936     virtual const CTime& GetTimeStamp(void) const = 0;
00937 
00941     virtual WWhizTagList& GetTagList(void) const = 0;
00942 
00943 
00950     virtual void SetShortName(const CString& shortName) = 0;
00951 
00958     virtual void SetTitle(const CString& title) = 0;
00959 
00966     virtual void SetExt(const CString& ext) = 0;
00967 
00974     virtual void SetPath(const CString& path) = 0;
00975 
00982     virtual void SetTimeStamp(CTime timeStamp) = 0;
00983 
00988     virtual WWhizTagList& GetOrderedTagList(void) const = 0;
00989 
00993     virtual bool IsWorkspaceFile(void) const = 0;
00994 };
00995 
00996 
01000 class WWhizTagList
01001 {
01002 public:
01006     virtual int GetCount(void) const = 0;
01007 
01012     virtual WWhizTag* Get(int index) const = 0;
01013 };
01014 
01015 

Generated at Mon Jan 8 23:50:19 2001 for WWhizInterface by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000