Public Types | Public Member Functions | Static Public Member Functions | List of all members
FileHandlerBase Class Referenceabstract

The base class for handling external resources. More...

Inheritance diagram for FileHandlerBase:
ControlledObject FrontendHandler ProjectHandler

Public Types

enum  SubDirectories {
  AudioFiles, Images, SampleMaps, UserPresets,
  Samples, Scripts , Presets, XMLPresetBackups,
  AdditionalSourceCode
}
 The sub folders of each project folder. More...
 

Public Member Functions

void createLinkFile (SubDirectories dir, const File &relocation)
 Creates a platform dependant file in the subdirectory that redirects to another location. More...
 
String getFilePath (const String &pathToFile, SubDirectories subDir) const
 creates a absolute path from the pathToFile and the specified sub directory. More...
 
const String getFileReference (const String &absoluteFileName, SubDirectories dir) const
 Creates a reference string that can be used to obtain the file in the project directory. More...
 
- Public Member Functions inherited from ControlledObject
 ControlledObject (MainController *m)
 Creates a new ControlledObject. More...
 
const MainControllergetMainController () const noexcept
 Provides read-only access to the main controller. More...
 
MainControllergetMainController () noexcept
 Provides write access to the main controller. More...
 

Static Public Member Functions

static bool isAbsolutePathCrossPlatform (const String &pathName)
 checks if this is a absolute path (including absolute win paths on OSX and absolute OSX paths on windows);
 

Detailed Description

The base class for handling external resources.

HISE uses a strict root-folder based encapsulation for every project with dedicated sub folders for each file type.

In compiled plugins, these resources will either be embedded into the plugin, shipped as compressed data file along with the binary or use a customizable path for the sample data.

Regardless whether you use HISE with C++ only or develop your project with the HISE application, this system will be used for resolving external data references.

Member Enumeration Documentation

The sub folders of each project folder.

Enumerator
AudioFiles 

all audio files that will not be used by the streaming engine (impulse responses, loops, one-shot samples)

Images 

image resources

SampleMaps 

files containing the mapping information for a particular sample set.

UserPresets 

restorable UI states

Samples 

audio files that are used by the streaming engine

Scripts 

Javascript files.

Presets 

the temporary build folder for the project. NEVER EVER PUT ANY C++ FILE HERE.

contains the autosave state of your current project as well as project states saved in binary format (admittedly the most poorly named thing in HISE)

XMLPresetBackups 

the project state in human readable form. This is the preferred file format for HISE projects

AdditionalSourceCode 

the folder for additional source code that will be included in the compilation of the project. All files in this directory will be automatically added to the IDE projects and compiled along the autogenerated C++ files and HISE code. Everything you write in C++ for your project must be put in this directory.

Member Function Documentation

void createLinkFile ( SubDirectories  dir,
const File &  relocation 
)

Creates a platform dependant file in the subdirectory that redirects to another location.

This is mainly used for storing audio samples at another location to keep the project folder size small.

juce::String getFilePath ( const String &  pathToFile,
SubDirectories  subDir 
) const

creates a absolute path from the pathToFile and the specified sub directory.

const juce::String getFileReference ( const String &  absoluteFileName,
SubDirectories  dir 
) const

Creates a reference string that can be used to obtain the file in the project directory.

If the file is not in

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.