1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-31 03:00:05 +00:00

Added a few override modifiers and fixed some documentation.

This commit is contained in:
jules 2013-08-22 22:03:51 +01:00
parent da3838db8a
commit 50132270d6
10 changed files with 29 additions and 43 deletions

View file

@ -76,7 +76,7 @@ public:
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */

View file

@ -113,32 +113,29 @@ public:
//==============================================================================
/** Returns an XML object to encapsulate the state of the mappings.
@see restoreFromXml
*/
XmlElement* createXml() const;
/** Restores the mappings from an XML object created by createXML().
@see createXml
*/
void restoreFromXml (const XmlElement& e);
void restoreFromXml (const XmlElement&);
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================
OptionalScopedPointer<AudioSource> source;
Array <int> remappedInputs, remappedOutputs;
Array<int> remappedInputs, remappedOutputs;
int requiredNumberOfChannels;
AudioSampleBuffer buffer;
AudioSourceChannelInfo remappedInfo;
CriticalSection lock;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelRemappingAudioSource)

View file

@ -57,14 +57,14 @@ public:
void makeInactive();
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================
OptionalScopedPointer<AudioSource> input;
OwnedArray <IIRFilter> iirFilters;
OwnedArray<IIRFilter> iirFilters;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IIRFilterAudioSource)
};

View file

@ -76,20 +76,20 @@ public:
/** Implementation of the AudioSource method.
This will call prepareToPlay() on all its input sources.
*/
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
/** Implementation of the AudioSource method.
This will call releaseResources() on all its input sources.
*/
void releaseResources();
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================
Array <AudioSource*> inputs;
Array<AudioSource*> inputs;
BigInteger inputsToDelete;
CriticalSection lock;
AudioSampleBuffer tempBuffer;

View file

@ -69,9 +69,9 @@ public:
double getResamplingRatio() const noexcept { return ratio; }
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================

View file

@ -61,9 +61,9 @@ public:
bool isBypassed() const noexcept { return bypass; }
//==============================================================================
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
void releaseResources() override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:
//==============================================================================

View file

@ -53,13 +53,13 @@ public:
//==============================================================================
/** Implementation of the AudioSource method. */
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
/** Implementation of the AudioSource method. */
void releaseResources();
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
private:

View file

@ -147,7 +147,7 @@ public:
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */

View file

@ -74,7 +74,7 @@ public:
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */

View file

@ -43,13 +43,11 @@ public:
//==============================================================================
/** This has to return the number of items in the list.
@see ListBox::getNumRows()
*/
virtual int getNumRows() = 0;
/** This method must be implemented to draw a row of the list.
*/
/** This method must be implemented to draw a row of the list. */
virtual void paintListBoxItem (int rowNumber,
Graphics& g,
int width, int height,
@ -86,20 +84,17 @@ public:
Component* existingComponentToUpdate);
/** This can be overridden to react to the user clicking on a row.
@see listBoxItemDoubleClicked
*/
virtual void listBoxItemClicked (int row, const MouseEvent& e);
/** This can be overridden to react to the user double-clicking on a row.
@see listBoxItemClicked
*/
virtual void listBoxItemDoubleClicked (int row, const MouseEvent& e);
/** This can be overridden to react to the user double-clicking on a part of the list where
/** This can be overridden to react to the user clicking on a part of the list where
there are no rows.
@see listBoxItemClicked
*/
virtual void backgroundClicked();
@ -253,21 +248,17 @@ public:
int lastRow);
/** Deselects a row.
If it's not currently selected, this will do nothing.
@see selectRow, deselectAllRows
*/
void deselectRow (int rowNumber);
/** Deselects any currently selected rows.
@see deselectRow
*/
void deselectAllRows();
/** Selects or deselects a row.
If the row's currently selected, this deselects it, and vice-versa.
*/
void flipRowSelection (int rowNumber);
@ -292,7 +283,6 @@ public:
bool isRowSelected (int rowNumber) const;
/** Returns the number of rows that are currently selected.
@see getSelectedRow, isRowSelected, getLastRowSelected
*/
int getNumSelectedRows() const;
@ -357,8 +347,7 @@ public:
*/
double getVerticalPosition() const;
/** Scrolls if necessary to make sure that a particular row is visible.
*/
/** Scrolls if necessary to make sure that a particular row is visible. */
void scrollToEnsureRowIsOnscreen (int row);
/** Returns a pointer to the vertical scrollbar. */
@ -560,7 +549,7 @@ private:
int outlineThickness;
int lastRowSelected;
bool multipleSelection, hasDoneInitialUpdate;
SparseSet <int> selected;
SparseSet<int> selected;
void selectRowInternal (int rowNumber, bool dontScrollToShowThisRow,
bool deselectOthersFirst, bool isMouseClick);