OpenStructure
Public Types | Public Member Functions | Protected Member Functions | Friends
ConstSequenceHandle Class Reference

#include <sequence_handle.hh>

Inherits ConstGenericPropContainer< ConstSequenceHandle >.

Public Types

typedef String::const_iterator iterator
 

Public Member Functions

 ConstSequenceHandle ()
 
int GetResidueIndex (int pos) const
 
int GetPos (int residue_index) const
 
int GetFirstNonGap () const
 
int GetLastNonGap () const
 
const StringGetName () const
 
const StringGetString () const
 
String GetGaplessString () const
 
int GetOffset () const
 
int GetLength () const
 
int GetIndex (const String &substr) const
 
char GetOneLetterCode (int position) const
 
mol::ResidueView GetResidue (int position) const
 
mol::EntityView GetAttachedView () const
 
SequenceHandle Copy () const
 
bool HasAttachedView () const
 
const StringGetRole () const
 
bool operator== (const ConstSequenceHandle &rhs) const
 
bool operator!= (const ConstSequenceHandle &rhs) const
 
char operator[] (int index) const
 
iterator begin () const
 
iterator end () const
 
bool IsValid () const
 
 ConstSequenceHandle (const impl::SequenceImplPtr &impl)
 
impl::SequenceImplPtrImpl () const
 
- Public Member Functions inherited from ConstGenericPropContainer< ConstSequenceHandle >
bool HasProp (const String &key) const
 
String GetPropAsString (const String &key) const
 
String GetStringProp (const String &key) const
 
String GetStringProp (const String &key, const String &def) const
 
Real GetFloatProp (const String &key) const
 
Real GetFloatProp (const String &key, Real def) const
 
int GetIntProp (const String &key) const
 
int GetIntProp (const String &key, int def) const
 
bool GetBoolProp (const String &key) const
 
bool GetBoolProp (const String &key, bool def) const
 
geom::Vec3 GetVec3Prop (const String &key) const
 
std::map< String, GenericPropValueGetPropMap () const
 
std::vector< StringGetPropList () const
 

Protected Member Functions

GenericPropContainerImplGpImpl ()
 
const GenericPropContainerImplGpImpl () const
 
- Protected Member Functions inherited from ConstGenericPropContainer< ConstSequenceHandle >
gp_get (const String &key) const
 
gp_get (const String &key, const T &def) const
 
GenericPropContainerImplGetImpl ()
 
const GenericPropContainerImplGetImpl () const
 

Friends

class ConstGenericPropContainer< ConstSequenceHandle >
 
class AlignmentHandle
 
class ConstSequenceList
 
class SequenceList
 

Detailed Description

immutable sequence

The ConstSequenceHandle provides all read-only methods of the sequence handle.

Definition at line 48 of file sequence_handle.hh.

Member Typedef Documentation

◆ iterator

typedef String::const_iterator iterator

Definition at line 56 of file sequence_handle.hh.

Constructor & Destructor Documentation

◆ ConstSequenceHandle() [1/2]

create invalid sequence handle

See also
IsValid()

◆ ConstSequenceHandle() [2/2]

Member Function Documentation

◆ begin()

iterator begin ( ) const
inline

Definition at line 132 of file sequence_handle.hh.

◆ Copy()

SequenceHandle Copy ( ) const

create copy sequence The newly created sequence has the same attached view.

◆ end()

iterator end ( ) const
inline

Definition at line 133 of file sequence_handle.hh.

◆ GetAttachedView()

mol::EntityView GetAttachedView ( ) const

get attached view. may be an invalid entity view

See also
SequenceHandle::AttachView(const mol::EntityView&, const String&)

◆ GetFirstNonGap()

int GetFirstNonGap ( ) const

Get position of first non-gap character in sequence.

◆ GetGaplessString()

String GetGaplessString ( ) const

Get sequence as string ignoring gaps.

◆ GetIndex()

int GetIndex ( const String substr) const

get index of substring

◆ GetLastNonGap()

int GetLastNonGap ( ) const

Get position of last non-gap character in sequence.

◆ GetLength()

int GetLength ( ) const

Get lenght of sequence, including gaps.

◆ GetName()

const String& GetName ( ) const

Get name of sequence.

See also
SequenceHandle::GetName()

◆ GetOffset()

int GetOffset ( ) const

Get sequence offset from N-terminus.

See also
SequenceHandle::SetOffset

◆ GetOneLetterCode()

char GetOneLetterCode ( int  position) const

get one letter code of residue at position

◆ GetPos()

int GetPos ( int  residue_index) const

Get zero-based index for given residue number.

Exceptions
out_of_range,ifnumber is not included in sequence.

◆ GetResidue()

mol::ResidueView GetResidue ( int  position) const

get residue at position

will return the residue view at the given sequence position or an invalid residue view when no view is attached, the index is out of bounds or the position contains a gap.

◆ GetResidueIndex()

int GetResidueIndex ( int  pos) const

Get residue index corresponding to given sequence position.

Parameters
poszero-based index
Exceptions
out_of_rangeif pos is not in [0, length-1].

◆ GetRole()

const String& GetRole ( ) const

◆ GetString()

const String& GetString ( ) const

get sequence as a string, including all the gaps

See also
GetGaplessString()

◆ GpImpl() [1/2]

GenericPropContainerImpl* GpImpl ( )
protected

◆ GpImpl() [2/2]

const GenericPropContainerImpl* GpImpl ( ) const
protected

◆ HasAttachedView()

bool HasAttachedView ( ) const

whether the sequence has an attached view

See also
SequenceHandle::AttachView(const mol::EntityView&, const String&)

◆ Impl()

impl::SequenceImplPtr& Impl ( ) const

◆ IsValid()

bool IsValid ( ) const

whether the sequence is valid

◆ operator!=()

bool operator!= ( const ConstSequenceHandle rhs) const

◆ operator==()

bool operator== ( const ConstSequenceHandle rhs) const

◆ operator[]()

char operator[] ( int  index) const

Friends And Related Function Documentation

◆ AlignmentHandle

friend class AlignmentHandle
friend

Definition at line 52 of file sequence_handle.hh.

◆ ConstGenericPropContainer< ConstSequenceHandle >

Definition at line 328 of file sequence_handle.hh.

◆ ConstSequenceList

friend class ConstSequenceList
friend

Definition at line 53 of file sequence_handle.hh.

◆ SequenceList

friend class SequenceList
friend

Definition at line 54 of file sequence_handle.hh.


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