mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added 'final' keyword to a lot of classes from which you really shouldn't be inheriting!
This commit is contained in:
parent
6e23c4806b
commit
970eda679e
39 changed files with 68 additions and 68 deletions
|
|
@ -36,7 +36,7 @@ namespace juce
|
|||
|
||||
It also provides an estimate of its progress, using a (highly inaccurate!) algorithm.
|
||||
*/
|
||||
class JUCE_API DirectoryIterator
|
||||
class JUCE_API DirectoryIterator final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace juce
|
|||
|
||||
@see FileInputStream, FileOutputStream
|
||||
*/
|
||||
class JUCE_API File
|
||||
class JUCE_API File final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace juce
|
|||
script creates complex connections between objects, you run the risk of creating cyclic
|
||||
dependencies and hence leaking.
|
||||
*/
|
||||
class JUCE_API JavascriptEngine
|
||||
class JUCE_API JavascriptEngine final
|
||||
{
|
||||
public:
|
||||
/** Creates an instance of the engine.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace juce
|
|||
|
||||
You can create a Random object and use it to generate a sequence of random numbers.
|
||||
*/
|
||||
class JUCE_API Random
|
||||
class JUCE_API Random final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace juce
|
|||
A simple wrapper around std::atomic.
|
||||
*/
|
||||
template <typename Type>
|
||||
struct Atomic
|
||||
struct Atomic final
|
||||
{
|
||||
typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ namespace juce
|
|||
There are methods to perform most of the basic atomic operations.
|
||||
*/
|
||||
template <typename Type>
|
||||
class Atomic : public AtomicBase<Type>
|
||||
class Atomic : public AtomicBase<Type> final
|
||||
{
|
||||
public:
|
||||
/** Resulting type when subtracting the underlying Type. */
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace juce
|
|||
/**
|
||||
Represents an IP address.
|
||||
*/
|
||||
class JUCE_API IPAddress
|
||||
class JUCE_API IPAddress final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace juce
|
|||
/**
|
||||
Represents a MAC network card adapter address ID.
|
||||
*/
|
||||
class JUCE_API MACAddress
|
||||
class JUCE_API MACAddress final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace juce
|
|||
|
||||
@see InterprocessConnection
|
||||
*/
|
||||
class JUCE_API NamedPipe
|
||||
class JUCE_API NamedPipe final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace juce
|
|||
|
||||
@see DatagramSocket, InterprocessConnection, InterprocessConnectionServer
|
||||
*/
|
||||
class JUCE_API StreamingSocket
|
||||
class JUCE_API StreamingSocket final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
@ -194,7 +194,7 @@ private:
|
|||
|
||||
@see StreamingSocket, InterprocessConnection, InterprocessConnectionServer
|
||||
*/
|
||||
class JUCE_API DatagramSocket
|
||||
class JUCE_API DatagramSocket final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace juce
|
|||
/**
|
||||
Contains methods for finding out about the current hardware and OS configuration.
|
||||
*/
|
||||
class JUCE_API SystemStats
|
||||
class JUCE_API SystemStats final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace juce
|
|||
|
||||
@see CharPointer_UTF8, CharPointer_UTF16, CharPointer_UTF32
|
||||
*/
|
||||
class CharPointer_ASCII
|
||||
class CharPointer_ASCII final
|
||||
{
|
||||
public:
|
||||
typedef char CharType;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace juce
|
|||
various methods to operate on the data.
|
||||
@see CharPointer_UTF8, CharPointer_UTF32
|
||||
*/
|
||||
class CharPointer_UTF16
|
||||
class CharPointer_UTF16 final
|
||||
{
|
||||
public:
|
||||
#if JUCE_NATIVE_WCHAR_IS_UTF16
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace juce
|
|||
various methods to operate on the data.
|
||||
@see CharPointer_UTF8, CharPointer_UTF16
|
||||
*/
|
||||
class CharPointer_UTF32
|
||||
class CharPointer_UTF32 final
|
||||
{
|
||||
public:
|
||||
typedef juce_wchar CharType;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace juce
|
|||
various methods to operate on the data.
|
||||
@see CharPointer_UTF16, CharPointer_UTF32
|
||||
*/
|
||||
class CharPointer_UTF8
|
||||
class CharPointer_UTF8 final
|
||||
{
|
||||
public:
|
||||
typedef char CharType;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace juce
|
|||
|
||||
@see NamedValueSet, ValueTree
|
||||
*/
|
||||
class JUCE_API Identifier
|
||||
class JUCE_API Identifier final
|
||||
{
|
||||
public:
|
||||
/** Creates a null identifier. */
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace juce
|
|||
|
||||
@see StringArray, StringPairArray
|
||||
*/
|
||||
class JUCE_API String
|
||||
class JUCE_API String final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
@ -43,10 +43,10 @@ public:
|
|||
String() noexcept;
|
||||
|
||||
/** Creates a copy of another string. */
|
||||
String (const String& other) noexcept;
|
||||
String (const String&) noexcept;
|
||||
|
||||
/** Move constructor */
|
||||
String (String&& other) noexcept;
|
||||
String (String&&) noexcept;
|
||||
|
||||
/** Creates a string from a zero-terminated ascii text string.
|
||||
|
||||
|
|
@ -93,37 +93,37 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Creates a string from a UTF-8 character string */
|
||||
String (const CharPointer_UTF8 text);
|
||||
String (CharPointer_UTF8 text);
|
||||
|
||||
/** Creates a string from a UTF-8 character string */
|
||||
String (const CharPointer_UTF8 text, size_t maxChars);
|
||||
String (CharPointer_UTF8 text, size_t maxChars);
|
||||
|
||||
/** Creates a string from a UTF-8 character string */
|
||||
String (const CharPointer_UTF8 start, const CharPointer_UTF8 end);
|
||||
String (CharPointer_UTF8 start, CharPointer_UTF8 end);
|
||||
|
||||
//==============================================================================
|
||||
/** Creates a string from a UTF-16 character string */
|
||||
String (const CharPointer_UTF16 text);
|
||||
String (CharPointer_UTF16 text);
|
||||
|
||||
/** Creates a string from a UTF-16 character string */
|
||||
String (const CharPointer_UTF16 text, size_t maxChars);
|
||||
String (CharPointer_UTF16 text, size_t maxChars);
|
||||
|
||||
/** Creates a string from a UTF-16 character string */
|
||||
String (const CharPointer_UTF16 start, const CharPointer_UTF16 end);
|
||||
String (CharPointer_UTF16 start, CharPointer_UTF16 end);
|
||||
|
||||
//==============================================================================
|
||||
/** Creates a string from a UTF-32 character string */
|
||||
String (const CharPointer_UTF32 text);
|
||||
String (CharPointer_UTF32 text);
|
||||
|
||||
/** Creates a string from a UTF-32 character string */
|
||||
String (const CharPointer_UTF32 text, size_t maxChars);
|
||||
String (CharPointer_UTF32 text, size_t maxChars);
|
||||
|
||||
/** Creates a string from a UTF-32 character string */
|
||||
String (const CharPointer_UTF32 start, const CharPointer_UTF32 end);
|
||||
String (CharPointer_UTF32 start, CharPointer_UTF32 end);
|
||||
|
||||
//==============================================================================
|
||||
/** Creates a string from an ASCII character string */
|
||||
String (const CharPointer_ASCII text);
|
||||
String (CharPointer_ASCII text);
|
||||
|
||||
/** Creates a string from a UTF-8 encoded std::string. */
|
||||
String (const std::string&);
|
||||
|
|
@ -230,8 +230,8 @@ public:
|
|||
@param startOfTextToAppend the start of the string to add. This must not be a nullptr
|
||||
@param endOfTextToAppend the end of the string to add. This must not be a nullptr
|
||||
*/
|
||||
void appendCharPointer (const CharPointerType startOfTextToAppend,
|
||||
const CharPointerType endOfTextToAppend);
|
||||
void appendCharPointer (CharPointerType startOfTextToAppend,
|
||||
CharPointerType endOfTextToAppend);
|
||||
|
||||
/** Appends a string to the end of this one.
|
||||
|
||||
|
|
@ -239,8 +239,8 @@ public:
|
|||
@param endOfTextToAppend the end of the string to add. This must not be a nullptr
|
||||
*/
|
||||
template <class CharPointer>
|
||||
void appendCharPointer (const CharPointer startOfTextToAppend,
|
||||
const CharPointer endOfTextToAppend)
|
||||
void appendCharPointer (CharPointer startOfTextToAppend,
|
||||
CharPointer endOfTextToAppend)
|
||||
{
|
||||
jassert (startOfTextToAppend.getAddress() != nullptr && endOfTextToAppend.getAddress() != nullptr);
|
||||
|
||||
|
|
@ -260,7 +260,7 @@ public:
|
|||
}
|
||||
|
||||
/** Appends a string to the end of this one. */
|
||||
void appendCharPointer (const CharPointerType textToAppend);
|
||||
void appendCharPointer (CharPointerType textToAppend);
|
||||
|
||||
/** Appends a string to the end of this one.
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ public:
|
|||
@param maxCharsToTake the maximum number of characters to take from the string passed in
|
||||
*/
|
||||
template <class CharPointer>
|
||||
void appendCharPointer (const CharPointer textToAppend, size_t maxCharsToTake)
|
||||
void appendCharPointer (CharPointer textToAppend, size_t maxCharsToTake)
|
||||
{
|
||||
if (textToAppend.getAddress() != nullptr)
|
||||
{
|
||||
|
|
@ -290,7 +290,7 @@ public:
|
|||
|
||||
/** Appends a string to the end of this one. */
|
||||
template <class CharPointer>
|
||||
void appendCharPointer (const CharPointer textToAppend)
|
||||
void appendCharPointer (CharPointer textToAppend)
|
||||
{
|
||||
appendCharPointer (textToAppend, std::numeric_limits<size_t>::max());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace juce
|
|||
|
||||
@see String
|
||||
*/
|
||||
class JUCE_API StringRef
|
||||
class JUCE_API StringRef final
|
||||
{
|
||||
public:
|
||||
/** Creates a StringRef from a raw string literal.
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace juce
|
|||
multiple threads, then you'll need to use your own synchronisation around any code
|
||||
that accesses it.
|
||||
*/
|
||||
class JUCE_API Value
|
||||
class JUCE_API Value final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace juce
|
|||
|
||||
@see var, XmlElement
|
||||
*/
|
||||
class JUCE_API ValueTree
|
||||
class JUCE_API ValueTree final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI();
|
|||
Be careful with your threading though - to be safe, you should always make sure
|
||||
that these objects are created and deleted on the message thread.
|
||||
*/
|
||||
class JUCE_API ScopedJuceInitialiser_GUI
|
||||
class JUCE_API ScopedJuceInitialiser_GUI final
|
||||
{
|
||||
public:
|
||||
/** The constructor simply calls initialiseJuce_GUI(). */
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ typedef void* (MessageCallbackFunction) (void* userData);
|
|||
|
||||
@see Message, CallbackMessage, MessageManagerLock, JUCEApplication, JUCEApplicationBase
|
||||
*/
|
||||
class JUCE_API MessageManager
|
||||
class JUCE_API MessageManager final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace juce
|
|||
|
||||
The colour is stored internally as unsigned 8-bit red, green, blue and alpha values.
|
||||
*/
|
||||
class JUCE_API Colour
|
||||
class JUCE_API Colour final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace juce
|
|||
|
||||
@see Graphics::setGradientFill
|
||||
*/
|
||||
class JUCE_API ColourGradient
|
||||
class JUCE_API ColourGradient final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace juce
|
|||
|
||||
@see Graphics::setFillType, DrawablePath::setFill
|
||||
*/
|
||||
class JUCE_API FillType
|
||||
class JUCE_API FillType final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace juce
|
|||
|
||||
@see Component::paint
|
||||
*/
|
||||
class JUCE_API Graphics
|
||||
class JUCE_API Graphics final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace juce
|
|||
|
||||
@see Typeface
|
||||
*/
|
||||
class JUCE_API Font
|
||||
class JUCE_API Font final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace juce
|
|||
|
||||
@see GlyphArrangement, Font
|
||||
*/
|
||||
class JUCE_API PositionedGlyph
|
||||
class JUCE_API PositionedGlyph final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
@ -120,7 +120,7 @@ private:
|
|||
|
||||
@see Font, PositionedGlyph
|
||||
*/
|
||||
class JUCE_API GlyphArrangement
|
||||
class JUCE_API GlyphArrangement final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace juce
|
|||
|
||||
@see AttributedString
|
||||
*/
|
||||
class JUCE_API TextLayout
|
||||
class JUCE_API TextLayout final
|
||||
{
|
||||
public:
|
||||
/** Creates an empty layout.
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace juce
|
|||
|
||||
@see Path, Point, Line
|
||||
*/
|
||||
class JUCE_API AffineTransform
|
||||
class JUCE_API AffineTransform final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace juce
|
|||
|
||||
@see PathFlatteningIterator, PathStrokeType, Graphics
|
||||
*/
|
||||
class JUCE_API Path
|
||||
class JUCE_API Path final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace juce
|
|||
|
||||
@see Path
|
||||
*/
|
||||
class JUCE_API PathFlatteningIterator
|
||||
class JUCE_API PathFlatteningIterator final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace juce
|
|||
@see Rectangle
|
||||
*/
|
||||
template <typename ValueType>
|
||||
class RectangleList
|
||||
class RectangleList final
|
||||
{
|
||||
public:
|
||||
typedef Rectangle<ValueType> RectangleType;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class ImagePixelData;
|
|||
|
||||
@see Graphics, ImageFileFormat, ImageCache, ImageConvolutionKernel
|
||||
*/
|
||||
class JUCE_API Image
|
||||
class JUCE_API Image final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
@ -313,7 +313,7 @@ public:
|
|||
The actual format of the pixel data depends on the image's format - see Image::getFormat(),
|
||||
and the PixelRGB, PixelARGB and PixelAlpha classes for more info.
|
||||
*/
|
||||
class JUCE_API BitmapData
|
||||
class JUCE_API BitmapData final
|
||||
{
|
||||
public:
|
||||
enum ReadWriteMode
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace juce
|
|||
|
||||
@see FlexItem
|
||||
*/
|
||||
class JUCE_API FlexBox
|
||||
class JUCE_API FlexBox final
|
||||
{
|
||||
public:
|
||||
/** Possible values for the flexDirection property. */
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace juce
|
|||
|
||||
@see FlexBox
|
||||
*/
|
||||
class JUCE_API FlexItem
|
||||
class JUCE_API FlexItem final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
float maxHeight = (float) notAssigned; /**< The item's maximum height */
|
||||
|
||||
/** Represents a margin. */
|
||||
struct Margin
|
||||
struct Margin final
|
||||
{
|
||||
Margin() noexcept; /**< Creates a margin of size zero. */
|
||||
Margin (float size) noexcept; /**< Creates a margin with this size on all sides. */
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ namespace juce
|
|||
|
||||
@see GridItem
|
||||
*/
|
||||
class JUCE_API Grid
|
||||
class JUCE_API Grid final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** A size in pixels */
|
||||
struct Px
|
||||
struct Px final
|
||||
{
|
||||
explicit Px (float p) : pixels (static_cast<long double>(p)) { /*sta (p >= 0.0f);*/ }
|
||||
explicit Px (int p) : pixels (static_cast<long double>(p)) { /*sta (p >= 0.0f);*/ }
|
||||
|
|
@ -51,7 +51,7 @@ public:
|
|||
};
|
||||
|
||||
/** A fractional ratio integer */
|
||||
struct Fr
|
||||
struct Fr final
|
||||
{
|
||||
explicit Fr (int f) : fraction (static_cast<unsigned long long> (f)) {}
|
||||
explicit constexpr Fr (unsigned long long p) : fraction (p) {}
|
||||
|
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** */
|
||||
struct TrackInfo
|
||||
struct TrackInfo final
|
||||
{
|
||||
/** Creates a track with auto dimension. */
|
||||
TrackInfo() noexcept;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace juce
|
|||
This object can either be used to represent one of the standard mouse
|
||||
cursor shapes, or a custom one generated from an image.
|
||||
*/
|
||||
class JUCE_API MouseCursor
|
||||
class JUCE_API MouseCursor final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace juce
|
|||
@see MouseListener, Component::mouseMove, Component::mouseEnter, Component::mouseExit,
|
||||
Component::mouseDown, Component::mouseUp, Component::mouseDrag
|
||||
*/
|
||||
class JUCE_API MouseEvent
|
||||
class JUCE_API MouseEvent final
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
@ -378,7 +378,7 @@ private:
|
|||
|
||||
@see MouseListener, MouseEvent
|
||||
*/
|
||||
struct MouseWheelDetails
|
||||
struct MouseWheelDetails final
|
||||
{
|
||||
//==============================================================================
|
||||
/** The amount that the wheel has been moved in the X axis.
|
||||
|
|
@ -418,7 +418,7 @@ struct MouseWheelDetails
|
|||
|
||||
@see MouseListener, MouseEvent
|
||||
*/
|
||||
struct PenDetails
|
||||
struct PenDetails final
|
||||
{
|
||||
/**
|
||||
The rotation of the pen device in radians. Indicates the clockwise rotation, or twist,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace juce
|
|||
|
||||
@see MouseEvent
|
||||
*/
|
||||
class JUCE_API MouseInputSource
|
||||
class JUCE_API MouseInputSource final
|
||||
{
|
||||
public:
|
||||
/** Possible mouse input sources. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue