⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 message.cpp

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 CPP
📖 第 1 页 / 共 2 页
字号:
    CIMOperationType enum_type = CIMOPTYPE_GET_CLASS;    switch (type)    {        case CIM_GET_CLASS_REQUEST_MESSAGE:        case CIM_GET_CLASS_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_GET_CLASS;            break;        case CIM_GET_INSTANCE_REQUEST_MESSAGE:        case CIM_GET_INSTANCE_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_GET_INSTANCE;             break;        case CIM_DELETE_CLASS_REQUEST_MESSAGE:        case CIM_DELETE_CLASS_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_DELETE_CLASS;             break;        case CIM_DELETE_INSTANCE_REQUEST_MESSAGE:        case CIM_DELETE_INSTANCE_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_DELETE_INSTANCE;             break;        case CIM_CREATE_CLASS_REQUEST_MESSAGE:        case CIM_CREATE_CLASS_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_CREATE_CLASS;             break;        case CIM_CREATE_INSTANCE_REQUEST_MESSAGE:        case CIM_CREATE_INSTANCE_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_CREATE_INSTANCE;             break;        case CIM_MODIFY_CLASS_REQUEST_MESSAGE:        case CIM_MODIFY_CLASS_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_MODIFY_CLASS;             break;        case CIM_MODIFY_INSTANCE_REQUEST_MESSAGE:        case CIM_MODIFY_INSTANCE_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_MODIFY_INSTANCE;             break;        case CIM_ENUMERATE_CLASSES_REQUEST_MESSAGE:        case CIM_ENUMERATE_CLASSES_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_ENUMERATE_CLASSES;             break;        case CIM_ENUMERATE_CLASS_NAMES_REQUEST_MESSAGE:        case CIM_ENUMERATE_CLASS_NAMES_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_ENUMERATE_CLASS_NAMES;             break;        case CIM_ENUMERATE_INSTANCES_REQUEST_MESSAGE:        case CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_ENUMERATE_INSTANCES;             break;        case CIM_ENUMERATE_INSTANCE_NAMES_REQUEST_MESSAGE:        case CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_ENUMERATE_INSTANCE_NAMES;             break;        case CIM_EXEC_QUERY_REQUEST_MESSAGE:        case CIM_EXEC_QUERY_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_EXEC_QUERY;             break;        case CIM_ASSOCIATORS_REQUEST_MESSAGE:        case CIM_ASSOCIATORS_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_ASSOCIATORS;             break;        case CIM_ASSOCIATOR_NAMES_REQUEST_MESSAGE:        case CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_ASSOCIATORS;             break;        case CIM_REFERENCES_REQUEST_MESSAGE:        case CIM_REFERENCES_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_REFERENCES;             break;        case CIM_REFERENCE_NAMES_REQUEST_MESSAGE:        case CIM_REFERENCE_NAMES_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_REFERENCE_NAMES;             break;        case CIM_GET_PROPERTY_REQUEST_MESSAGE:        case CIM_GET_PROPERTY_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_GET_PROPERTY;             break;        case CIM_SET_PROPERTY_REQUEST_MESSAGE:        case CIM_SET_PROPERTY_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_SET_PROPERTY;             break;        case CIM_GET_QUALIFIER_REQUEST_MESSAGE:        case CIM_GET_QUALIFIER_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_GET_QUALIFIER;             break;        case CIM_SET_QUALIFIER_REQUEST_MESSAGE:        case CIM_SET_QUALIFIER_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_SET_QUALIFIER;             break;        case CIM_DELETE_QUALIFIER_REQUEST_MESSAGE:        case CIM_DELETE_QUALIFIER_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_DELETE_QUALIFIER;             break;        case CIM_ENUMERATE_QUALIFIERS_REQUEST_MESSAGE:        case CIM_ENUMERATE_QUALIFIERS_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_ENUMERATE_QUALIFIERS;             break;        case CIM_INVOKE_METHOD_REQUEST_MESSAGE:        case CIM_INVOKE_METHOD_RESPONSE_MESSAGE:             enum_type = CIMOPTYPE_INVOKE_METHOD;             break;        default:             // exicution should never get to this point             PEGASUS_ASSERT(false);    }    return enum_type;}#ifndef PEGASUS_DISABLE_PERFINSTvoid Message::endServer(){    PEGASUS_ASSERT(_serverStartTimeMicroseconds != 0);    _totalServerTimeMicroseconds =        TimeValue::getCurrentTime().toMicroseconds() -            _serverStartTimeMicroseconds;    Uint64 serverTimeMicroseconds =        _totalServerTimeMicroseconds - _providerTimeMicroseconds;    Uint16 statType = (Uint16)((_type >= CIM_GET_CLASS_RESPONSE_MESSAGE) ?        _type - CIM_GET_CLASS_RESPONSE_MESSAGE : _type - 1);    StatisticalData::current()->addToValue(serverTimeMicroseconds, statType,        StatisticalData::PEGASUS_STATDATA_SERVER);    StatisticalData::current()->addToValue(_providerTimeMicroseconds, statType,        StatisticalData::PEGASUS_STATDATA_PROVIDER);    /* This adds the number of bytes read to the total.the request size       value must be stored (requSize) and passed to the StatisticalData       object at the end of processingm otherwise it will be the ONLY value       that is passed to the client which reports the current state of the       object, not the previous (one command ago) state */    StatisticalData::current()->addToValue(        StatisticalData::current()->requSize,        statType,        StatisticalData::PEGASUS_STATDATA_BYTES_READ);}#endif//////////////////////////////////////////////////////////////////////////////////// QueueIdStack//////////////////////////////////////////////////////////////////////////////////QueueIdStack::QueueIdStack(const QueueIdStack& x) : _size(x._size){    memcpy(_items, x._items, sizeof(_items));}QueueIdStack::QueueIdStack(Uint32 x) : _size(0){    push(x);}QueueIdStack::QueueIdStack(Uint32 x1, Uint32 x2) : _size(0){    push(x1);    push(x2);}QueueIdStack& QueueIdStack::operator=(const QueueIdStack& x){    if (this != &x)    {        memcpy(_items, x._items, sizeof(_items));        _size = x._size;    }    return *this;}QueueIdStack QueueIdStack::copyAndPop() const{    return QueueIdStack(*this, 0);}QueueIdStack::QueueIdStack(const QueueIdStack& x, int) : _size(x._size){    memcpy(_items, x._items, sizeof(_items));    pop();}PEGASUS_NAMESPACE_END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -