本文整理汇总了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},
示例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},
示例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)})}}});
示例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}
}});