systemhostapiiterator.cxx

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

CXX
60
字号
#include "portaudiocpp/SystemHostApiIterator.hxx"

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

	HostApi &System::HostApiIterator::operator*() const
	{
		return **ptr_;
	}

	HostApi *System::HostApiIterator::operator->() const
	{
		return &**this;
	}

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

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

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

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

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

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

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

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

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

⌨️ 快捷键说明

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