Workspace 6.21.5
Public Member Functions | List of all members
Servers Class Reference

Maintains a collection of Servers.

#include <Authentication/Common/servers.h>

Public Member Functions

 Servers ()
 
virtual ~Servers ()
 
void add (const Server &, const bool pushFront=false)
 
void clear ()
 
int count () const
 
int countByScope (Server::Scope scope) const
 
void demote (const Server &)
 
bool empty () const
 
void getCopyByScope (Server::Scope scope, Servers &copyTo) const
 
int indexOf (const Server &) const
 
void insertAt (const Server &, int index)
 
Serveroperator[] (int index)
 
const Serveroperator[] (int index) const
 
void promote (const Server &)
 
void remove (const int index)
 

Constructor & Destructor Documentation

◆ Servers()

Servers ( )
default

Constructs the servers collection.

◆ ~Servers()

~Servers ( )
virtualdefault

The destructor.

Member Function Documentation

◆ add()

void add ( const Server server,
const bool  pushFront = false 
)

Adds a server to the collection.

Parameters
serverthe server to add
pushFrontindicates if the server should be added to the front.

◆ clear()

void clear ( )

Clears the servers in the collection.

◆ count()

int count ( ) const

Returns a count of the servers in the collection.

Returns
Returns a count of the servers in the collection.

◆ countByScope()

int countByScope ( Server::Scope  scope) const

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
serverThe server to demote.

◆ empty()

bool empty ( ) const

Indicates if the collection is empty or not.

Returns
True if the collection is not empty.

◆ getCopyByScope()

void getCopyByScope ( Server::Scope  scope,
Servers copyTo 
) const

Returns a copy of servers of the provided scope.

Parameters
scopethe scope of the desired servers.
copyTothe 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
serverThe server to insert.
indexthe index at which to insert the server.

◆ operator[]() [1/2]

Server & operator[] ( int  index)

Array access operator.

Parameters
indexthe 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
indexthe index of the element to return.
Returns
returns the server at index.

◆ promote()

void promote ( const Server server)

Promotes the specified server.

Parameters
serverThe server to promote.

◆ remove()

void remove ( const int  index)

Removes a server from the collection.

Parameters
indexthe index of the server to remove.