Skip to content

Expose standard containers in the public API and remove the DataStructures headers (std migration, stage 3, API break) #61

Description

@Segfaultd

Follow-up to #50 / #58, last of three stages. Depends on #59 and #60. This stage breaks source compatibility and should ship as a major version bump.

Scope

54 public headers still name a DataStructures:: type and 22 virtual methods take one as a parameter. Anyone who overrode such a virtual (plugins, CloudServer filters, ReplicaManager3/Replica3, FullyConnectedMesh2, RakPeerInterface::GetSockets) must change their signature when the type changes, so this cannot be done gradually.

Public virtuals affected include:

  • RakPeerInterface::GetSockets / ReleaseSockets / GetStatisticsList / GetSystemList
  • CloudServer::Release / Get / Unsubscribe and the CloudServerQueryFilter callbacks
  • FullyConnectedMesh2::GetVerifiedJoinAcceptedAdditionalData
  • Replica3::QuerySerializationList, Connection_RM3::GetConstructedReplicas / SendConstruction, ReplicaManager3::GetConnectionsInVirtualWorld / GetGuidsInVirtualWorld

Decision to make first

Expose std::vector<T>& directly, or keep a thin DataStructures::List<T> alias/wrapper so downstream code compiles unchanged? Recommendation: expose the standard types and take the break once, since the project is pre-1.0 and #58 already asked users to update their includes. If the wrapper route is chosen, it should be a pure alias (template<class T> using List = std::vector<T>), not a reimplementation, and documented as deprecated.

Approach

  • Change signatures header by header; update every in-tree override (samples, tests, extensions) in the same commit.
  • Remove the boundary conversions introduced in stage 2.
  • Delete ds_list.h, ds_queue.h, ds_ordered_list.h, ds_map.h, ds_hash.h and the remaining ds_* containers. Keep ds_memory_pool.h, ds_threadsafe_allocating_queue.h and ds_table.h (allocators / in-memory database, no standard equivalent).
  • Changelog: a migration table (old signature → new) for every public virtual, and the version bump per the release procedure in CLAUDE.md.

Acceptance

  • grep -r DataStructures:: Source/include finds only MemoryPool, ThreadsafeAllocatingQueue, Page and Table.
  • All samples, tests and extensions compile against the new signatures.
  • Full suite green on Linux (Debug, Release), macOS, Windows.
  • Changelog carries the migration table.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions