载入中...
搜索中...
未找到
eve::level_editing::TileBufferTarget类 参考final

Non-owning IIntFieldTarget adapter for TileBuffer. 更多...

#include <FieldTargets.h>

类 eve::level_editing::TileBufferTarget 继承关系图:
eve::editing::EditableTargetState eve::editing::IEditableTarget eve::editing::IIntFieldTarget eve::editing::IEditableTarget eve::editing::IGridTarget

Public 成员函数

 TileBufferTarget (std::string id, TileBuffer *buffer)
 Adapt a borrowed buffer that must outlive this target. @thread Owner-thread only.
 
TargetId targetId () const override
 Target id.
 
int width () const override
 Width.
 
int height () const override
 Height.
 
bool containsCell (int x, int y) const override
 True if cell.
 
int readInt (int x, int y) const override
 Reads int.
 
FieldWriteStatus writeInt (int x, int y, int value) override
 Writes int.
 
TileBuffer * buffer () const
 Return the borrowed buffer; its lifetime remains owned by the target creator.
 
- Public 成员函数 继承自 eve::editing::EditableTargetState
 EditableTargetState (Revision initial=1)
 Constructs the shared state with an explicit initial revision.
 
EditRegion dirtyRegion () const override
 Return the accumulated dirty region.
 
void clearDirtyRegion () override
 Discard the dirty region; the revision does not change.
 
std::uint64_t revision () const override
 Return the current revision.
 
Revision revisionValue () const noexcept
 Return the revision as the shared protocol revision type.
 
- Public 成员函数 继承自 eve::editing::IEditableTarget
virtual ~IEditableTarget ()=default
 Releases IEditableTarget resources.
 
virtual TargetDescriptor describe () const
 Describe the target for tools and automation.
 
virtual void * queryCapability (const CapabilityId &capability)
 Query an optional stable capability.
 
template<class C >
eve::OptionalRef< C > capability ()
 Query a capability through its interface-owned stable identity.
 
template<class C >
eve::OptionalRef< const C > capability () const
 Capability.
 
template<class C >
C * query ()
 Queries query.
 
template<class C >
const C * query () const
 Queries query.
 
- Public 成员函数 继承自 eve::editing::IGridTarget
virtual ~IGridTarget ()=default
 Releases IGridTarget resources.
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 eve::editing::IIntFieldTarget
static CapabilityId editingCapabilityId ()
 Editing capability id.
 
- Protected 成员函数 继承自 eve::editing::EditableTargetState
void widenDirty (int x, int y)
 Widen the dirty region without advancing the revision.
 
void widenDirty (const EditRegion &region)
 Widen the dirty region without advancing the revision.
 
void widenDirty ()
 Mark an unknown area dirty without advancing the revision.
 
void bumpRevision ()
 Advance the revision without touching the dirty region.
 
void setRevision (Revision revision)
 Adopt a revision observed elsewhere, without advancing it.
 
void setDirtyRegion (const EditRegion &region)
 Replace the dirty region wholesale, without advancing the revision.
 
void markDirty (int x, int y)
 Include one cell in the dirty region and advance the revision.
 
void markDirty (const EditRegion &region)
 Include a whole region and advance the revision.
 
void markDirty ()
 Mark an unknown area dirty and advance the revision.
 

详细描述

Non-owning IIntFieldTarget adapter for TileBuffer.

在文件 FieldTargets.h 第 21 行定义.

构造及析构函数说明

◆ TileBufferTarget()

eve::level_editing::TileBufferTarget::TileBufferTarget ( std::string  id,
TileBuffer *  buffer 
)

Adapt a borrowed buffer that must outlive this target. @thread Owner-thread only.

在文件 FieldTargets.cpp 第 8 行定义.

成员函数说明

◆ buffer()

TileBuffer * eve::level_editing::TileBufferTarget::buffer ( ) const
inline

Return the borrowed buffer; its lifetime remains owned by the target creator.

在文件 FieldTargets.h 第 40 行定义.

◆ containsCell()

bool eve::level_editing::TileBufferTarget::containsCell ( int  x,
int  y 
) const
overridevirtual

True if cell.

实现了 eve::editing::IGridTarget.

在文件 FieldTargets.cpp 第 12 行定义.

引用了 eve::level_editing::TileBuffer::containsCell(), x , 以及 y.

被这些函数引用 readInt() , 以及 writeInt().

◆ height()

int eve::level_editing::TileBufferTarget::height ( ) const
overridevirtual

Height.

实现了 eve::editing::IGridTarget.

在文件 FieldTargets.cpp 第 11 行定义.

引用了 eve::level_editing::TileBuffer::getHeight().

◆ readInt()

int eve::level_editing::TileBufferTarget::readInt ( int  x,
int  y 
) const
overridevirtual

Reads int.

实现了 eve::editing::IIntFieldTarget.

在文件 FieldTargets.cpp 第 13 行定义.

引用了 containsCell(), eve::level_editing::TileBuffer::getGid(), x , 以及 y.

◆ targetId()

TargetId eve::level_editing::TileBufferTarget::targetId ( ) const
inlineoverridevirtual

Target id.

实现了 eve::editing::IEditableTarget.

在文件 FieldTargets.h 第 28 行定义.

◆ width()

int eve::level_editing::TileBufferTarget::width ( ) const
overridevirtual

Width.

实现了 eve::editing::IGridTarget.

在文件 FieldTargets.cpp 第 10 行定义.

引用了 eve::level_editing::TileBuffer::getWidth().

◆ writeInt()

FieldWriteStatus eve::level_editing::TileBufferTarget::writeInt ( int  x,
int  y,
int  value 
)
overridevirtual

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