Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
SimpleFileFactoryClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#pragma once
13
14#include "engine_io.h"
15#include <string>
16
17class SimpleFileFactoryClass : public FileFactoryClass {
18public:
19#ifndef TTLE_EXPORTS
20 std::string subdirectories;
21#else
22 StringClass SubDirectory;
23#endif
24 bool IsStripPath;
25 mutable CriticalSectionClass Mutex;
26 SimpleFileFactoryClass();
27 virtual ~SimpleFileFactoryClass() {};
28 virtual FileClass* Get_File (const char* filename);
29 virtual void Return_File (FileClass* file);
30 void Get_Sub_Directory(StringClass& new_dir) const;
31 void Set_Sub_Directory(const char* sub_directory);
32 void Append_Sub_Directory(const char* sub_directory);
33 void Prepend_Sub_Directory(const char* sub_directory);
34 void Set_Strip_Path(bool strip)
35 {
36 IsStripPath = strip;
37 }
38 bool Get_Strip_Path() const
39 {
40 return IsStripPath;
41 }
42};
43