leocad/common/lc_application.h

52 lines
1.1 KiB
C
Raw Normal View History

2011-09-07 23:06:51 +02:00
#ifndef _LC_APPLICATION_H_
#define _LC_APPLICATION_H_
#include "array.h"
class Project;
2012-10-02 03:23:44 +02:00
class lcPiecesLibrary;
2011-09-07 23:06:51 +02:00
class lcApplication
{
public:
lcApplication();
~lcApplication();
2012-10-06 01:09:38 +02:00
bool Initialize(int argc, char *argv[], const char* LibraryInstallPath, const char* LibraryCachePath);
2011-09-07 23:06:51 +02:00
void Shutdown();
// Pieces library.
2012-10-06 01:09:38 +02:00
bool LoadPiecesLibrary(const char* LibPath, const char* LibraryInstallPath, const char* LibraryCachePath);
2012-10-02 03:23:44 +02:00
lcPiecesLibrary* GetPiecesLibrary() const
2011-09-07 23:06:51 +02:00
{
return m_Library;
}
// Projects.
void AddProject(Project* project);
Project* GetActiveProject() const
{
return m_ActiveProject;
}
void SetActiveProject(Project* project)
{
m_ActiveProject = project;
}
protected:
void ParseIntegerArgument(int* CurArg, int argc, char* argv[], int* Value);
void ParseStringArgument(int* CurArg, int argc, char* argv[], char** Value);
Project* m_ActiveProject;
PtrArray<Project> m_Projects;
2012-10-02 03:23:44 +02:00
lcPiecesLibrary* m_Library;
2011-09-07 23:06:51 +02:00
};
extern lcApplication* g_App;
2012-10-02 03:23:44 +02:00
lcPiecesLibrary* lcGetPiecesLibrary();
2011-09-07 23:06:51 +02:00
Project* lcGetActiveProject();
#endif // _LC_APPLICATION_H_