|
PACS System 0.1.0
PACS DICOM system library
|
#include <test_support.h>


Public Member Functions | |
| MockStorage ()=default | |
| ~MockStorage () override=default | |
| storage::VoidResult | store (const core::dicom_dataset &dataset) override |
| Store a DICOM dataset. | |
| storage::Result< core::dicom_dataset > | retrieve (std::string_view sop_instance_uid) override |
| Retrieve a DICOM dataset by SOP Instance UID. | |
| storage::VoidResult | remove (std::string_view sop_instance_uid) override |
| Remove a DICOM dataset by SOP Instance UID. | |
| bool | exists (std::string_view sop_instance_uid) const override |
| Check if a DICOM instance exists. | |
| storage::Result< std::vector< core::dicom_dataset > > | find (const core::dicom_dataset &) override |
| Find DICOM datasets matching query criteria. | |
| storage::storage_statistics | get_statistics () const override |
| Get storage statistics. | |
| storage::VoidResult | verify_integrity () override |
| Verify storage integrity. | |
| std::size_t | store_count () const |
| Get the number of store() calls. | |
| std::vector< std::string > | stored_uids () const |
| Get all stored UIDs in order. | |
| void | clear () |
| Clear all stored data and call history. | |
| void | on_store (std::function< void(const core::dicom_dataset &)> callback) |
| Set callback for store operations (for assertions) | |
Public Member Functions inherited from kcenon::pacs::storage::storage_interface | |
| virtual | ~storage_interface ()=default |
| Virtual destructor for proper polymorphic destruction. | |
| virtual auto | store_batch (const std::vector< core::dicom_dataset > &datasets) -> VoidResult |
| Store multiple DICOM datasets in a single operation. | |
| virtual auto | retrieve_batch (const std::vector< std::string > &sop_instance_uids) -> Result< std::vector< core::dicom_dataset > > |
| Retrieve multiple DICOM datasets by their SOP Instance UIDs. | |
Private Attributes | |
| std::mutex | mutex_ |
| std::map< std::string, core::dicom_dataset > | datasets_ |
| std::vector< std::string > | store_calls_ |
| std::function< void(const core::dicom_dataset &)> | on_store_ |
Additional Inherited Members | |
Protected Member Functions inherited from kcenon::pacs::storage::storage_interface | |
| storage_interface ()=default | |
| Protected default constructor for derived classes. | |
| storage_interface (const storage_interface &)=delete | |
| Non-copyable. | |
| storage_interface & | operator= (const storage_interface &)=delete |
| storage_interface (storage_interface &&)=default | |
| Movable. | |
| storage_interface & | operator= (storage_interface &&)=default |
Definition at line 64 of file test_support.h.
|
default |
|
overridedefault |
|
inline |
Clear all stored data and call history.
Definition at line 156 of file test_support.h.
References datasets_, mutex_, and store_calls_.
|
inlinenodiscardoverridevirtual |
Check if a DICOM instance exists.
| sop_instance_uid | The unique identifier to check |
Implements kcenon::pacs::storage::storage_interface.
Definition at line 111 of file test_support.h.
|
inlinenodiscardoverridevirtual |
Find DICOM datasets matching query criteria.
Performs a search using DICOM C-FIND semantics. The query dataset contains the search criteria where empty values act as wildcards.
| query | The query dataset containing search criteria |
Implements kcenon::pacs::storage::storage_interface.
Definition at line 117 of file test_support.h.
|
inlinenodiscardoverridevirtual |
Get storage statistics.
Returns aggregated metrics about the current state of storage.
Implements kcenon::pacs::storage::storage_interface.
Definition at line 127 of file test_support.h.
|
inline |
Set callback for store operations (for assertions)
Definition at line 163 of file test_support.h.
References on_store_.
|
inlinenodiscardoverridevirtual |
Remove a DICOM dataset by SOP Instance UID.
| sop_instance_uid | The unique identifier for the instance to remove |
Implements kcenon::pacs::storage::storage_interface.
Definition at line 105 of file test_support.h.
|
inlinenodiscardoverridevirtual |
Retrieve a DICOM dataset by SOP Instance UID.
| sop_instance_uid | The unique identifier for the instance |
Implements kcenon::pacs::storage::storage_interface.
Definition at line 93 of file test_support.h.
|
inlinenodiscardoverridevirtual |
Store a DICOM dataset.
Stores the dataset using its SOP Instance UID as the key. If a dataset with the same UID already exists, it will be replaced.
| dataset | The DICOM dataset to store |
Implements kcenon::pacs::storage::storage_interface.
Definition at line 73 of file test_support.h.
References datasets_, kcenon::pacs::core::dicom_dataset::get_string(), mutex_, on_store_, kcenon::pacs::core::tags::sop_instance_uid, store_calls_, and uid.

|
inlinenodiscard |
Get the number of store() calls.
Definition at line 144 of file test_support.h.
References mutex_, and store_calls_.
|
inlinenodiscard |
Get all stored UIDs in order.
Definition at line 150 of file test_support.h.
References mutex_, and store_calls_.
|
inlinenodiscardoverridevirtual |
Verify storage integrity.
Performs a consistency check on the storage backend. The specific checks depend on the implementation.
Implements kcenon::pacs::storage::storage_interface.
Definition at line 135 of file test_support.h.
|
private |
Definition at line 169 of file test_support.h.
Referenced by clear(), exists(), find(), get_statistics(), remove(), retrieve(), and store().
|
mutableprivate |
Definition at line 168 of file test_support.h.
Referenced by clear(), exists(), find(), get_statistics(), remove(), retrieve(), store(), store_count(), and stored_uids().
|
private |
Definition at line 171 of file test_support.h.
Referenced by on_store(), and store().
|
private |
Definition at line 170 of file test_support.h.
Referenced by clear(), store(), store_count(), and stored_uids().