Пример #1
0
CCBValue* CCBValue::create(Array *pArrValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->_arrValue = pArrValue;
        ret->mType = kArrayValue;
        ret->autorelease();
    }
    
    return ret;
}
Пример #2
0
CCBValue* CCBValue::create(unsigned char byte)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->mValue.nValue = byte;
        ret->mType = kUnsignedCharValue;
        ret->autorelease();
    }
    
    return ret;
}
Пример #3
0
CCBValue* CCBValue::create(const char *pStringValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->_value = pStringValue;
        ret->mType = kStringValue;
        ret->autorelease();
    }
    
    return ret;
}
Пример #4
0
CCBValue* CCBValue::create(float fValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->mValue.fValue = fValue;
        ret->mType = kFloatValue;
        ret->autorelease();
    }
    
    return ret;
}
Пример #5
0
CCBValue* CCBValue::create(bool vValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->mValue.nValue = vValue ? 1 : 0;
        ret->mType = kBoolValue;
        ret->autorelease();
    }
    
    return ret;
}
Пример #6
0
CCBValue* CCBValue::create(bool vValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->m_tValue.intValue = vValue ? 1 : 0;
        ret->m_eType = Type::BOOL;
        ret->autorelease();
    }

    return ret;
}
Пример #7
0
CCBValue* CCBValue::create(int nValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->mValue.nValue = nValue;
        ret->mType = kIntValue;
        ret->autorelease();
    }
    
    return ret;
}
Пример #8
0
CCBValue* CCBValue::create(float fValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->m_tValue.floatValue = fValue;
        ret->m_eType = Type::FLOAT;
        ret->autorelease();
    }

    return ret;
}
Пример #9
0
CCBValue* CCBValue::create(int nValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->m_tValue.intValue = nValue;
        ret->m_eType = Type::INT;
        ret->autorelease();
    }

    return ret;
}
Пример #10
0
CCBValue* CCBValue::create(Array *pArrValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->m_pArrValue = pArrValue;
        ret->m_eType = Type::ARRAY;
        ret->autorelease();
    }

    return ret;
}
Пример #11
0
CCBValue* CCBValue::create(const char *pStringValue)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->m_sStrValue = pStringValue;
        ret->m_eType = Type::STRING;
        ret->autorelease();
    }

    return ret;
}
Пример #12
0
CCBValue* CCBValue::create(unsigned char byte)
{
    CCBValue *ret = new CCBValue();
    if (ret)
    {
        ret->m_tValue.intValue = byte;
        ret->m_eType = Type::UNSIGNED_CHAR;
        ret->autorelease();
    }

    return ret;
}