载入中...
搜索中...
未找到
eve::sensing::LineOfSightRouter类 参考final

Routes each line-of-sight query to the backend that claimed its coordinate space. 更多...

#include <LineOfSightRouter.h>

类 eve::sensing::LineOfSightRouter 继承关系图:
eve::sensing::ILineOfSightQuery

Public 成员函数

 LineOfSightRouter ()=default
 Line of sight router.
 
 LineOfSightRouter (const LineOfSightRouter &)=delete
 
LineOfSightRouter & operator= (const LineOfSightRouter &)=delete
 
Result< void > addProvider (CoordinateSpace space, const ILineOfSightQuery *provider)
 Claim one coordinate space for a backend.
 
Result< void > removeProvider (CoordinateSpace space, const ILineOfSightQuery *provider)
 Release a claimed space when provider is the one that claimed it.
 
bool hasProvider (CoordinateSpace space) const noexcept
 Whether some backend currently answers for space.
 
std::vector< CoordinateSpace > spaces () const
 Claimed spaces in enum order, so a caller can report coverage deterministically.
 
Result< LineOfSightResult > query (const TargetLocation &from, const TargetLocation &to) const override
 Answer one segment query by routing it to the backend for its coordinate space.
 
- Public 成员函数 继承自 eve::sensing::ILineOfSightQuery
virtual ~ILineOfSightQuery ()=default
 Releases ILineOfSightQuery resources.
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::sensing::ILineOfSightQuery
static constexpr const char * capabilityName = "eve.sensing.ILineOfSightQuery"
 

详细描述

Routes each line-of-sight query to the backend that claimed its coordinate space.

@thread Affine to the caller; it holds borrowed pointers and does no synchronization. Claim all backends during startup, before queries run. @reentrancy query invokes the selected backend synchronously and performs no locking.

在文件 LineOfSightRouter.h 第 37 行定义.

构造及析构函数说明

◆ LineOfSightRouter() [1/2]

eve::sensing::LineOfSightRouter::LineOfSightRouter ( )
default

Line of sight router.

◆ LineOfSightRouter() [2/2]

eve::sensing::LineOfSightRouter::LineOfSightRouter ( const LineOfSightRouter &  )
delete

成员函数说明

◆ addProvider()

Result< void > eve::sensing::LineOfSightRouter::addProvider ( CoordinateSpace  space,
const ILineOfSightQuery *  provider 
)

Claim one coordinate space for a backend.

参数
spaceSpace this backend can interpret; it must be one of the four enum values.
providerBackend to answer with.
返回
Applied, InvalidArgument for a null provider, or Conflict when the space is taken. @ownership Borrowed: the router never owns or deletes the backend. The claiming module must keep it alive for as long as it is claimed. @lifetime Valid until removeProvider releases that exact space and provider.

在文件 LineOfSightRouter.cpp 第 52 行定义.

引用了 eve::Applied, eve::Conflict, index, eve::InvalidArgument, eve::Status::success() , 以及 eve::Result< T >::success().

◆ hasProvider()

bool eve::sensing::LineOfSightRouter::hasProvider ( CoordinateSpace  space) const
noexcept

Whether some backend currently answers for space.

在文件 LineOfSightRouter.cpp 第 77 行定义.

引用了 index.

◆ operator=()

LineOfSightRouter & eve::sensing::LineOfSightRouter::operator= ( const LineOfSightRouter &  )
delete

◆ query()

Result< LineOfSightResult > eve::sensing::LineOfSightRouter::query ( const TargetLocation &  from,
const TargetLocation &  to 
) const
overridevirtual

Answer one segment query by routing it to the backend for its coordinate space.

返回
The backend's answer, Rejected when the two endpoints are in different spaces, or Unsupported when no backend claimed that space.

实现了 eve::sensing::ILineOfSightQuery.

在文件 LineOfSightRouter.cpp 第 90 行定义.

引用了 eve::sensing::coordinateSpaceName(), from, index, eve::InvalidArgument, to , 以及 eve::Unsupported.

◆ removeProvider()

Result< void > eve::sensing::LineOfSightRouter::removeProvider ( CoordinateSpace  space,
const ILineOfSightQuery *  provider 
)

Release a claimed space when provider is the one that claimed it.

返回
Applied when released, or NoOp when this provider does not own that space (so one module can never release another module's backend, and a double release is safe).

在文件 LineOfSightRouter.cpp 第 69 行定义.

引用了 eve::Applied, index, eve::NoOp, eve::Status::success() , 以及 eve::Result< T >::success().

◆ spaces()

std::vector< CoordinateSpace > eve::sensing::LineOfSightRouter::spaces ( ) const

Claimed spaces in enum order, so a caller can report coverage deterministically.

在文件 LineOfSightRouter.cpp 第 82 行定义.

引用了 index.


该类的文档由以下文件生成: