Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
FileFactoryListClass.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#ifndef TT_INCLUDE__FILEFACTORYLISTCLASS_H
13#define TT_INCLUDE__FILEFACTORYLISTCLASS_H
14#include "engine_io.h"
15#include "engine_string.h"
16extern char* lastFileName;
17
18class FileFactoryListClass : public FileFactoryClass
19{
20#if !defined(WWCONFIG) && !defined(PACKAGEEDITOR) && !defined(W3DVIEWER)
21 static REF_DECL(FileFactoryListClass *, Instance);
22#else
23 static FileFactoryListClass *Instance;
24#endif
25 FileFactoryClass* tempFactory; // 0004
26 SimpleDynVecClass<FileFactoryClass*> factories; // 0008
27 DynamicVectorClass<StringClass> fileNames; // 0018
28 int searchStart; // 0030
29
30public:
31
32 static FileFactoryListClass* Get_Instance() { return Instance; }
33
34 virtual ~FileFactoryListClass();
35 virtual FileClass* Get_File(const char* fileName);
36 virtual void Return_File(FileClass* file);
37
38 FileFactoryListClass();
39 void Add_FileFactory(FileFactoryClass* factory, const char* factoryName, bool addToBegin = false);
40 void Remove_FileFactory(FileFactoryClass* factory);
41 FileFactoryClass *Remove_FileFactory();
42 void Add_Temp_FileFactory(FileFactoryClass* factory);
43 FileFactoryClass *Remove_Temp_FileFactory();
44 void Set_Search_Start(const char* factoryName);
45 void Reset_Search_Start() { searchStart = 0; }
46 FileFactoryClass *Peek_Temp_FileFactory();
47 int Get_Factory_Count();
48 FileFactoryClass *Get_Factory(int);
49
50}; // 0034
51
52
53#endif