Beispiel #1
0
CString & CString::operator=(const CString & tString) {
  __destruct();
  __construct(tString.m_pString, tString.m_Length);
  return (* this);
} // operator=
Beispiel #2
0
CString::CString(const T_CHAR * pString, T_ULONG uLength) {
  __construct(pString, (uLength == 0) ? STATIC_strlen(pString) : uLength);
} // CString
Beispiel #3
0
CString::CString(T_DOUBLE dValue) {
  __T_CHAR pBuffer[__BASE__CString__BUFFER_SIZE];

  __BASE__CString__SPRINTF(pBuffer, "%f", dValue);
  __construct(pBuffer, STATIC_strlen(pBuffer));
} // CString
Beispiel #4
0
CString::CString(const CString & tString) {
  __construct(tString.m_pString, tString.m_Length);
} // CString
Beispiel #5
0
CString::CString(T_ULONG uValue) {
  __T_CHAR pBuffer[__BASE__CString__BUFFER_SIZE];

  __BASE__CString__SPRINTF(pBuffer, "%d", uValue);
  __construct(pBuffer, STATIC_strlen(pBuffer));
} // CString
Beispiel #6
0
CString::CString(T_CHAR cChar) {
  __construct(&cChar, 1);
} // CString
Beispiel #7
0
Map::Map()
{
  __construct(WIDTH, HEIGHT);
}
Beispiel #8
0
Map::Map(int width, int height)
{
  __construct(width, height);
}
Beispiel #9
0
void Value::_construct(const Value& x)
{
    memcpy(this, &x, sizeof(x));

    switch (_type)
    {
        case NONE:
        case BOOLEAN:
        case UINT8:
        case SINT8:
        case UINT16:
        case SINT16:
        case UINT32:
        case SINT32:
        case UINT64:
        case SINT64:
        case REAL32:
        case REAL64:
        case CHAR16:
            break;

        case STRING:
            new((String*)_string) String(*(String*)x._string);
            break;

        case DATETIME:
            new((Datetime*)_datetime) Datetime(*(Datetime*)x._datetime);
            break;

        case INSTANCE:
            ref(_instance = x._instance);
            break;

        case BOOLEAN_ARRAY:
        case UINT8_ARRAY:
        case SINT8_ARRAY:
        case UINT16_ARRAY:
        case SINT16_ARRAY:
        case UINT32_ARRAY:
        case SINT32_ARRAY:
        case UINT64_ARRAY:
        case SINT64_ARRAY:
        case REAL32_ARRAY:
        case REAL64_ARRAY:
        case CHAR16_ARRAY:
        case STRING_ARRAY:
        case DATETIME_ARRAY:
            __construct(
                ((__Array_Base*)_array)->rep, ((__Array_Base*)x._array)->rep);
            break;

        case INSTANCE_ARRAY:
        {
            __construct(
                ((__Array_Base*)_array)->rep, ((__Array_Base*)x._array)->rep);

            Array_Instance* inst = (Array_Instance*)_array;
            Instance** p = inst->data();
            Instance** end = p + inst->size();

            while (p != end)
                ref(*p++);

            break;
        }
    }
}