Gemmi C++ API
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
gemmi::OptionalInt< N > Struct Template Reference

#include <seqid.hpp>

Public Types

enum  { None =N }
 
using value_type = int
 

Public Member Functions

 OptionalInt ()=default
 
 OptionalInt (int n)
 
bool has_value () const
 
std::string str (char null='?') const
 
OptionalIntoperator= (int n)
 
bool operator== (const OptionalInt &o) const
 
bool operator!= (const OptionalInt &o) const
 
bool operator< (const OptionalInt &o) const
 
bool operator== (int n) const
 
bool operator!= (int n) const
 
OptionalInt operator+ (OptionalInt o) const
 
OptionalInt operator- (OptionalInt o) const
 
OptionalIntoperator+= (int n)
 
OptionalIntoperator-= (int n)
 
 operator int () const
 
 operator bool () const
 
intoperator* ()
 
const intoperator* () const
 
intemplace (int n)
 

Public Attributes

int value = None
 

Detailed Description

template<int N>
struct gemmi::OptionalInt< N >

Definition at line 17 of file seqid.hpp.

Member Typedef Documentation

◆ value_type

template<int N>
using gemmi::OptionalInt< N >::value_type = int

Definition at line 46 of file seqid.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<int N>
anonymous enum
Enumerator
None 

Definition at line 18 of file seqid.hpp.

Constructor & Destructor Documentation

◆ OptionalInt() [1/2]

template<int N>
gemmi::OptionalInt< N >::OptionalInt ( )
default

◆ OptionalInt() [2/2]

template<int N>
gemmi::OptionalInt< N >::OptionalInt ( int  n)
inline

Definition at line 22 of file seqid.hpp.

Member Function Documentation

◆ has_value()

template<int N>
bool gemmi::OptionalInt< N >::has_value ( ) const
inline

Definition at line 23 of file seqid.hpp.

◆ str()

template<int N>
std::string gemmi::OptionalInt< N >::str ( char  null = '?') const
inline

Definition at line 24 of file seqid.hpp.

◆ operator=()

template<int N>
OptionalInt & gemmi::OptionalInt< N >::operator= ( int  n)
inline

Definition at line 27 of file seqid.hpp.

◆ operator==() [1/2]

template<int N>
bool gemmi::OptionalInt< N >::operator== ( const OptionalInt< N > &  o) const
inline

Definition at line 28 of file seqid.hpp.

◆ operator!=() [1/2]

template<int N>
bool gemmi::OptionalInt< N >::operator!= ( const OptionalInt< N > &  o) const
inline

Definition at line 29 of file seqid.hpp.

◆ operator<()

template<int N>
bool gemmi::OptionalInt< N >::operator< ( const OptionalInt< N > &  o) const
inline

Definition at line 30 of file seqid.hpp.

◆ operator==() [2/2]

template<int N>
bool gemmi::OptionalInt< N >::operator== ( int  n) const
inline

Definition at line 33 of file seqid.hpp.

◆ operator!=() [2/2]

template<int N>
bool gemmi::OptionalInt< N >::operator!= ( int  n) const
inline

Definition at line 34 of file seqid.hpp.

◆ operator+()

template<int N>
OptionalInt gemmi::OptionalInt< N >::operator+ ( OptionalInt< N o) const
inline

Definition at line 35 of file seqid.hpp.

◆ operator-()

template<int N>
OptionalInt gemmi::OptionalInt< N >::operator- ( OptionalInt< N o) const
inline

Definition at line 38 of file seqid.hpp.

◆ operator+=()

template<int N>
OptionalInt & gemmi::OptionalInt< N >::operator+= ( int  n)
inline

Definition at line 41 of file seqid.hpp.

◆ operator-=()

template<int N>
OptionalInt & gemmi::OptionalInt< N >::operator-= ( int  n)
inline

Definition at line 42 of file seqid.hpp.

◆ operator int()

template<int N>
gemmi::OptionalInt< N >::operator int ( ) const
inlineexplicit

Definition at line 43 of file seqid.hpp.

◆ operator bool()

template<int N>
gemmi::OptionalInt< N >::operator bool ( ) const
inlineexplicit

Definition at line 44 of file seqid.hpp.

◆ operator*() [1/2]

template<int N>
int & gemmi::OptionalInt< N >::operator* ( )
inline

Definition at line 47 of file seqid.hpp.

◆ operator*() [2/2]

template<int N>
const int & gemmi::OptionalInt< N >::operator* ( ) const
inline

Definition at line 48 of file seqid.hpp.

◆ emplace()

template<int N>
int & gemmi::OptionalInt< N >::emplace ( int  n)
inline

Definition at line 49 of file seqid.hpp.

Member Data Documentation

◆ value

template<int N>
int gemmi::OptionalInt< N >::value = None

Definition at line 19 of file seqid.hpp.


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