Represents a string identifier, designed for accessing properties by name.
More...
#include <juce_Identifier.h>
Represents a string identifier, designed for accessing properties by name.
Comparing two Identifier objects is very fast (an O(1) operation), but creating them can be slower than just using a String directly, so the optimal way to use them is to keep some static Identifier objects for the things you use often.
- See also
- NamedValueSet, ValueTree
◆ Identifier() [1/6]
Identifier::Identifier |
( |
| ) |
|
|
noexcept |
Creates a null identifier.
◆ Identifier() [2/6]
Identifier::Identifier |
( |
const char * |
name | ) |
|
Creates an identifier with a specified name.
Because this name may need to be used in contexts such as script variables or XML tags, it must only contain ascii letters and digits, or the underscore character.
◆ Identifier() [3/6]
Identifier::Identifier |
( |
const String & |
name | ) |
|
Creates an identifier with a specified name.
Because this name may need to be used in contexts such as script variables or XML tags, it must only contain ascii letters and digits, or the underscore character.
◆ Identifier() [4/6]
Creates an identifier with a specified name.
Because this name may need to be used in contexts such as script variables or XML tags, it must only contain ascii letters and digits, or the underscore character.
◆ Identifier() [5/6]
Identifier::Identifier |
( |
const Identifier & |
other | ) |
|
|
noexcept |
Creates a copy of another identifier.
◆ Identifier() [6/6]
Creates a copy of another identifier.
◆ ~Identifier()
Identifier::~Identifier |
( |
| ) |
|
|
noexcept |
◆ getCharPointer()
◆ isNull()
bool Identifier::isNull |
( |
| ) |
const |
|
inlinenoexcept |
◆ isValid()
bool Identifier::isValid |
( |
| ) |
const |
|
inlinenoexcept |
◆ isValidIdentifier()
static bool Identifier::isValidIdentifier |
( |
const String & |
possibleIdentifier | ) |
|
|
staticnoexcept |
Checks a given string for characters that might not be valid in an Identifier.
Since Identifiers are used as a script variables and XML attributes, they should only contain alphanumeric characters, underscores, or the '-' and ':' characters.
◆ operator String::CharPointerType()
◆ operator StringRef()
◆ operator!=() [1/2]
bool Identifier::operator!= |
( |
const Identifier & |
other | ) |
const |
|
inlinenoexcept |
◆ operator!=() [2/2]
bool Identifier::operator!= |
( |
StringRef |
other | ) |
const |
|
inlinenoexcept |
Compares the identifier with a string.
◆ operator<()
bool Identifier::operator< |
( |
StringRef |
other | ) |
const |
|
inlinenoexcept |
Compares the identifier with a string.
◆ operator<=()
bool Identifier::operator<= |
( |
StringRef |
other | ) |
const |
|
inlinenoexcept |
Compares the identifier with a string.
◆ operator=() [1/2]
Creates a copy of another identifier.
◆ operator=() [2/2]
Creates a copy of another identifier.
◆ operator==() [1/2]
bool Identifier::operator== |
( |
const Identifier & |
other | ) |
const |
|
inlinenoexcept |
◆ operator==() [2/2]
bool Identifier::operator== |
( |
StringRef |
other | ) |
const |
|
inlinenoexcept |
Compares the identifier with a string.
◆ operator>()
bool Identifier::operator> |
( |
StringRef |
other | ) |
const |
|
inlinenoexcept |
Compares the identifier with a string.
◆ operator>=()
bool Identifier::operator>= |
( |
StringRef |
other | ) |
const |
|
inlinenoexcept |
Compares the identifier with a string.
◆ toString()
const String& Identifier::toString |
( |
| ) |
const |
|
inlinenoexcept |
Returns this identifier as a string.
◆ name
◆ null
The documentation for this class was generated from the following file: