Loading...
Searching...
No Matches
juce::InputSource Class Referenceabstract

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
Inheritance diagram for juce::InputSource:

Public Member Functions

 InputSource ()=default
virtual ~InputSource ()=default
 Destructor.
virtual InputStreamcreateInputStream ()=0
 Returns a new InputStream to read this item.
virtual InputStreamcreateInputStreamFor (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.

Constructors and Destructors

◆ InputSource()

juce::InputSource::InputSource ( )
default

Referenced by hashCode().

◆ ~InputSource()

virtual juce::InputSource::~InputSource ( )
virtualdefault

Destructor.

Member Functions

◆ createInputStream()

virtual InputStream * juce::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 juce::AndroidDocumentInputSource, juce::FileInputSource, and juce::URLInputSource.

◆ createInputStreamFor()

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

Returns a new InputStream to read an item, relative.

Parameters
relatedItemPaththe 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 juce::AndroidDocumentInputSource, juce::FileInputSource, and juce::URLInputSource.

◆ hashCode()

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

Returns a hash code that uniquely represents this item.

Implemented in juce::AndroidDocumentInputSource, juce::FileInputSource, and juce::URLInputSource.

References InputSource().

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram