Elaztek Developer Hub
Blamite Game Engine - Strings  00312.05.15.21.1835.blamite
A library containing general purpose utilities and classes for use in multiple projects.
projects.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #ifdef STRINGS_EXPORTS
7 #define STRINGS_API __declspec(dllexport)
8 #else
9 #define STRINGS_API __declspec(dllimport)
10 #endif
11 
12 // The file extension for any Blamite project file.
13 #define PROJECT_FILE_EXTENSION ".blam"
14 
15 // The name of the directory used to store Blamite projects. This folder will always be placed with the user's Documents folder.
16 #define BLAM_PROJECTS_DIR "Blamite Projects"
17 
25 {
26 private:
30  void ClearChildren();
31 
32 public:
33  bool is_folder = false;
34  bool path_exists = false;
35 
36  BlamTagTreeNode* parent = nullptr;
37  std::vector<BlamTagTreeNode*> children;
38 
39  std::string hierarchy_path = "";
40  std::string disk_path = "";
41  std::string display_name = "";
42 
49  BlamTagTreeNode(std::string file_path, BlamTagTreeNode* parent = nullptr);
50 
54  ~BlamTagTreeNode();
55 
59  void Refresh();
60 };
61 
70 {
71 public:
72  BlamTagTreeNode* hierarchy_root = nullptr;
73 
79  bool project_load_result = false;
80  bool has_project_info = false;
81 
82  std::string project_name = "unnamed";
83  std::string project_root = "";
84  std::string content_root = "tags";
85 
91  BlamProject(std::string file_path);
92  ~BlamProject();
93 };
94 
99 {
107  STRINGS_API BlamProject* LoadProject(std::string file_path);
108 
116  STRINGS_API BlamTagTreeNode* BuildTagHierarchy(std::string root_folder);
117 }
BlamTagTreeNode::children
std::vector< BlamTagTreeNode * > children
Any child nodes within this node, will only apply for Folder nodes.
Definition: projects.h:37
Guerilla::Projects::LoadProject
STRINGS_API BlamProject * LoadProject(std::string file_path)
Loads a project file from disk and prepares it for use.
Definition: projects.cpp:6
BlamProject
Class representing a Blamite Project.
Definition: projects.h:69
project_info.h
BlamProject::project_info
BlamProjectInfo project_info
The project information file contents.
Definition: projects.h:78
tags.h
Guerilla::Projects
Namespace containing functions for working with project files.
Definition: projects.h:98
STRINGS_API
#define STRINGS_API
Definition: projects.h:9
BlamProjectInfo
Structure representing a Blam Project Information file.
Definition: project_info.h:33
BlamTagTreeNode
Class representing a tag tree node.
Definition: projects.h:24
Guerilla::Projects::BuildTagHierarchy
STRINGS_API BlamTagTreeNode * BuildTagHierarchy(std::string root_folder)
Builds the tag hierarchy for a given directory.
Definition: projects.cpp:11