40#define PROJECT_VAR_NAME wxT( "KIPRJMOD" )
43#define NAMELESS_PROJECT _( "untitled" )
105 virtual bool TextVarResolver( wxString* aToken )
const;
107 virtual std::map<wxString, wxString>&
GetTextVars()
const;
112 virtual void ApplyTextVars(
const std::map<wxString, wxString>& aVarsMap );
126 virtual const wxString GetProjectFullName()
const;
134 virtual const wxString GetProjectPath()
const;
142 virtual const wxString GetProjectDirectory()
const;
149 virtual const wxString GetProjectName()
const;
160 virtual bool IsNullProject()
const;
162 virtual bool IsReadOnly()
const {
return m_readOnly || IsNullProject(); }
164 virtual void SetReadOnly(
bool aReadOnly =
true ) { m_readOnly = aReadOnly; }
169 virtual const wxString GetSheetName(
const KIID& aSheetID );
176 virtual const wxString FootprintLibTblName()
const;
181 virtual const wxString SymbolLibTableName()
const;
186 virtual const wxString DesignBlockLibTblName()
const;
197 void PinLibrary(
const wxString& aLibrary,
enum LIB_TYPE_T aLibType );
198 void UnpinLibrary(
const wxString& aLibrary,
enum LIB_TYPE_T aLibType );
202 wxASSERT( m_projectFile );
203 return *m_projectFile;
208 wxASSERT( m_localSettings );
209 return *m_localSettings;
241 virtual const wxString& GetRString( RSTRING_T aStringId );
250 virtual void SetRString( RSTRING_T aStringId,
const wxString& aString );
270 virtual void ElemsClear();
279 for(
unsigned i = 0; i<RSTRING_COUNT; ++i )
280 SetRString(
RSTRING_T( i ), wxEmptyString );
289 virtual const wxString AbsolutePath(
const wxString& aFileName )
const;
304 friend class TEST_NETLISTS_FIXTURE;
313 virtual void setProjectFullName(
const wxString& aFullPathAndName );
324 m_projectFile = aFile;
336 m_localSettings = aSettings;
342 const wxString libTableName(
const wxString& aLibTableName )
const;
Provide an extensible class to resolve 3D model paths.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
A PROJECT can hold stuff it knows nothing about, in the form of _ELEM derivatives.
virtual PROJECT::ELEM ProjectElementType()=0
The backing store for a PROJECT, in JSON format.
The project local settings are things that are attached to a particular project, but also might be pa...
Container for project specific data.
PROJECT_FILE * m_projectFile
Backing store for project data – owned by SETTINGS_MANAGER.
virtual void SetReadOnly(bool aReadOnly=true)
virtual void setProjectFile(PROJECT_FILE *aFile)
Set the backing store file for this project.
virtual bool IsReadOnly() const
RSTRING_T
Retain a number of project specific wxStrings, enumerated here:
@ PCB_FOOTPRINT_EDITOR_FP_NAME
@ PCB_FOOTPRINT_EDITOR_LIB_NICKNAME
@ PCB_FOOTPRINT_VIEWER_FP_NAME
@ PCB_FOOTPRINT_VIEWER_LIB_NICKNAME
wxString m_pro_date_and_time
std::map< KIID, wxString > m_sheetNames
virtual void setLocalSettings(PROJECT_LOCAL_SETTINGS *aSettings)
Set the local settings backing store.
int m_netclassesTicker
Update counter on netclasses.
int GetNetclassesTicker() const
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
void IncrementNetclassesTicker()
virtual PROJECT_FILE & GetProjectFile() const
int GetTextVarsTicker() const
std::array< _ELEM *, static_cast< unsigned int >(PROJECT::ELEM::COUNT)> m_elems
wxFileName m_project_name
<fullpath>/<basename>.pro
void Clear()
Clear the _ELEMs and RSTRINGs.
PROJECT_LOCAL_SETTINGS * m_localSettings
Backing store for project local settings – owned by SETTINGS_MANAGER.
int m_textVarsTicker
Update counter on text vars.
std::array< wxString, RSTRING_COUNT > m_rstrings
bool m_readOnly
No project files will be written to disk.
void IncrementTextVarsTicker()
ELEM
The set of #_ELEMs that a PROJECT can hold.
Cache for storing the 3D shapes.
Look for files in a number of paths.
A collection of SYMBOL_LIB objects.
wxString GetTextVars(const wxString &aSource)
Returns any variables unexpanded, e.g.