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


C++ checkable::Ptr类代码示例

本文整理汇总了C++中checkable::Ptr的典型用法代码示例。如果您正苦于以下问题:C++ Ptr类的具体用法?C++ Ptr怎么用?C++ Ptr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: GetCheckableIsVolatile

int CompatUtility::GetCheckableIsVolatile(const Checkable::Ptr& checkable)
{
	return (checkable->GetVolatile() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例2: GetCheckablePercentStateChange

double CompatUtility::GetCheckablePercentStateChange(const Checkable::Ptr& checkable)
{
	return checkable->GetFlappingCurrent();
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例3: GetCheckableProcessPerformanceData

int CompatUtility::GetCheckableProcessPerformanceData(const Checkable::Ptr& checkable)
{
	return (checkable->GetEnablePerfdata() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例4: GetCheckableIsFlapping

int CompatUtility::GetCheckableIsFlapping(const Checkable::Ptr& checkable)
{
	return (checkable->IsFlapping() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例5: GetCheckableIsReachable

int CompatUtility::GetCheckableIsReachable(const Checkable::Ptr& checkable)
{
	return (checkable->IsReachable() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例6: GetCheckableEventHandlerEnabled

int CompatUtility::GetCheckableEventHandlerEnabled(const Checkable::Ptr& checkable)
{
	return (checkable->GetEnableEventHandler() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例7: GetCheckableFlapDetectionEnabled

int CompatUtility::GetCheckableFlapDetectionEnabled(const Checkable::Ptr& checkable)
{
	return (checkable->GetEnableFlapping() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例8: GetCheckableAcknowledgementType

int CompatUtility::GetCheckableAcknowledgementType(const Checkable::Ptr& checkable)
{
	return static_cast<int>(checkable->GetAcknowledgement());
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例9: GetCheckableActiveChecksEnabled

int CompatUtility::GetCheckableActiveChecksEnabled(const Checkable::Ptr& checkable)
{
	return (checkable->GetEnableActiveChecks() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例10: GetCheckableProblemHasBeenAcknowledged

int CompatUtility::GetCheckableProblemHasBeenAcknowledged(const Checkable::Ptr& checkable)
{
	return (checkable->GetAcknowledgement() != AcknowledgementNone ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例11: GetCheckableHasBeenChecked

int CompatUtility::GetCheckableHasBeenChecked(const Checkable::Ptr& checkable)
{
	return (checkable->GetLastCheckResult() ? 1 : 0);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例12: GetCheckableRetryInterval

double CompatUtility::GetCheckableRetryInterval(const Checkable::Ptr& checkable)
{
	return checkable->GetRetryInterval() / 60.0;
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例13: GetCheckableCheckType

int CompatUtility::GetCheckableCheckType(const Checkable::Ptr& checkable)
{
	return (checkable->GetEnableActiveChecks() ? 0 : 1);
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:4,代码来源:compatutility.cpp

示例14: GetCheckableCommandArgs

/* service */
String CompatUtility::GetCheckableCommandArgs(const Checkable::Ptr& checkable)
{
	CheckCommand::Ptr command = checkable->GetCheckCommand();

	Dictionary::Ptr args = new Dictionary();

	if (command) {
		Host::Ptr host;
		Service::Ptr service;
		tie(host, service) = GetHostService(checkable);
		String command_line = GetCommandLine(command);

		Dictionary::Ptr command_vars = command->GetVars();

		if (command_vars) {
			ObjectLock olock(command_vars);
			for (const Dictionary::Pair& kv : command_vars) {
				String macro = "$" + kv.first + "$"; // this is too simple
				if (command_line.Contains(macro))
					args->Set(kv.first, kv.second);

			}
		}

		Dictionary::Ptr host_vars = host->GetVars();

		if (host_vars) {
			ObjectLock olock(host_vars);
			for (const Dictionary::Pair& kv : host_vars) {
				String macro = "$" + kv.first + "$"; // this is too simple
				if (command_line.Contains(macro))
					args->Set(kv.first, kv.second);
				macro = "$host.vars." + kv.first + "$";
				if (command_line.Contains(macro))
					args->Set(kv.first, kv.second);
			}
		}

		if (service) {
			Dictionary::Ptr service_vars = service->GetVars();

			if (service_vars) {
				ObjectLock olock(service_vars);
				for (const Dictionary::Pair& kv : service_vars) {
					String macro = "$" + kv.first + "$"; // this is too simple
					if (command_line.Contains(macro))
						args->Set(kv.first, kv.second);
					macro = "$service.vars." + kv.first + "$";
					if (command_line.Contains(macro))
						args->Set(kv.first, kv.second);
				}
			}
		}

		String arg_string;
		ObjectLock olock(args);
		for (const Dictionary::Pair& kv : args) {
			arg_string += Convert::ToString(kv.first) + "=" + Convert::ToString(kv.second) + "!";
		}
		return arg_string;
	}

	return Empty;
}
开发者ID:LMNetworks,项目名称:icinga2,代码行数:65,代码来源:compatutility.cpp


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