summaryrefslogtreecommitdiff
path: root/common/lc_application.h
blob: 0336f1000438b649d0e37a133cadba96d315475a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef _LC_APPLICATION_H_
#define _LC_APPLICATION_H_

#include "array.h"

class Project;
class PiecesLibrary;

class lcApplication
{
public:
	lcApplication();
	~lcApplication();

	bool Initialize(int argc, char *argv[], const char* SysLibPath);
	void Shutdown();

	// Pieces library.
	bool LoadPiecesLibrary(const char* LibPath, const char* SysLibPath);
	PiecesLibrary* GetPiecesLibrary() const
	{
		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;
	PiecesLibrary* m_Library;
};

extern lcApplication* g_App;
PiecesLibrary* lcGetPiecesLibrary();
Project* lcGetActiveProject();

#endif // _LC_APPLICATION_H_