1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +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:
Julian Storer 2010-05-15 13:22:26 +01:00
parent ed97872c1a
commit b46e94cffd
90 changed files with 2839 additions and 1733 deletions

View file

@ -35,7 +35,7 @@ NamedValueSet::NamedValue::NamedValue() throw()
{
}
inline NamedValueSet::NamedValue::NamedValue (const var::identifier& name_, const var& value_)
inline NamedValueSet::NamedValue::NamedValue (const Identifier& name_, const var& value_)
: name (name_), value (value_)
{
}
@ -65,7 +65,7 @@ int NamedValueSet::size() const throw()
return values.size();
}
const var& NamedValueSet::operator[] (const var::identifier& name) const
const var& NamedValueSet::operator[] (const Identifier& name) const
{
for (int i = values.size(); --i >= 0;)
{
@ -78,13 +78,13 @@ const var& NamedValueSet::operator[] (const var::identifier& name) const
return var::null;
}
const var NamedValueSet::getWithDefault (const var::identifier& name, const var& defaultReturnValue) const
const var NamedValueSet::getWithDefault (const Identifier& name, const var& defaultReturnValue) const
{
const var* v = getItem (name);
return v != 0 ? *v : defaultReturnValue;
}
var* NamedValueSet::getItem (const var::identifier& name) const
var* NamedValueSet::getItem (const Identifier& name) const
{
for (int i = values.size(); --i >= 0;)
{
@ -97,7 +97,7 @@ var* NamedValueSet::getItem (const var::identifier& name) const
return 0;
}
bool NamedValueSet::set (const var::identifier& name, const var& newValue)
bool NamedValueSet::set (const Identifier& name, const var& newValue)
{
for (int i = values.size(); --i >= 0;)
{
@ -117,12 +117,12 @@ bool NamedValueSet::set (const var::identifier& name, const var& newValue)
return true;
}
bool NamedValueSet::contains (const var::identifier& name) const
bool NamedValueSet::contains (const Identifier& name) const
{
return getItem (name) != 0;
}
bool NamedValueSet::remove (const var::identifier& name)
bool NamedValueSet::remove (const Identifier& name)
{
for (int i = values.size(); --i >= 0;)
{
@ -136,7 +136,7 @@ bool NamedValueSet::remove (const var::identifier& name)
return false;
}
const var::identifier NamedValueSet::getName (const int index) const
const Identifier NamedValueSet::getName (const int index) const
{
jassert (((unsigned int) index) < (unsigned int) values.size());
return values [index].name;