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


C++ DeviceName::type方法代码示例

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


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

示例1: lexicographical_compare

bool	DeviceName::operator<(const DeviceName& other) const {
	if (type() < other.type()) {
		return true;
	}
	if (type() == other.type()) {
		return lexicographical_compare(begin(), end(),
						other.begin(), other.end());
	}
	return false;
}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:10,代码来源:DeviceName.cpp

示例2: DeviceName

/**
 * \brief Name of the device
 *
 * For derived components, this only returns the device name of the
 * parent device, it is the client's responsibilty to retrieve the
 * correct subdevice of the parent device.
 */
DeviceName	InstrumentComponentDerived::devicename() {
	DeviceName	name = _instrument.devicename(_derivedfrom);
	if (type() != DeviceName::Ccd) {
		name.type(type());
		return name;
	} else {
		return DeviceName(name, type(), stringprintf("%d", unit()));
	}
}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:16,代码来源:Instrument.cpp

示例3: equal

bool	DeviceName::operator==(const DeviceName& other) const {
	if (type() != other.type()) {
		return false;
	}
	if (size() != other.size()) {
		return false;
	}
	return std::equal(begin(), end(), other.begin());
}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:9,代码来源:DeviceName.cpp

示例4: begin

DeviceName	DeviceName::parent(const DeviceName::device_type& devicetype) const {
	DeviceName	result;
	const_iterator	i = begin();
	size_type	j = 1;
	while (j++ < size()) {
		result.push_back(*i);
		i++;
	}
	result.type(devicetype);
	return result;
}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:11,代码来源:DeviceName.cpp

示例5: runtime_error

void	DeviceDenicer::setup(const DeviceName& original) {
    debug(LOG_DEBUG, DEBUG_LOG, 0, "denice '%s'",
          original.toString().c_str());
    if (original.modulename() != "nice") {
        throw std::runtime_error("cannot denice device names for "
                                 "other modules");
    }
    if (original.size() < 2) {
        throw std::runtime_error("bad nice device name: too short");
    }
    std::vector<std::string>	components;
    std::vector<std::string>::const_iterator	i = original.begin();
    i++; // skip the name nice
    _service = *i;
    i++; // skip the service name
    copy(i, original.end(), std::back_inserter(components));
    _devicename = std::shared_ptr<DeviceName>(new DeviceName(original.type(),
                  components));
    debug(LOG_DEBUG, DEBUG_LOG, 0, "deniced service name: %s",
          _devicename->toString().c_str());
}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:21,代码来源:DeviceDenicer.cpp

示例6:

DeviceName::DeviceName(const DeviceName& other)
	: std::vector<std::string>(other), _type(other.type()) {
}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:3,代码来源:DeviceName.cpp


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