WSF
wizard::TextSourceCache Class Reference

#include <TextSourceCache.hpp>

Collaboration diagram for wizard::TextSourceCache:

Public Types

typedef std::map< std::string, TextSource *, wizard::UtilFileStringCompareSourceMap

Public Member Functions

 TextSourceCache (wizard::ProjectWorkspace *aWorkspacePtr)
 ~TextSourceCache ()
TextSourceGetSource (const UtPath &aPath, bool aRead=true)
TextSourceFindSource (const UtPath &aPath, bool aRead=true)
TextSourceFindSource (const std::string &aPath, bool aRead=true)
TextSourceFindSource (UtTextDocument *aParseSourcePtr)
const SourceMapGetSources () const
void DeleteSource (TextSource *aSourcePtr)
void Clear ()

Public Attributes

std::set< TextSource * > mNewSources

Protected Attributes

wizard::ProjectWorkspacemWorkspacePtr
SourceMap mSources

Detailed Description

The source cache provides in-memory access to all files referenced in the project. This improves speed, and allows us to react to changes without saving to the file.

Member Typedef Documentation

◆ SourceMap

Constructor & Destructor Documentation

◆ TextSourceCache()

wizard::TextSourceCache::TextSourceCache ( wizard::ProjectWorkspace * aWorkspacePtr)
explicit

References mWorkspacePtr.

◆ ~TextSourceCache()

wizard::TextSourceCache::~TextSourceCache ( )

References Clear().

Member Function Documentation

◆ Clear()

void wizard::TextSourceCache::Clear ( )

References GetSources(), mNewSources, and mSources.

Referenced by ~TextSourceCache().

◆ DeleteSource()

void wizard::TextSourceCache::DeleteSource ( TextSource * aSourcePtr)

◆ FindSource() [1/3]

wizard::TextSource * wizard::TextSourceCache::FindSource ( const std::string & aPath,
bool aRead = true )

◆ FindSource() [2/3]

wizard::TextSource * wizard::TextSourceCache::FindSource ( const UtPath & aPath,
bool aRead = true )

◆ FindSource() [3/3]

wizard::TextSource * wizard::TextSourceCache::FindSource ( UtTextDocument * aParseSourcePtr)

◆ GetSource()

◆ GetSources()

Member Data Documentation

◆ mNewSources

std::set<TextSource*> wizard::TextSourceCache::mNewSources

Referenced by Clear(), DeleteSource(), and GetSource().

◆ mSources

SourceMap wizard::TextSourceCache::mSources
protected

◆ mWorkspacePtr

wizard::ProjectWorkspace* wizard::TextSourceCache::mWorkspacePtr
protected

Referenced by GetSource(), and TextSourceCache().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved