Open methods for testing

This commit is contained in:
Takeshi Yokemura
2021-08-13 18:09:27 +09:00
parent e45f7aff85
commit ad947fcfda
2 changed files with 147 additions and 7 deletions

View File

@ -15,5 +15,34 @@
struct FrameSequenceParser
{
/*
Public
*/
FrameSequence parse (const String& input, int minValue, int maxValue, ParseError* error);
/*
Semantically private (leave them open for unit testing)
*/
struct SegmentIndexes {
const int NONE = -1;
int releaseBlockIndex = NONE;
int repeatStartIndex = NONE;
int repeatEndIndex = NONE;
ParseError error;
};
std::vector<int> parseSlope (const String& input,
int minValue,
int maxValue,
ParseError* error);
std::vector<int> parseRepeat (const String& input,
int minValue,
int maxValue,
ParseError* error);
std::vector<int> parseSegment (const String& input,
int minValue,
int maxValue,
ParseError* error);
SegmentIndexes findSegment(const String& input);
};