40#define PROJECT_VAR_NAME wxT( "KIPRJMOD" )
43#define NAMELESS_PROJECT _( "untitled" )
102 virtual bool TextVarResolver( wxString* aToken )
const;
104 virtual std::map<wxString, wxString>&
GetTextVars()
const;
109 virtual void ApplyTextVars(
const std::map<wxString, wxString>& aVarsMap );
123 virtual const wxString GetProjectFullName()
const;
131 virtual const wxString GetProjectPath()
const;
139 virtual const wxString GetProjectDirectory()
const;
146 virtual const wxString GetProjectName()
const;
157 virtual bool IsNullProject()
const;
159 virtual bool IsReadOnly()
const {
return m_readOnly || IsNullProject(); }
161 virtual void SetReadOnly(
bool aReadOnly =
true ) { m_readOnly = aReadOnly; }
166 virtual const wxString GetSheetName(
const KIID& aSheetID );
173 virtual const wxString FootprintLibTblName()
const;
178 virtual const wxString SymbolLibTableName()
const;
180 void PinLibrary(
const wxString& aLibrary,
bool isSymbolLibrary );
181 void UnpinLibrary(
const wxString& aLibrary,
bool isSymbolLibrary );
185 wxASSERT( m_projectFile );
186 return *m_projectFile;
191 wxASSERT( m_localSettings );
192 return *m_localSettings;
224 virtual const wxString& GetRString( RSTRING_T aStringId );
233 virtual void SetRString( RSTRING_T aStringId,
const wxString& aString );
253 virtual void ElemsClear();
262 for(
unsigned i = 0; i<RSTRING_COUNT; ++i )
263 SetRString(
RSTRING_T( i ), wxEmptyString );
272 virtual const wxString AbsolutePath(
const wxString& aFileName )
const;
282 friend class TEST_NETLISTS_FIXTURE;
291 virtual void setProjectFullName(
const wxString& aFullPathAndName );
302 m_projectFile = aFile;
314 m_localSettings = aSettings;
320 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.