Rev | Line | |
---|
[136] | 1 | /*
|
---|
| 2 | ###############################################################################
|
---|
| 3 | #
|
---|
| 4 | # Temboo Arduino library
|
---|
| 5 | #
|
---|
| 6 | # Copyright 2014, Temboo Inc.
|
---|
| 7 | #
|
---|
| 8 | # Licensed under the Apache License, Version 2.0 (the "License");
|
---|
| 9 | # you may not use this file except in compliance with the License.
|
---|
| 10 | # You may obtain a copy of the License at
|
---|
| 11 | #
|
---|
| 12 | # http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 13 | #
|
---|
| 14 | # Unless required by applicable law or agreed to in writing,
|
---|
| 15 | # software distributed under the License is distributed on an
|
---|
| 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
---|
| 17 | # either express or implied. See the License for the specific
|
---|
| 18 | # language governing permissions and limitations under the License.
|
---|
| 19 | #
|
---|
| 20 | ###############################################################################
|
---|
| 21 | */
|
---|
| 22 |
|
---|
| 23 | #ifndef CHOREOOUTPUTFORMATTER_H_
|
---|
| 24 | #define CHOREOOUTPUTFORMATTER_H_
|
---|
| 25 | #include "TembooGlobal.h"
|
---|
| 26 | #include "BaseFormatter.h"
|
---|
| 27 | #include "ChoreoOutputSet.h"
|
---|
| 28 |
|
---|
| 29 | class ChoreoOutputFormatter : public BaseFormatter {
|
---|
| 30 |
|
---|
| 31 | public:
|
---|
| 32 | ChoreoOutputFormatter(const ChoreoOutputSet* outputSet);
|
---|
| 33 | bool hasNext();
|
---|
| 34 | char next();
|
---|
| 35 | void reset();
|
---|
| 36 |
|
---|
| 37 | protected:
|
---|
| 38 | const ChoreoOutputSet* m_outputSet;
|
---|
| 39 | const ChoreoOutput* m_currentOutput;
|
---|
| 40 |
|
---|
| 41 | enum State {
|
---|
| 42 | START,
|
---|
| 43 | OUTPUTS_TAG,
|
---|
| 44 | OUTPUT_START,
|
---|
| 45 | NAME_TAG,
|
---|
| 46 | NAME_START,
|
---|
| 47 | NAME,
|
---|
| 48 | NAME_END,
|
---|
| 49 | NAME_PATH_SEPARATOR,
|
---|
| 50 | PATH_TAG,
|
---|
| 51 | PATH_START,
|
---|
| 52 | PATH,
|
---|
| 53 | PATH_END,
|
---|
| 54 | PATH_VAR_SEPARATOR,
|
---|
| 55 | VAR_TAG,
|
---|
| 56 | VAR_START,
|
---|
| 57 | VAR,
|
---|
| 58 | VAR_END,
|
---|
| 59 | OUTPUT_END,
|
---|
| 60 | NEXT_OUTPUT,
|
---|
| 61 | OUTPUTS_END,
|
---|
| 62 | END
|
---|
| 63 | };
|
---|
| 64 | };
|
---|
| 65 |
|
---|
| 66 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.