Maintains a collection of Servers.
#include <Authentication/Common/servers.h>
◆ Servers()
Constructs the servers collection.
◆ ~Servers()
◆ add()
void add |
( |
const Server & |
server, |
|
|
const bool |
pushFront = false |
|
) |
| |
Adds a server to the collection.
- Parameters
-
server | the server to add |
pushFront | indicates if the server should be added to the front. |
◆ clear()
Clears the servers in the collection.
◆ count()
Returns a count of the servers in the collection.
- Returns
- Returns a count of the servers in the collection.
◆ countByScope()
Returns a count of servers in a given settings area.
- Returns
- Returns a count of the servers in the provided settings area.
◆ demote()
void demote |
( |
const Server & |
server | ) |
|
Demotes the provided server.
- Parameters
-
server | The server to demote. |
◆ empty()
Indicates if the collection is empty or not.
- Returns
- True if the collection is not empty.
◆ getCopyByScope()
Returns a copy of servers of the provided scope.
- Parameters
-
scope | the scope of the desired servers. |
copyTo | the servers collection to copy the servers to. |
◆ indexOf()
int indexOf |
( |
const Server & |
server | ) |
const |
Returns the index of the provided server.
- Returns
- The index of the provided server.
◆ insertAt()
void insertAt |
( |
const Server & |
server, |
|
|
int |
index |
|
) |
| |
Inserts a server into a location in the collection.
- Parameters
-
server | The server to insert. |
index | the index at which to insert the server. |
◆ operator[]() [1/2]
Server & operator[] |
( |
int |
index | ) |
|
Array access operator.
- Parameters
-
index | the index of the element to return. |
- Returns
- returns the server at index.
◆ operator[]() [2/2]
const Server & operator[] |
( |
int |
index | ) |
const |
Array access operator.
- Parameters
-
index | the index of the element to return. |
- Returns
- returns the server at index.
◆ promote()
void promote |
( |
const Server & |
server | ) |
|
Promotes the specified server.
- Parameters
-
server | The server to promote. |
◆ remove()
void remove |
( |
const int |
index | ) |
|
Removes a server from the collection.
- Parameters
-
index | the index of the server to remove. |