mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Updated the documentation of some methods which now return std::unique_ptr instead of raw pointers to remove references to deleting the returned object
This commit is contained in:
parent
09bf952820
commit
c2e3dcd8bf
9 changed files with 10 additions and 31 deletions
|
|
@ -64,8 +64,6 @@ public:
|
|||
/** Tries to load the type for this description, by trying all the formats
|
||||
that this manager knows about.
|
||||
|
||||
The caller is responsible for deleting the object that is returned.
|
||||
|
||||
If it can't load the plugin, it returns nullptr and leaves a message in the
|
||||
errorMessage string.
|
||||
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ public:
|
|||
|
||||
/** Returns one of the properties as an XML element.
|
||||
|
||||
The result will a new XMLElement object that the caller must delete. If may return nullptr
|
||||
if the key isn't found, or if the entry contains an string that isn't valid XML.
|
||||
The result will a new XMLElement object. It may return nullptr if the key isn't found,
|
||||
or if the entry contains an string that isn't valid XML.
|
||||
|
||||
If the value isn't found in this set, then this will look for it in a fallback
|
||||
property set (if you've specified one with the setFallbackPropertySet() method),
|
||||
|
|
|
|||
|
|
@ -337,8 +337,7 @@ public:
|
|||
returning a response (ignored for Android which follows up to 5 redirects)
|
||||
@param httpRequestCmd Specify which HTTP Request to use. If this is empty, then doPostRequest
|
||||
will determine the HTTP request.
|
||||
@returns an input stream that the caller must delete, or a null pointer if there was an
|
||||
error trying to open it.
|
||||
@returns a valid input stream, or nullptr if there was an error trying to open it.
|
||||
*/
|
||||
std::unique_ptr<InputStream> createInputStream (bool doPostLikeRequest,
|
||||
OpenStreamProgressCallback* progressCallback = nullptr,
|
||||
|
|
@ -479,9 +478,6 @@ public:
|
|||
If it fails, or if the text that it reads can't be parsed as XML, this will
|
||||
return nullptr.
|
||||
|
||||
When it returns a valid XmlElement object, the caller is responsible for deleting
|
||||
this object when no longer needed.
|
||||
|
||||
Note that on some platforms (Android, for example) it's not permitted to do any network
|
||||
action from the message thread, so you must only call it from a background thread.
|
||||
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ public:
|
|||
allows quick checking of large files to
|
||||
see if they contain the correct type of
|
||||
tag, without having to parse the entire file
|
||||
@returns a new XmlElement which the caller will need to delete, or null if
|
||||
there was an error.
|
||||
@returns a new XmlElement, or nullptr if there was an error.
|
||||
@see getLastParseError, getDocumentElementIfTagMatches
|
||||
*/
|
||||
std::unique_ptr<XmlElement> getDocumentElement (bool onlyReadOuterDocumentElement = false);
|
||||
|
|
@ -136,14 +135,14 @@ public:
|
|||
/** A handy static method that parses a file.
|
||||
This is a shortcut for creating an XmlDocument object and calling getDocumentElement() on it.
|
||||
An even better shortcut is the juce::parseXML() function, which returns a std::unique_ptr<XmlElement>!
|
||||
@returns a new XmlElement which the caller will need to delete, or null if there was an error.
|
||||
@returns a new XmlElement, or nullptr if there was an error.
|
||||
*/
|
||||
static std::unique_ptr<XmlElement> parse (const File& file);
|
||||
|
||||
/** A handy static method that parses some XML data.
|
||||
This is a shortcut for creating an XmlDocument object and calling getDocumentElement() on it.
|
||||
An even better shortcut is the juce::parseXML() function, which returns a std::unique_ptr<XmlElement>!
|
||||
@returns a new XmlElement which the caller will need to delete, or null if there was an error.
|
||||
@returns a new XmlElement, or nullptr if there was an error.
|
||||
*/
|
||||
static std::unique_ptr<XmlElement> parse (const String& xmlData);
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,6 @@ public:
|
|||
/** Creates an XmlElement that holds a complete image of this tree and all its children.
|
||||
If this tree is invalid, this may return nullptr. Otherwise, the XML that is produced can
|
||||
be used to recreate a similar tree by calling ValueTree::fromXml().
|
||||
The caller must delete the object that is returned.
|
||||
@see fromXml, toXmlString
|
||||
*/
|
||||
std::unique_ptr<XmlElement> createXml() const;
|
||||
|
|
|
|||
|
|
@ -186,8 +186,6 @@ public:
|
|||
This will produce a lump of XML that can be later reloaded using
|
||||
restoreFromXml() to recreate the current mapping state.
|
||||
|
||||
The object that is returned must be deleted by the caller.
|
||||
|
||||
@param saveDifferencesFromDefaultSet if this is false, then all keypresses
|
||||
will be saved into the XML. If it's true, then the XML will
|
||||
only store the differences between the current mappings and
|
||||
|
|
|
|||
|
|
@ -144,8 +144,7 @@ public:
|
|||
/** Attempts to parse an SVG (Scalable Vector Graphics) document, and to turn this
|
||||
into a Drawable tree.
|
||||
|
||||
The object returned must be deleted by the caller. If something goes wrong
|
||||
while parsing, it may return nullptr.
|
||||
If something goes wrong while parsing, it may return nullptr.
|
||||
|
||||
SVG is a pretty large and complex spec, and this doesn't aim to be a full
|
||||
implementation, but it can return the basic vector objects.
|
||||
|
|
@ -155,8 +154,7 @@ public:
|
|||
/** Attempts to parse an SVG (Scalable Vector Graphics) document from a file,
|
||||
and to turn this into a Drawable tree.
|
||||
|
||||
The object returned must be deleted by the caller. If something goes wrong
|
||||
while parsing, it may return nullptr.
|
||||
If something goes wrong while parsing, it may return nullptr.
|
||||
|
||||
SVG is a pretty large and complex spec, and this doesn't aim to be a full
|
||||
implementation, but it can return the basic vector objects.
|
||||
|
|
|
|||
|
|
@ -499,8 +499,6 @@ public:
|
|||
for a specific item, but this can be handy if you need to briefly save the state
|
||||
for a section of the tree.
|
||||
|
||||
The caller is responsible for deleting the object that is returned.
|
||||
|
||||
Note that if all nodes of the tree are in their default state, then this may
|
||||
return a nullptr.
|
||||
|
||||
|
|
@ -796,8 +794,6 @@ public:
|
|||
completely different instance of the tree, as long as it contains nodes
|
||||
whose unique names are the same.
|
||||
|
||||
The caller is responsible for deleting the object that is returned.
|
||||
|
||||
@param alsoIncludeScrollPosition if this is true, the state will also
|
||||
include information about where the
|
||||
tree has been scrolled to vertically,
|
||||
|
|
|
|||
|
|
@ -19,19 +19,14 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
/** Creates a graphics context object that will render into the given OpenGL target.
|
||||
The caller is responsible for deleting this object when no longer needed.
|
||||
*/
|
||||
/** Creates a graphics context object that will render into the given OpenGL target. */
|
||||
std::unique_ptr<LowLevelGraphicsContext> createOpenGLGraphicsContext (OpenGLContext&, int width, int height);
|
||||
|
||||
/** Creates a graphics context object that will render into the given OpenGL framebuffer.
|
||||
The caller is responsible for deleting this object when no longer needed.
|
||||
*/
|
||||
/** Creates a graphics context object that will render into the given OpenGL framebuffer. */
|
||||
std::unique_ptr<LowLevelGraphicsContext> createOpenGLGraphicsContext (OpenGLContext&, OpenGLFrameBuffer&);
|
||||
|
||||
/** Creates a graphics context object that will render into the given OpenGL framebuffer,
|
||||
with the given size.
|
||||
The caller is responsible for deleting this object when no longer needed.
|
||||
*/
|
||||
std::unique_ptr<LowLevelGraphicsContext> createOpenGLGraphicsContext (OpenGLContext&,
|
||||
unsigned int frameBufferID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue