Drake
Drake C++ Documentation
SolverId Class Reference

Detailed Description

Identifies a SolverInterface implementation.

A moved-from instance is guaranteed to be empty and will not compare equal to any non-empty ID.

#include <drake/solvers/solver_id.h>

Public Member Functions

 ~SolverId ()=default
 
 SolverId (std::string name)
 Constructs a specific, known solver type. More...
 
const std::string & name () const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 SolverId (const SolverId &)=default
 
SolverIdoperator= (const SolverId &)=default
 
 SolverId (SolverId &&)=default
 
SolverIdoperator= (SolverId &&)=default
 

Friends

struct std::less< SolverId >
 
template<class HashAlgorithm >
void hash_append (HashAlgorithm &hasher, const SolverId &item) noexcept
 Implements the hash_append generic hashing concept. More...
 
bool operator== (const SolverId &, const SolverId &)
 
bool operator!= (const SolverId &, const SolverId &)
 

Constructor & Destructor Documentation

◆ SolverId() [1/3]

SolverId ( const SolverId )
default

◆ SolverId() [2/3]

SolverId ( SolverId &&  )
default

◆ ~SolverId()

~SolverId ( )
default

◆ SolverId() [3/3]

SolverId ( std::string  name)
explicit

Constructs a specific, known solver type.

Internally, a hidden integer is allocated and assigned to this instance; all instances that share an integer (including copies of this instance) are considered equal. The solver names are not enforced to be unique, though we recommend that they remain so in practice.

For best performance, choose a name that is 15 characters or less, so that it fits within the libstdc++ "small string" optimization ("SSO").

Member Function Documentation

◆ name()

const std::string& name ( ) const

◆ operator=() [1/2]

SolverId& operator= ( const SolverId )
default

◆ operator=() [2/2]

SolverId& operator= ( SolverId &&  )
default

Friends And Related Function Documentation

◆ hash_append

void hash_append ( HashAlgorithm &  hasher,
const SolverId item 
)
friend

Implements the hash_append generic hashing concept.

◆ operator!=

bool operator!= ( const SolverId ,
const SolverId  
)
friend

◆ operator==

bool operator== ( const SolverId ,
const SolverId  
)
friend

◆ std::less< SolverId >

friend struct std::less< SolverId >
friend

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