JUCE: InputSource Class Reference

JUCE

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Member Functions | List of all members
InputSource Class Referenceabstract
juce_core » streams

A lightweight object that can create a stream to read some kind of resource. More...

`#include <juce_InputSource.h>`

Inheritance diagram for InputSource:

## Public Member Functions
| InputSource ()=default
virtual | ~InputSource ()=default
| Destructor.
virtual InputStream * | createInputStream ()=0
| Returns a new InputStream to read this item.
virtual InputStream * | createInputStreamFor (const String &relatedItemPath)=0
| Returns a new InputStream to read an item, relative.
virtual int64 | hashCode () const =0
| Returns a hash code that uniquely represents this item.

## Detailed Description

A lightweight object that can create a stream to read some kind of resource.

This may be used to refer to a file, or some other kind of source, allowing a caller to create an input stream that can read from it when required.

See also
  FileInputSource

## Constructor & Destructor Documentation

## ◆ InputSource()

InputSource::InputSource | ( |  | ) |
| default

## ◆ ~InputSource()

virtual InputSource::~InputSource | ( |  | ) |
| virtualdefault

Destructor.

## Member Function Documentation

## ◆ createInputStream()

virtual InputStream * InputSource::createInputStream | ( |  | ) |
| pure virtual

Returns a new InputStream to read this item.

Returns
  an inputstream that the caller will delete, or nullptr if the filename isn't found.

Implemented in AndroidDocumentInputSource, FileInputSource, and URLInputSource.

## ◆ createInputStreamFor()

virtual InputStream * InputSource::createInputStreamFor | ( | const String & | relatedItemPath | ) |
| pure virtual

Returns a new InputStream to read an item, relative.

Parameters

  relatedItemPath | the relative pathname of the resource that is required

Returns
  an inputstream that the caller will delete, or nullptr if the item isn't found.

Implemented in AndroidDocumentInputSource, FileInputSource, and URLInputSource.

## ◆ hashCode()

virtual int64 InputSource::hashCode | ( |  | ) | const
| pure virtual

Returns a hash code that uniquely represents this item.

Implemented in AndroidDocumentInputSource, FileInputSource, and URLInputSource.

The documentation for this class was generated from the following file:

- juce_InputSource.h