Enhancement - parse sequence like 1,3,5-10 for IDs

- Now parses sequences as well as IDs.
- Sequences implemented for the info report.
This commit is contained in:
Paul Beckingham
2009-05-05 01:59:07 -04:00
parent d135dc2337
commit fb674a5626
5 changed files with 52 additions and 37 deletions

View File

@@ -37,6 +37,7 @@ T::T ()
mUUID = uuid ();
mStatus = pending;
mId = 0;
mSequence.clear ();
mTags.clear ();
mAttributes.clear ();
mDescription = "";
@@ -59,6 +60,7 @@ T::T (const T& other)
mStatus = other.mStatus;
mUUID = other.mUUID;
mId = other.mId;
mSequence = other.mSequence;
mDescription = other.mDescription;
mTags = other.mTags;
mRemoveTags = other.mRemoveTags;
@@ -74,6 +76,7 @@ T& T::operator= (const T& other)
mStatus = other.mStatus;
mUUID = other.mUUID;
mId = other.mId;
mSequence = other.mSequence;
mDescription = other.mDescription;
mTags = other.mTags;
mRemoveTags = other.mRemoveTags;
@@ -286,6 +289,16 @@ void T::addAnnotation (const std::string& description)
mAnnotations[time (NULL)] = sanitized;
}
////////////////////////////////////////////////////////////////////////////////
bool T::inSequence (int id) const
{
foreach (seq, mSequence)
if (*seq == id)
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
// uuid status [tags] [attributes] [annotations] description
//