Spec
ModCyclicShape ModifiedStringA string leaving out don't-care-positions defined in CyclicShape.
Extends | ModifiedString |
---|---|
All Extended | ModifiedString |
All Impl'd | AssignableConcept, ContainerConcept, DestructibleConcept |
Defined in | <seqan/modifier.h> |
Signature |
template <typename THost, typename TSpec>
class ModifiedString<THost, ModCyclicShape<CyclicShape<TSpec> > >;
|
Interface Function Overview
-
TIterator end(modStr[, tag]);
Returns an iterator to the end of the container.
Interface Functions Inherited From AssignableConcept
Interface Functions Inherited From ContainerConcept
Interface Metafunction Overview
-
Cargo<ModifiedString<THost, ModCyclicShape<CyclicShape<TSpec> > > >::Type;
Cargo of ModCyclicShape ModCyclicShape Modified Iterator and ModCyclicShape Modified String.
Interface Metafunctions Inherited From ContainerConcept
Detailed Description
ModCyclicShape Modifier should only be used to view/read a sequence, never to change the underlying sequence. Some operations will work, e.g. you can use the operator*() of the ModifiedIterator to change a character, but other operations like replace or append are unsafe or even conceptionally wrong.
Applies a CyclicShape to a string. The resulting modified string skips don't-care positions and can thus be shorter than the original string. Of course the underlying string is not changed by the modifier.
Examples
Use case for GenericCyclicShapes:
typedef ModifiedString<CharString, ModCyclicShape<TShape> > TModString;
CharString str = "das ist das Haus vom Nikolaus";
TModString modStr(str, shape);
std::cout << str << " => " << modStr << std::endl;
Use case for FixedCyclicShapes:
typedef ModifiedString<CharString, ModCyclicShape<TShape> > TModString;
CharString str = "das ist das Haus vom Nikolaus";
TModString modStr(str);
std::cout << str << " => " << modStr << std::endl;
See Also
Interface Functions Detail
TIterator end(modStr[, tag]);
Template Parameters
TIterator |
ModCyclicShape Modified Iterator to be returned. |
---|
Parameters
modStr
|
ModCyclicShape Modified String. |
---|---|
An
|
optional tag for selecting the type of the iterator. One of Standard and Rooted. When left out, DefaultGetIteratorSpec of modStr is used. |
Returns
Iterator |
to the end of the container, the type is selected by #Fn<>ContainerConcept#Iterator with the given (or default) tag. |
---|
The end iterator is not guaranteed to be at position length(modStr), where a standard iterator ends. Due to the jumping-tequniche of ModCyclicShape Modified Iterator, the end iterator is set to the first care position after the end of the string. The invariant is: host(end(modStr)) >= end(host(modStr)) where the the larger or equal operator refers to the position in the sequence.
If for some reason you use the host iterator to check an end condition, make sure you use for(...; host(modIter) >= end(host(modStr)); ...) instead of for(...; host(modIter) != end(host(modStr)); ...) .