58 using VCS_KEY = std::tuple<VCS_QUERY, wxString, std::string, int, bool>;
82 std::optional<wxDateTime>
time;
90 explicit ENVIRONMENT(
const wxDateTime& aTime = wxDateTime::Now() ) :
115 const wxString& GitHash(
const wxString& aPath,
const std::function<wxString()>& aRead );
116 const VCS_VALUE& VcsValue(
const VCS_KEY& aKey,
const std::function<VCS_VALUE()>& aRead );
ENVIRONMENT_SCOPE(ENVIRONMENT &aEnvironment)
ENVIRONMENT_SCOPE & operator=(const ENVIRONMENT_SCOPE &)=delete
ENVIRONMENT_SCOPE(const ENVIRONMENT_SCOPE &)=delete
A text evaluation frame with one frozen clock and memoized external queries.
std::map< wxString, wxString > m_gitHashes
static wxDateTime CurrentTime()
void RecordEnvironmentVariable(const wxString &aName, const std::optional< wxString > &aValue)
ENVIRONMENT & operator=(const ENVIRONMENT &)=delete
ENVIRONMENT(const ENVIRONMENT &)=delete
bool IsCollectingSources() const
friend class SOURCE_SCOPE
ENVIRONMENT(const wxDateTime &aTime=wxDateTime::Now())
static ENVIRONMENT * Current()
void RecordCrossReference(const CROSS_REFERENCE_KEY &aKey, const CROSS_REFERENCE_VALUE &aValue)
std::tuple< VCS_QUERY, wxString, std::string, int, bool > VCS_KEY
Query, absolute path (Git directory for HEAD), selector or pattern, options, and whether the context ...
std::map< VCS_KEY, VCS_VALUE > m_vcsValues
std::pair< wxString, int > CROSS_REFERENCE_KEY
Record every source read through aEnvironment into aValues, including memo hits.
SOURCE_SCOPE(ENVIRONMENT &aEnvironment, ENVIRONMENT::SOURCE_VALUES &aValues)
SOURCE_SCOPE(const SOURCE_SCOPE &)=delete
ENVIRONMENT & m_environment
SOURCE_SCOPE & operator=(const SOURCE_SCOPE &)=delete
ENVIRONMENT::SOURCE_VALUES & m_values
SOURCE_SCOPE * m_previous
bool operator==(const CROSS_REFERENCE_VALUE &) const =default
std::map< VCS_KEY, VCS_VALUE > vcsValues
std::map< wxString, std::optional< wxString > > environmentVariables
std::map< wxString, wxString > gitHashes
bool operator==(const SOURCE_VALUES &) const =default
std::optional< wxDateTime > time
std::map< CROSS_REFERENCE_KEY, CROSS_REFERENCE_VALUE > crossReferences
bool operator==(const VCS_VALUE &) const =default