|
template<typename... Args> |
static ResourcePtr_t | CreateResource (std::string res_name, Args &&...args) |
| Constructs and registers a new resource with a specified name. More...
|
|
template<typename... Args> |
static void | CreateDefaultResource (Args &&...args) |
| Constructs and registers a new resource with no name. More...
|
|
template<typename... Args> |
static ResourcePtr_t | ProposeSharedResource (std::string res_name, Args &&...args) |
| Creates a shared resource only if none exists yet. More...
|
|
template<typename... Args> |
static ResourcePtr_t | ProposeDefaultSharedResource (Args &&...args) |
| Creates a shared resource as default only if none exists yet. More...
|
|
static Resource_t & | DestroyResource (std::string name="") |
| Destroys the specified resource (does nothing if no such resource) More...
|
|
|
static void | AddSharedResource (std::string res_name, ResourcePtr_t res_ptr) |
| Adds a shared resource to the resource registry. More...
|
|
static void | AddDefaultSharedResource (ResourcePtr_t res_ptr) |
| Adds a shared resource to the resource registry (empty name) More...
|
|
template<typename... Args> |
static ResourcePtr_t | ProvideSharedResource (std::string res_name, ResourcePtr_t res_ptr) |
| Registers a shared resource only if none exists yet. More...
|
|
template<typename... Args> |
static ResourcePtr_t | ProvideDefaultSharedResource (ResourcePtr_t res_ptr) |
| Creates a shared resource as default only if none exists yet. More...
|
|
static bool | ReplaceSharedResource (std::string res_name, Resource_t const *old_res_ptr, ResourcePtr_t res_ptr) |
| Adds a shared resource only if it is old_res_ptr. More...
|
|
static bool | ReplaceSharedResource (std::string res_name, ResourcePtr_t old_res_ptr, ResourcePtr_t res_ptr) |
|
|
static bool | ReplaceDefaultSharedResource (Resource_t const *old_res_ptr, ResourcePtr_t res_ptr) |
| Adds a shared resource as default resource only if it is old_res_ptr. More...
|
|
static bool | ReplaceDefaultSharedResource (ResourcePtr_t old_res_ptr, ResourcePtr_t res_ptr) |
|
|
static bool | hasResource (std::string name="") |
|
static ResourcePtr_t | ShareResource (std::string name="") |
| Retrieves the specified resource for sharing (nullptr if none) More...
|
|
static Resource_t & | Resource (std::string name="") |
| Retrieves the specified resource, or throws if not available. More...
|
|
template<typename RES>
class testing::TestSharedGlobalResource< RES >
Utility class providing singleton objects to the derived classes.
- Template Parameters
-
RES | the type of object (include constantness if needed) |
The object is expected to be shared.
Definition at line 388 of file unit_test_base.h.