当前位置: 首页>>代码示例>>C++>>正文


C++ json::Pair方法代码示例

本文整理汇总了C++中json::Pair方法的典型用法代码示例。如果您正苦于以下问题:C++ json::Pair方法的具体用法?C++ json::Pair怎么用?C++ json::Pair使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在json的用法示例。


在下文中一共展示了json::Pair方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Pair

StorageController::~StorageController() { }

using namespace psme::rest::resource;
using json::Pair;

static ResourceDefinitions::Register<StorageControllers> g_controllers(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE,
            "#RSAStorageController.1.0.0.RSAStorageControllersCollection"},
        {Resource::NAME, "StorageControllers Collection"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {Resource::LINKS,
        json::Value({
            Pair(Resource::MEMBERS_ODATA_COUNT, 0),
            Pair(Resource::MEMBERS, json::Value::Type::ARRAY)
        })}
    }});

static ResourceDefinitions::Register<StorageController> g_controller(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE,
            "#RSAStorageController.1.0.0.RSAStorageController"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "StorageController"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {"Interface", json::Value::Type::STRING},
        {"DriveCount", json::Value::Type::NUMBER},
开发者ID:iamyaw,项目名称:IntelRackScaleArchitecture,代码行数:31,代码来源:storage_controllers.cpp

示例2: Pair

    }
}

using namespace psme::rest::resource;
using json::Pair;

static ResourceDefinitions::Register<LogicalDrives> g_ldrives(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE, "#Drive.1.0.0.LogicalDrivesCollection"},
        {Resource::NAME, "Logical Drives Collection"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {Resource::LINKS,
            json::Value({
                Pair(Resource::MEMBERS_ODATA_COUNT, 0),
                Pair(Resource::MEMBERS, json::Value::Type::ARRAY)
            })}
    }});

static ResourceDefinitions::Register<LogicalDrive> g_ldrive(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE, "#LogicalDrive.1.0.0.LogicalDrive"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "Logical Drive"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {PROTECTED, json::Value::Type::BOOLEAN},
        {MODE, json::Value::Type::STRING},
        {TYPE_FIELD, json::Value::Type::STRING},
开发者ID:iamyaw,项目名称:IntelRackScaleArchitecture,代码行数:31,代码来源:logical_drives.cpp

示例3: g

{ }

NetworkService::~NetworkService() {
}

using namespace psme::rest::resource;
using json::Pair;

static ResourceDefinitions::Register<NetworkService> g(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE,
                "#ManagerNetworkService.1.0.0.ManagerNetworkService"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "Manager Network Service"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {Resource::DESCRIPTION, "Manager Network Service Status"},
        {Status::STATUS, json::Value::Type::OBJECT},
        {"HostName", json::Value::Type::STRING},
        {"FQDN", json::Value::Type::STRING},
        {"HTTP", json::Value({Pair("Enabled", false)})},
        {"HTTPS",json::Value({Pair("Enabled", false)})},
        {"IPMI", json::Value({Pair("Enabled", false)})},
        {"SSH", json::Value({Pair("Enabled", false)})},
        {"SNMP", json::Value({Pair("Enabled", false)})},
        {"VirtualMedia", json::Value({Pair("Enabled", false)})},
        {"SSDP", json::Value({Pair("Enabled", false)})},
        {"Telnet", json::Value({Pair("Enabled", false)})},
        {"KVMIP", json::Value({Pair("Enabled", false)})}}});
开发者ID:iamyaw,项目名称:IntelRackScaleArchitecture,代码行数:30,代码来源:network_service.cpp

示例4: Pair

using json::Pair;

static ResourceDefinitions::Register<StorageManager> g_manager(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT,
                "/rest/v1/$metadata#RSAStorageManagers/Links/members/$entity"},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE, "#RSAStorageManager.1.0.0.RSAStorageManager"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "RSA Storage Manager"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {"ManagerType", json::Value::Type::STRING},
        {Status::STATUS, json::Value::Type::OBJECT},
        {"Firmware", json::Value::Type::OBJECT},
        {"GraphicalConsole", json::Value::Type::OBJECT},
        {"SerialConsole", json::Value::Type::OBJECT},
        {"CommandShell", json::Value::Type::OBJECT},
        {Resource::OEM, json::Value::Type::OBJECT},
        {Resource::LINKS,
            json::Value({
                Pair(Services::TYPE, json::Value::Type::ARRAY),
                Pair(Targets::REMOTE_TARGETS, json::Value::Type::ARRAY),
                Pair(LogicalDrives::TYPE, json::Value::Type::ARRAY),
                Pair(NetworkService::TYPE, json::Value::Type::OBJECT),
                Pair(StorageManager::SIMPLE_NETWORK, json::Value::Type::OBJECT),
                Pair(Resource::OEM, json::Value::Type::OBJECT)
            })},
        {Resource::ACTIONS, json::Value::Type::OBJECT}
    }});

开发者ID:iamyaw,项目名称:IntelRackScaleArchitecture,代码行数:29,代码来源:storage_managers.cpp


注:本文中的json::Pair方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。