systemdeviceiterator.cxx

来自「贡献一个基于osip协议栈的用户代理」· CXX 代码 · 共 61 行

CXX
61
字号
#include "portaudiocpp/SystemDeviceIterator.hxx"

namespace portaudio
{
	// -----------------------------------------------------------------------------------

	Device &System::DeviceIterator::operator*() const
	{
		return **ptr_;
	}

	Device *System::DeviceIterator::operator->() const
	{
		return &**this;
	}

	// -----------------------------------------------------------------------------------

	System::DeviceIterator &System::DeviceIterator::operator++()
	{
		++ptr_;
		return *this;
	}

	System::DeviceIterator System::DeviceIterator::operator++(int)
	{
		System::DeviceIterator prev = *this;
		++*this;
		return prev;
	}

	System::DeviceIterator &System::DeviceIterator::operator--()
	{
		--ptr_;
		return *this;
	}

	System::DeviceIterator System::DeviceIterator::operator--(int)
	{
		System::DeviceIterator prev = *this;
		--*this;
		return prev;
	}

	// -----------------------------------------------------------------------------------

	bool System::DeviceIterator::operator==(const System::DeviceIterator &rhs)
	{
		return (ptr_ == rhs.ptr_);
	}

	bool System::DeviceIterator::operator!=(const System::DeviceIterator &rhs)
	{
		return !(*this == rhs);
	}

	// -----------------------------------------------------------------------------------
} // namespace portaudio


⌨️ 快捷键说明

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