Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ScopeBase.h File Reference
#include <unity/scopes/SearchQueryBase.h>
#include <unity/scopes/PreviewQueryBase.h>
#include <unity/scopes/RegistryProxyFwd.h>
#include <unity/scopes/ActivationQueryBase.h>
#include <unity/scopes/Version.h>
#include <unity/scopes/Result.h>
#include <unity/scopes/ActionMetadata.h>
#include <unity/scopes/SearchMetadata.h>
Include dependency graph for ScopeBase.h:

Go to the source code of this file.

Classes

class  unity::scopes::ScopeBase
 Base class for a scope implementation. More...
 

Namespaces

 unity
 Top-level namespace for all things Unity-related.
 
 unity::scopes
 Top-level namespace for public functionality of the Unity scopes API.
 

Macros

#define UNITY_SCOPE_CREATE_FUNCTION
 Expands to the identifier of the scope create function.
 
#define UNITY_SCOPE_DESTROY_FUNCTION
 Expands to the identifier of the scope destroy function.
 
#define UNITY_SCOPE_CREATE_SYMSTR
 Expands to the identifier of the scope create function as a string literal.
 
#define UNITY_SCOPE_DESTROY_SYMSTR
 Expands to the identifier of the scope destroy function as a string literal.
 

Functions

unity::scopes::ScopeBaseUNITY_SCOPE_CREATE_FUNCTION ()
 The function called by the scopes run time to initialize the scope. It must return a pointer to an instance derived from ScopeBase. The returned instance need not be heap-allocated, but must remain in scope until the destroy function is called by the scopes run time. More...
 
void UNITY_SCOPE_DESTROY_FUNCTION (unity::scopes::ScopeBase *p)
 The function called by the scopes run time to finalize the scope. The passed pointer is the pointer that was returned by the create function. More...
 

Variables

decltype(&UNITY_SCOPE_CREATE_FUNCTION)
typedef 
unity::scopes::CreateFunction
 Convenience typedef for the create function pointer.
 
decltype(&UNITY_SCOPE_DESTROY_FUNCTION)
typedef 
unity::scopes::DestroyFunction
 Convenience typedef for the destroy function pointer.
 

Function Documentation

unity::scopes::ScopeBase* UNITY_SCOPE_CREATE_FUNCTION ( )

The function called by the scopes run time to initialize the scope. It must return a pointer to an instance derived from ScopeBase. The returned instance need not be heap-allocated, but must remain in scope until the destroy function is called by the scopes run time.

If this function throws an exception, the destroy function will not be called. If this function returns NULL, the destroy function will be called with NULL as its argument.

Returns
The pointer to the ScopeBase instance.
void UNITY_SCOPE_DESTROY_FUNCTION ( unity::scopes::ScopeBase p)

The function called by the scopes run time to finalize the scope. The passed pointer is the pointer that was returned by the create function.

Exceptions thrown by the destroy function are ignored.

Parameters
pThe pointer to the instance to be destroyed (previously returned by the create function).