You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
915 B
47 lines
915 B
#pragma once
|
|
|
|
class ModulesAndImports {
|
|
public:
|
|
ModulesAndImports();
|
|
virtual ~ModulesAndImports();
|
|
void SetModule (LPCSTR name);
|
|
void AddImport (LPCSTR name, LPCSTR msg = "");
|
|
BOOL IsModule (LPCSTR name);
|
|
BOOL Lookup (LPCSTR name, CString& msg);
|
|
BOOL Lookup (LPCSTR name);
|
|
void Dump(std::ostream& out);
|
|
private:
|
|
CString m_curr_module;
|
|
CMapStringToString m_imports;
|
|
};
|
|
|
|
inline
|
|
ModulesAndImports::ModulesAndImports () :
|
|
m_curr_module ("")
|
|
{
|
|
}
|
|
|
|
inline
|
|
void
|
|
ModulesAndImports::SetModule (LPCSTR name)
|
|
{
|
|
m_curr_module = name;
|
|
m_imports.SetAt (m_curr_module, "");
|
|
}
|
|
|
|
inline
|
|
void
|
|
ModulesAndImports::AddImport (LPCSTR name, LPCSTR msg)
|
|
{
|
|
m_imports.SetAt (m_curr_module+CString("!")+CString(name), msg);
|
|
}
|
|
|
|
inline
|
|
BOOL
|
|
ModulesAndImports::Lookup (LPCSTR name)
|
|
{
|
|
CString msg;
|
|
return Lookup (name, msg);
|
|
}
|
|
|
|
|