SO3Engine
FlashValue.h
Go to the documentation of this file.
1/*
2 This file is part of Hikari, a library that allows developers
3 to use Flash in their Ogre3D applications.
4
5 Copyright (C) 2008 Adam J. Simmons
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21/*********************************************************************************************
22 ___ ___ .__ __ .__
23 / | \|__| | _______ _______|__|
24/ ~ \ | |/ /\__ \\_ __ \ |
25\ Y / | < / __ \| | \/ |
26 \___|_ /|__|__|_ \‍(____ /__| |__| v0.4
27 \/ \/ \/
28
29
30* Zed Games PC Development Team - Jaime Crespillo Vilchez (jcrespillo@zed.com)
31* Build: 0.1 - Date: 13/10/2008
32* Undocked version of Hikari Lib
33* Brief: Changes in constructors to support basic string
34**********************************************************************************************/
35
36#ifndef __FlashValue_H__
37#define __FlashValue_H__
38
39#include "HikariPlatform.h"
40#include <vector>
41
42namespace Hikari {
43
44 struct ColorBase{float r; float g; float b; float a;};
57
61class _HikariExport FlashValue
62{
63 std::string strValue;
64 std::wstring wstrValue;
65 float numValue;
66 bool boolValue;
67 short valueType;
68public:
72 FlashValue();
73
79 FlashValue(bool booleanValue);
80
86 FlashValue(int numericValue);
87
93 FlashValue(float numericValue);
94
100 FlashValue(const char* stringValue);
101
107 //FlashValue(const wchar_t* stringValue);
108
114 FlashValue(const std::string& stringValue);
115
121 FlashValue(const std::wstring& wstringValue);
122
128// FlashValue(const dspStringBase& stringValue);
129
133 short getType() const;
134
138 bool isNull() const;
139
143 void setNull();
144
153 bool getBool() const;
154
163 float getNumber() const;
164
170 colorValueBase getNumberAsColor() const;
171
180 std::string getString() const;
181
182 std::wstring getWString() const;
183};
184
188typedef _HikariExport std::vector<FlashValue> Arguments;
189
193#define FLASH_VOID Hikari::FlashValue()
194
200class _HikariExport Args : public Arguments
201{
202public:
203 Args();
204
205 Args(Args &v);
206
207 explicit Args(const FlashValue& firstArg);
208
209 Args& operator()(const FlashValue& newArg);
210};
211
212}
213
214#endif
ColorBase colorValueBase
Definition FlashValue.h:45
@ FT_WSTRING
Definition FlashValue.h:55
@ FT_STRING
Definition FlashValue.h:54
@ FT_NUMBER
Definition FlashValue.h:53
@ FT_NULL
Definition FlashValue.h:51
@ FT_BOOLEAN
Definition FlashValue.h:52
_HikariExport std::vector< FlashValue > Arguments
Definition FlashValue.h:188