OpenShot Audio Library | OpenShotAudio: juce::Identifier Class Reference

OpenShot Audio Library | OpenShotAudio 0.3.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
juce::Identifier Class Referencefinal

`#include <juce_Identifier.h>`

## Public Member Functions
| Identifier () noexcept
| Identifier (const char *name)
| Identifier (const String &name)
| Identifier (String::CharPointerType nameStart, String::CharPointerType nameEnd)
| Identifier (const Identifier &other) noexcept
Identifier & | operator= (const Identifier &other) noexcept
| Identifier (Identifier &&other) noexcept
Identifier & | operator= (Identifier &&other) noexcept
| ~Identifier () noexcept
bool | operator== (const Identifier &other) const noexcept
bool | operator!= (const Identifier &other) const noexcept
bool | operator== (StringRef other) const noexcept
bool | operator!= (StringRef other) const noexcept
bool | operator< (StringRef other) const noexcept
bool | operator<= (StringRef other) const noexcept
bool | operator> (StringRef other) const noexcept
bool | operator>= (StringRef other) const noexcept
const String & | toString () const noexcept
| operator String::CharPointerType () const noexcept
String::CharPointerType | getCharPointer () const noexcept
| operator StringRef () const noexcept
bool | isValid () const noexcept
bool | isNull () const noexcept

## Static Public Member Functions
static bool | isValidIdentifier (const String &possibleIdentifier) noexcept

## Static Public Attributes
static Identifier | null

## Detailed Description

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

Definition at line 38 of file juce_Identifier.h.

## Constructor & Destructor Documentation

## ◆ Identifier() [1/6]

juce::Identifier::Identifier | ( |  | ) |
| noexcept

Creates a null identifier.

Definition at line 26 of file juce_Identifier.cpp.

## ◆ Identifier() [2/6]

juce::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.

Definition at line 52 of file juce_Identifier.cpp.

## ◆ Identifier() [3/6]

juce::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.

Definition at line 45 of file juce_Identifier.cpp.

## ◆ Identifier() [4/6]

juce::Identifier::Identifier | ( | String::CharPointerType | nameStart,
|  | String::CharPointerType | nameEnd
| ) |  |

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.

Definition at line 59 of file juce_Identifier.cpp.

## ◆ Identifier() [5/6]

juce::Identifier::Identifier | ( | const Identifier & | other | ) |
| noexcept

Creates a copy of another identifier.

Definition at line 29 of file juce_Identifier.cpp.

## ◆ Identifier() [6/6]

juce::Identifier::Identifier | ( | Identifier && | other | ) |
| noexcept

Creates a copy of another identifier.

Definition at line 31 of file juce_Identifier.cpp.

## ◆ ~Identifier()

juce::Identifier::~Identifier | ( |  | ) |
| noexcept

Destructor

Definition at line 27 of file juce_Identifier.cpp.

## Member Function Documentation

## ◆ getCharPointer()

String::CharPointerType juce::Identifier::getCharPointer | ( |  | ) | const
| inlinenoexcept

Returns this identifier's raw string pointer.

Definition at line 108 of file juce_Identifier.h.

Referenced by operator==().

## ◆ isNull()

bool juce::Identifier::isNull | ( |  | ) | const
| inlinenoexcept

Returns true if this Identifier is null

Definition at line 117 of file juce_Identifier.h.

## ◆ isValid()

bool juce::Identifier::isValid | ( |  | ) | const
| inlinenoexcept

Returns true if this Identifier is not null

Definition at line 114 of file juce_Identifier.h.

## ◆ isValidIdentifier()

bool juce::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.

Definition at line 68 of file juce_Identifier.cpp.

## ◆ operator String::CharPointerType()

juce::Identifier::operator String::CharPointerType | ( |  | ) | const
| inlinenoexcept

Returns this identifier's raw string pointer.

Definition at line 105 of file juce_Identifier.h.

## ◆ operator StringRef()

juce::Identifier::operator StringRef | ( |  | ) | const
| inlinenoexcept

Returns this identifier as a StringRef.

Definition at line 111 of file juce_Identifier.h.

## ◆ operator!=() [1/2]

bool juce::Identifier::operator!= | ( | const Identifier & | other | ) | const
| inlinenoexcept

Compares two identifiers. This is a very fast operation.

Definition at line 81 of file juce_Identifier.h.

## ◆ operator!=() [2/2]

bool juce::Identifier::operator!= | ( | StringRef | other | ) | const
| inlinenoexcept

Compares the identifier with a string.

Definition at line 87 of file juce_Identifier.h.

## ◆ operator<()

bool juce::Identifier::operator< | ( | StringRef | other | ) | const
| inlinenoexcept

Compares the identifier with a string.

Definition at line 90 of file juce_Identifier.h.

## ◆ operator<=()

bool juce::Identifier::operator<= | ( | StringRef | other | ) | const
| inlinenoexcept

Compares the identifier with a string.

Definition at line 93 of file juce_Identifier.h.

## ◆ operator=() [1/2]

Identifier & juce::Identifier::operator= | ( | const Identifier & | other | ) |
| noexcept

Creates a copy of another identifier.

Definition at line 39 of file juce_Identifier.cpp.

## ◆ operator=() [2/2]

Identifier & juce::Identifier::operator= | ( | Identifier && | other | ) |
| noexcept

Creates a copy of another identifier.

Definition at line 33 of file juce_Identifier.cpp.

## ◆ operator==() [1/2]

bool juce::Identifier::operator== | ( | const Identifier & | other | ) | const
| inlinenoexcept

Compares two identifiers. This is a very fast operation.

Definition at line 78 of file juce_Identifier.h.

## ◆ operator==() [2/2]

bool juce::Identifier::operator== | ( | StringRef | other | ) | const
| inlinenoexcept

Compares the identifier with a string.

Definition at line 84 of file juce_Identifier.h.

## ◆ operator>()

bool juce::Identifier::operator> | ( | StringRef | other | ) | const
| inlinenoexcept

Compares the identifier with a string.

Definition at line 96 of file juce_Identifier.h.

## ◆ operator>=()

bool juce::Identifier::operator>= | ( | StringRef | other | ) | const
| inlinenoexcept

Compares the identifier with a string.

Definition at line 99 of file juce_Identifier.h.

## ◆ toString()

const String & juce::Identifier::toString | ( |  | ) | const
| inlinenoexcept

Returns this identifier as a string.

Definition at line 102 of file juce_Identifier.h.

Referenced by juce::ValueTree::setPropertyExcludingListener(), and juce::ValueTree::ValueTree().

## Member Data Documentation

## ◆ null

Identifier juce::Identifier::null
| static

A null identifier.

Definition at line 120 of file juce_Identifier.h.

The documentation for this class was generated from the following files:

- juce_Identifier.h
- juce_Identifier.cpp