00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SkParse_DEFINED
00018 #define SkParse_DEFINED
00019
00020 #include "SkColor.h"
00021 #include "SkMath.h"
00022
00023 class SkParse {
00024 public:
00025 static int Count(const char str[]);
00026 static int Count(const char str[], char separator);
00027 static const char* FindColor(const char str[], SkColor* value);
00028 static const char* FindHex(const char str[], uint32_t* value);
00029 static const char* FindMSec(const char str[], SkMSec* value);
00030 static const char* FindNamedColor(const char str[], size_t len, SkColor* color);
00031 static const char* FindS32(const char str[], int32_t* value);
00032 static const char* FindScalar(const char str[], SkScalar* value);
00033 static const char* FindScalars(const char str[], SkScalar value[], int count);
00034
00035 static bool FindBool(const char str[], bool* value);
00036
00037 static int FindList(const char str[], const char list[]);
00038 #ifdef SK_SUPPORT_UNITTEST
00039 static void TestColor();
00040 static void UnitTest();
00041 #endif
00042 };
00043
00044 #endif
00045