NCBI C++ ToolKit
Classes | Public Member Functions | Private Attributes | List of all members
CMultiAlignerOptions::CPattern Class Reference

Search Toolkit Book for CMultiAlignerOptions::CPattern

Representation of CDD pattern. More...

#include <algo/cobalt/options.hpp>

+ Collaboration diagram for CMultiAlignerOptions::CPattern:

Classes

struct  SPattern
 

Public Member Functions

 CPattern (void)
 Create empty pattern. More...
 
 CPattern (char *pattern)
 Create pattern as pointer. More...
 
 CPattern (const string &pattern)
 Create pattern as string. More...
 
 CPattern (const CPattern &pattern)
 Create copy of a pattern. More...
 
CPatternoperator= (const CPattern &pattern)
 Assignment operator. More...
 
const char * AsPointer (void) const
 Get pattern as pointer. More...
 
string AsString (void) const
 Get a copy of a pattern as string. More...
 
bool IsPointer (void) const
 Check if pattern is stored as pointer. More...
 
bool IsEmpty (void) const
 Check if pattern is empty. More...
 

Private Attributes

SPattern m_Pattern
 
bool m_IsPointer
 

Detailed Description

Representation of CDD pattern.

Pattern is represented either as string or pointer in order to avoid copying large blocks if patterns are already in memory. Representation is selected by the use of constructor. String constructor creates a copy of the argument, pointer one does not.

Definition at line 107 of file options.hpp.

Constructor & Destructor Documentation

◆ CPattern() [1/4]

CMultiAlignerOptions::CPattern::CPattern ( void  )
inline

Create empty pattern.

Definition at line 112 of file options.hpp.

◆ CPattern() [2/4]

CMultiAlignerOptions::CPattern::CPattern ( char *  pattern)
inline

Create pattern as pointer.

Referenced memory is not copied.

Parameters
patternPattern

Definition at line 117 of file options.hpp.

◆ CPattern() [3/4]

CMultiAlignerOptions::CPattern::CPattern ( const string pattern)
inline

Create pattern as string.

The argument is copied.

Parameters
patternPattern

Definition at line 122 of file options.hpp.

◆ CPattern() [4/4]

CMultiAlignerOptions::CPattern::CPattern ( const CPattern pattern)
inline

Create copy of a pattern.

Parameters
patternPattern

Definition at line 127 of file options.hpp.

References m_IsPointer, m_Pattern, CMultiAlignerOptions::CPattern::SPattern::pointer, and CMultiAlignerOptions::CPattern::SPattern::str.

Member Function Documentation

◆ AsPointer()

const char* CMultiAlignerOptions::CPattern::AsPointer ( void  ) const
inline

Get pattern as pointer.

Returns
Pointer to a pattern

Definition at line 155 of file options.hpp.

◆ AsString()

string CMultiAlignerOptions::CPattern::AsString ( void  ) const
inline

Get a copy of a pattern as string.

Returns
Copy of pattern

Definition at line 161 of file options.hpp.

◆ IsEmpty()

bool CMultiAlignerOptions::CPattern::IsEmpty ( void  ) const
inline

Check if pattern is empty.

Returns
True if patter is empty, False otherwise

Definition at line 174 of file options.hpp.

◆ IsPointer()

bool CMultiAlignerOptions::CPattern::IsPointer ( void  ) const
inline

Check if pattern is stored as pointer.

Returns
True if pattern is stored as pointer, False otherwise

Definition at line 168 of file options.hpp.

◆ operator=()

CPattern& CMultiAlignerOptions::CPattern::operator= ( const CPattern pattern)
inline

Assignment operator.

Parameters
patternPattern

Definition at line 140 of file options.hpp.

References m_IsPointer, m_Pattern, CMultiAlignerOptions::CPattern::SPattern::pointer, and CMultiAlignerOptions::CPattern::SPattern::str.

Member Data Documentation

◆ m_IsPointer

bool CMultiAlignerOptions::CPattern::m_IsPointer
private

Definition at line 188 of file options.hpp.

Referenced by CPattern(), and operator=().

◆ m_Pattern

SPattern CMultiAlignerOptions::CPattern::m_Pattern
private

Definition at line 187 of file options.hpp.

Referenced by CPattern(), and operator=().


The documentation for this class was generated from the following file:
Modified on Wed Jun 19 17:05:35 2024 by modify_doxy.py rev. 669887