mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-08 04:20:09 +00:00
New class StringPool. Removed the class var::identifier from its parent class, and renamed it "Identifier" - I've left a typedef in var to allow old code to still work, but I'll remove this at some point, so please switch to using the new classname directly. Jucer development.
This commit is contained in:
parent
ed97872c1a
commit
b46e94cffd
90 changed files with 2839 additions and 1733 deletions
|
|
@ -87,7 +87,7 @@ public:
|
|||
Like an XmlElement, each ValueTree node has a type, which you can access with
|
||||
getType() and hasType().
|
||||
*/
|
||||
explicit ValueTree (const String& type);
|
||||
explicit ValueTree (const Identifier& type);
|
||||
|
||||
/** Creates a reference to another ValueTree. */
|
||||
ValueTree (const ValueTree& other);
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
/** Returns true if the node has this type.
|
||||
The comparison is case-sensitive.
|
||||
*/
|
||||
bool hasType (const String& typeName) const;
|
||||
bool hasType (const Identifier& typeName) const;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the value of a named property.
|
||||
|
|
@ -138,37 +138,37 @@ public:
|
|||
You can also use operator[] to get a property.
|
||||
@see var, setProperty, hasProperty
|
||||
*/
|
||||
const var& getProperty (const var::identifier& name) const;
|
||||
const var& getProperty (const Identifier& name) const;
|
||||
|
||||
/** Returns the value of a named property, or a user-specified default if the property doesn't exist.
|
||||
If no such property has been set, this will return the value of defaultReturnValue.
|
||||
You can also use operator[] and getProperty to get a property.
|
||||
@see var, getProperty, setProperty, hasProperty
|
||||
*/
|
||||
const var getProperty (const var::identifier& name, const var& defaultReturnValue) const;
|
||||
const var getProperty (const Identifier& name, const var& defaultReturnValue) const;
|
||||
|
||||
/** Returns the value of a named property.
|
||||
If no such property has been set, this will return a void variant. This is the same as
|
||||
calling getProperty().
|
||||
@see getProperty
|
||||
*/
|
||||
const var& operator[] (const var::identifier& name) const;
|
||||
const var& operator[] (const Identifier& name) const;
|
||||
|
||||
/** Changes a named property of the node.
|
||||
If the undoManager parameter is non-null, its UndoManager::perform() method will be used,
|
||||
so that this change can be undone.
|
||||
@see var, getProperty, removeProperty
|
||||
*/
|
||||
void setProperty (const var::identifier& name, const var& newValue, UndoManager* undoManager);
|
||||
void setProperty (const Identifier& name, const var& newValue, UndoManager* undoManager);
|
||||
|
||||
/** Returns true if the node contains a named property. */
|
||||
bool hasProperty (const var::identifier& name) const;
|
||||
bool hasProperty (const Identifier& name) const;
|
||||
|
||||
/** Removes a property from the node.
|
||||
If the undoManager parameter is non-null, its UndoManager::perform() method will be used,
|
||||
so that this change can be undone.
|
||||
*/
|
||||
void removeProperty (const var::identifier& name, UndoManager* undoManager);
|
||||
void removeProperty (const Identifier& name, UndoManager* undoManager);
|
||||
|
||||
/** Removes all properties from the node.
|
||||
If the undoManager parameter is non-null, its UndoManager::perform() method will be used,
|
||||
|
|
@ -184,7 +184,7 @@ public:
|
|||
/** Returns the identifier of the property with a given index.
|
||||
@see getNumProperties
|
||||
*/
|
||||
const var::identifier getPropertyName (int index) const;
|
||||
const Identifier getPropertyName (int index) const;
|
||||
|
||||
/** Returns a Value object that can be used to control and respond to one of the tree's properties.
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ public:
|
|||
it needs to change the value. Attaching a Value::Listener to the value object will provide
|
||||
callbacks whenever the property changes.
|
||||
*/
|
||||
Value getPropertyAsValue (const var::identifier& name, UndoManager* undoManager) const;
|
||||
Value getPropertyAsValue (const Identifier& name, UndoManager* undoManager) const;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the number of child nodes belonging to this one.
|
||||
|
|
@ -210,7 +210,7 @@ public:
|
|||
If no such node is found, it'll return an invalid node. (See isValid() to find out
|
||||
whether a node is valid).
|
||||
*/
|
||||
ValueTree getChildWithName (const String& type) const;
|
||||
ValueTree getChildWithName (const Identifier& type) const;
|
||||
|
||||
/** Looks for the first child node that has the speficied property value.
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ public:
|
|||
If no such node is found, it'll return an invalid node. (See isValid() to find out
|
||||
whether a node is valid).
|
||||
*/
|
||||
ValueTree getChildWithProperty (const var::identifier& propertyName, const var& propertyValue) const;
|
||||
ValueTree getChildWithProperty (const Identifier& propertyName, const var& propertyValue) const;
|
||||
|
||||
/** Adds a child to this node.
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ public:
|
|||
simply check the tree parameter in this callback to make sure it's the tree you're interested in.
|
||||
*/
|
||||
virtual void valueTreePropertyChanged (ValueTree& treeWhosePropertyHasChanged,
|
||||
const var::identifier& property) = 0;
|
||||
const Identifier& property) = 0;
|
||||
|
||||
/** This method is called when a child sub-tree is added or removed.
|
||||
|
||||
|
|
@ -435,31 +435,31 @@ private:
|
|||
class JUCE_API SharedObject : public ReferenceCountedObject
|
||||
{
|
||||
public:
|
||||
explicit SharedObject (const String& type);
|
||||
explicit SharedObject (const Identifier& type);
|
||||
SharedObject (const SharedObject& other);
|
||||
~SharedObject();
|
||||
|
||||
const String type;
|
||||
const Identifier type;
|
||||
NamedValueSet properties;
|
||||
ReferenceCountedArray <SharedObject> children;
|
||||
SortedSet <ValueTree*> valueTreesWithListeners;
|
||||
SharedObject* parent;
|
||||
|
||||
void sendPropertyChangeMessage (const var::identifier& property);
|
||||
void sendPropertyChangeMessage (ValueTree& tree, const var::identifier& property);
|
||||
void sendPropertyChangeMessage (const Identifier& property);
|
||||
void sendPropertyChangeMessage (ValueTree& tree, const Identifier& property);
|
||||
void sendChildChangeMessage();
|
||||
void sendChildChangeMessage (ValueTree& tree);
|
||||
void sendParentChangeMessage();
|
||||
const var& getProperty (const var::identifier& name) const;
|
||||
const var getProperty (const var::identifier& name, const var& defaultReturnValue) const;
|
||||
void setProperty (const var::identifier& name, const var& newValue, UndoManager*);
|
||||
bool hasProperty (const var::identifier& name) const;
|
||||
void removeProperty (const var::identifier& name, UndoManager*);
|
||||
const var& getProperty (const Identifier& name) const;
|
||||
const var getProperty (const Identifier& name, const var& defaultReturnValue) const;
|
||||
void setProperty (const Identifier& name, const var& newValue, UndoManager*);
|
||||
bool hasProperty (const Identifier& name) const;
|
||||
void removeProperty (const Identifier& name, UndoManager*);
|
||||
void removeAllProperties (UndoManager*);
|
||||
bool isAChildOf (const SharedObject* possibleParent) const;
|
||||
int indexOf (const ValueTree& child) const;
|
||||
ValueTree getChildWithName (const String& type) const;
|
||||
ValueTree getChildWithProperty (const var::identifier& propertyName, const var& propertyValue) const;
|
||||
ValueTree getChildWithName (const Identifier& type) const;
|
||||
ValueTree getChildWithProperty (const Identifier& propertyName, const var& propertyValue) const;
|
||||
void addChild (SharedObject* child, int index, UndoManager*);
|
||||
void removeChild (int childIndex, UndoManager*);
|
||||
void removeAllChildren (UndoManager*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue