issue #2430:move Configuration enum into class

This commit is contained in:
minggo 2013-07-25 14:47:12 +08:00
parent 8dab462f6f
commit 08b13e9867
2 changed files with 16 additions and 9 deletions

View File

@ -35,15 +35,6 @@ THE SOFTWARE.
NS_CC_BEGIN
typedef enum _ccConfigurationType {
ConfigurationError,
ConfigurationString,
ConfigurationInt,
ConfigurationDouble,
ConfigurationBoolean
} ccConfigurationType;
/**
* @addtogroup global
* @{
@ -55,6 +46,15 @@ typedef enum _ccConfigurationType {
class CC_DLL Configuration : public Object
{
public:
enum Type
{
ERROR,
STRING,
INT,
DOUBLE,
BOOLEAN,
};
/** returns a shared instance of Configuration */
static Configuration *getInstance();

View File

@ -851,6 +851,13 @@ CC_DEPRECATED_ATTRIBUTE const int kCCDirectorProjectionCustom = Director::PROJEC
CC_DEPRECATED_ATTRIBUTE const int kCCDirectorProjectionDefault = Director::PROJECTION_DEFAULT;
CC_DEPRECATED_ATTRIBUTE typedef enum Director::Projection ccDirectorProjection;
CC_DEPRECATED_ATTRIBUTE const int ConfigurationError = Configuration::ERROR;
CC_DEPRECATED_ATTRIBUTE const int ConfigurationString = Configuration::STRING;
CC_DEPRECATED_ATTRIBUTE const int ConfigurationInt = Configuration::INT;
CC_DEPRECATED_ATTRIBUTE const int ConfigurationDouble = Configuration::DOUBLE;
CC_DEPRECATED_ATTRIBUTE const int ConfigurationBoolean = Configuration::BOOLEAN;
CC_DEPRECATED_ATTRIBUTE typedef enum Configuration::Type ccConfigurationType;
#define kCCVerticalTextAlignmentTop kVerticalTextAlignmentTop
#define kCCVerticalTextAlignmentCenter kVerticalTextAlignmentCenter
#define kCCVerticalTextAlignmentBottom kVerticalTextAlignmentBottom