NCBI C++ ToolKit
|
Search Toolkit Book for CAmbiguousRegion
Ambiguous portion of a sequence. More...
Public Member Functions | |
CAmbiguousRegion () | |
Construct a new, empty, ambiguous region. More... | |
CAmbiguousRegion (int value, int offset) | |
Construct a new ambiguous region one letter in length. More... | |
CAmbiguousRegion (int value, int offset, int length) | |
Construct a new ambiguous region of a specified length. More... | |
bool | Append (int value, int offset) |
Try to append a letter to an ambiguous region. More... | |
int | Value () const |
Get the letter value for this region. More... | |
int | Length () const |
Get the length of this ambiguous region. More... | |
int | Offset () const |
Get the starting offset of the region. More... | |
Private Types | |
enum | { eMaxLength = 0xFFF } |
Private Attributes | |
int | m_Start |
Starting offset (offset of first base). More... | |
int | m_End |
End offset (offset of first disincluded base.) More... | |
int | m_Value |
Value of base (ambiguity letter). More... | |
Ambiguous portion of a sequence.
This class represents a portion of a sequence that is ambiguous. The ambiguites represented by this region must have the same ambiguity letter, be contiguous, and span at most 4095 letters. If any of these conditions is not met, the issue may be solved by the use of multiple objects of this class.
Definition at line 51 of file writedb_convert.cpp.
|
private |
Enumerator | |
---|---|
eMaxLength | Maximum length of a region. |
Definition at line 141 of file writedb_convert.cpp.
|
inline |
Construct a new, empty, ambiguous region.
Definition at line 54 of file writedb_convert.cpp.
Construct a new ambiguous region one letter in length.
value | Ambiguity letter to use. [in] |
offset | Starting offset of the ambiguity. [in] |
Definition at line 64 of file writedb_convert.cpp.
Construct a new ambiguous region of a specified length.
value | Ambiguity letter to use. [in] |
offset | Starting offset of the ambiguity. [in] |
length | Length of the ambiguity. [in] |
Definition at line 75 of file writedb_convert.cpp.
Try to append a letter to an ambiguous region.
The provided letter will be appended to this region if the resulting region would be 4095 or fewer letters in length, contain only one ambiguity letter, and be contiguous. If it would not, false is returned and this region is unchanged.
value | Ambiguity letter to use. [in] |
offset | Starting offset of the ambiguity. [in] |
Definition at line 92 of file writedb_convert.cpp.
References _ASSERT, eMaxLength, Length(), m_End, m_Value, offset, and rapidjson::value.
|
inline |
Get the length of this ambiguous region.
Definition at line 115 of file writedb_convert.cpp.
References m_End, and m_Start.
Referenced by Append().
|
inline |
Get the starting offset of the region.
Definition at line 122 of file writedb_convert.cpp.
References m_Start.
|
inline |
Get the letter value for this region.
Definition at line 108 of file writedb_convert.cpp.
References m_Value.
|
private |
End offset (offset of first disincluded base.)
Definition at line 146 of file writedb_convert.cpp.
|
private |
Starting offset (offset of first base).
Definition at line 145 of file writedb_convert.cpp.
|
private |
Value of base (ambiguity letter).
Definition at line 147 of file writedb_convert.cpp.