29#ifndef FILENAME_RESOLVER_H 
   30#define FILENAME_RESOLVER_H 
  106    wxString 
ResolvePath( 
const wxString& aFileName, 
const wxString& aWorkingPath,
 
  107                          std::vector<const EMBEDDED_FILES*> aEmbeddedFilesStack );
 
  116    wxString 
ShortenPath( 
const wxString& aFullPathName );
 
  125    const std::list<SEARCH_PATH>* 
GetPaths() 
const;
 
  131    bool SplitAlias( 
const wxString& aFileName, wxString& anAlias, wxString& aRelPath ) 
const;
 
 
bool ValidateFileName(const wxString &aFileName, bool &hasAlias) const
Return true if the given path is a valid aliased relative path.
 
bool createPathList(void)
Build the path list using available information such as KICAD7_3DMODEL_DIR and the 3d_path_list confi...
 
wxString ResolvePath(const wxString &aFileName, const wxString &aWorkingPath, std::vector< const EMBEDDED_FILES * > aEmbeddedFilesStack)
Determine the full path of the given file name.
 
bool addPath(const SEARCH_PATH &aPath)
Check that a path is valid and adds it to the search list.
 
wxString GetProjectDir() const
 
bool GetKicadPaths(std::list< wxString > &paths) const
Return a list of path environment variables local to KiCad.
 
bool Set3DConfigDir(const wxString &aConfigDir)
Set the user's configuration directory for 3D models.
 
void checkEnvVarPath(const wxString &aPath)
Check the ${ENV_VAR} component of a path and adds it to the resolver's path list if it is not yet in ...
 
std::list< SEARCH_PATH > m_paths
List of base paths to search from.
 
void SetProgramBase(PGM_BASE *aBase)
Set a pointer to the application's PGM_BASE instance used to extract the local env vars.
 
bool SplitAlias(const wxString &aFileName, wxString &anAlias, wxString &aRelPath) const
Return true if the given name contains an alias and populates the string anAlias with the alias and a...
 
wxString m_configDir
3D configuration directory.
 
const std::list< SEARCH_PATH > * GetPaths() const
Return a pointer to the internal path list; the items in:load.
 
bool SetProject(const PROJECT *aProject, bool *flgChanged=nullptr)
Set the current KiCad project directory as the first entry in the model path list.
 
const PROJECT * m_project
 
bool UpdatePathList(const std::vector< SEARCH_PATH > &aPathList)
Clear the current path list and substitutes the given path list and update the path configuration fil...
 
wxString ShortenPath(const wxString &aFullPathName)
Produce a relative path based on the existing search directories or returns the same path if the path...
 
Container for data for KiCad programs.
 
Container for project specific data.
 
wxString m_Pathvar
Base path as stored in the configuration file.
 
wxString m_Description
Description of the aliased path.
 
wxString m_Pathexp
Expanded base path.
 
wxString m_Alias
Alias to the base path.