Add remaining files
[juce-lv2.git] / juce / source / extras / Introjucer / Source / Project / jucer_ResourceFile.h
blobbc8776f2fe9605e642b08f9a85928fb58963edd2
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-10 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCER_RESOURCEFILE_JUCEHEADER__
27 #define __JUCER_RESOURCEFILE_JUCEHEADER__
29 #include "../jucer_Headers.h"
30 #include "jucer_Project.h"
33 //==============================================================================
34 class ResourceFile
36 public:
37 //==============================================================================
38 ResourceFile (Project& project);
39 ~ResourceFile();
41 //==============================================================================
42 static bool isResourceFile (const File& file);
44 //==============================================================================
45 void setJuceHeaderToInclude (const File& header);
47 void setClassName (const String& className);
48 const String getClassName() const { return className; }
50 void addFile (const File& file);
51 const String getDataVariableFor (const File& file) const;
52 const String getSizeVariableFor (const File& file) const;
54 int getNumFiles() const { return files.size(); }
55 int64 getTotalDataSize() const;
57 bool write (const File& cppFile);
58 bool write (const File& cppFile, OutputStream& cpp, OutputStream& header);
60 //==============================================================================
61 private:
62 Array<File> files;
63 StringArray variableNames;
64 Project& project;
65 File juceHeader;
66 String className;
68 void addResourcesFromProjectItem (const Project::Item& node);
70 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ResourceFile);
74 #endif // __JUCER_RESOURCEFILE_JUCEHEADER__