Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::delete_entities_action_t Struct Reference

Undoable delete for entity subtrees: snapshots serialized roots at construction, deletes on do, restores on undo. More...

#include <entity_actions.h>

Inheritance diagram for unravel::delete_entities_action_t:
crtp_meta_type< delete_entities_action_t, editing_action_t >

Public Member Functions

 delete_entities_action_t (std::vector< entt::handle > entities)
 
void do_action () override
 
void undo_action () override
 
auto is_mergeable (const editing_action_t &previous) const -> bool override
 
auto is_valid () const -> bool override
 
- Public Member Functions inherited from crtp_meta_type< delete_entities_action_t, editing_action_t >
virtual auto get_meta_type () const -> entt::meta_type
 
auto is () const -> bool
 
auto is (const entt::meta_type &type) const -> bool
 
virtual auto as_derived () -> entt::meta_any
 

Public Attributes

std::vector< std::string > serialized_roots {}
 
std::vector< entt::uhandleroot_entities {}
 
std::vector< entt::uhandleparent_entities {}
 
std::vector< std::vector< hpp::uuid > > subtree_uuids {}
 Preorder UUIDs per root subtree (same order as save_to_stream / flatten_hierarchy).
 

Additional Inherited Members

- Static Public Member Functions inherited from crtp_meta_type< delete_entities_action_t, editing_action_t >
static auto get_static_meta_type () -> entt::meta_type
 

Detailed Description

Undoable delete for entity subtrees: snapshots serialized roots at construction, deletes on do, restores on undo.

Definition at line 61 of file entity_actions.h.

Constructor & Destructor Documentation

◆ delete_entities_action_t()

unravel::delete_entities_action_t::delete_entities_action_t ( std::vector< entt::handle > entities)
explicit

Definition at line 303 of file entity_actions.cpp.

Member Function Documentation

◆ do_action()

void unravel::delete_entities_action_t::do_action ( )
override

Definition at line 351 of file entity_actions.cpp.

◆ is_mergeable()

auto unravel::delete_entities_action_t::is_mergeable ( const editing_action_t & previous) const -> bool
override

Definition at line 442 of file entity_actions.cpp.

◆ is_valid()

auto unravel::delete_entities_action_t::is_valid ( ) const -> bool
override

Definition at line 414 of file entity_actions.cpp.

◆ undo_action()

void unravel::delete_entities_action_t::undo_action ( )
override

Definition at line 372 of file entity_actions.cpp.

Member Data Documentation

◆ parent_entities

std::vector<entt::uhandle> unravel::delete_entities_action_t::parent_entities {}

Definition at line 65 of file entity_actions.h.

◆ root_entities

std::vector<entt::uhandle> unravel::delete_entities_action_t::root_entities {}

Definition at line 64 of file entity_actions.h.

◆ serialized_roots

std::vector<std::string> unravel::delete_entities_action_t::serialized_roots {}

Definition at line 63 of file entity_actions.h.

◆ subtree_uuids

std::vector<std::vector<hpp::uuid> > unravel::delete_entities_action_t::subtree_uuids {}

Preorder UUIDs per root subtree (same order as save_to_stream / flatten_hierarchy).

Definition at line 67 of file entity_actions.h.


The documentation for this struct was generated from the following files: