![]() | InDesign SDK 20.5 |
#include <SnipRunManager.h>
Public Types | |
| typedef KeyValuePair< PMString, SnpRunnable * > | Snippet |
| typedef K2Vector< Snippet > | SnippetDict |
Public Member Functions | |
| void | DeleteInstance () |
| void | AddSnippet (SnpRunnable *runnable) |
| void | RemoveSnippet (SnpRunnable *runnable) |
| int32 | GetNumberOfSnippets () const |
| const SnippetDict & | GetSnippets () const |
| SnpRunnable * | FindSnippet (const PMString &snippetName) const |
| void | SortSnippets (void) |
Static Public Member Functions | |
| static SnipRunManager * | Instance () |
Protected Member Functions | |
| SnipRunManager () | |
Manages all registered snippets. Singleton class that is instantiated when the first SnipRun object constructs. The SnipRun constructor adds each registered snippet to the list of SnipRun objects held by SnipRunManager.
| typedef KeyValuePair<PMString, SnpRunnable*> SnipRunManager::Snippet |
Snippet dictionary element, key is the name of the snippet, value is a pointer to its registered SnipRun object.
| typedef K2Vector<Snippet> SnipRunManager::SnippetDict |
Dictionary of registered snippets.
| protected |
Constructor is protected because this is a singleton.
| void SnipRunManager::AddSnippet | ( | SnpRunnable * | runnable | ) |
Add snippet to list of registered snippets. If a snippet is already registered under this name the request will be ignored.
| runnable | snippet to be registered. |
| void SnipRunManager::DeleteInstance | ( | ) |
Destroys the single global instance of this singleton.
| SnpRunnable * SnipRunManager::FindSnippet | ( | const PMString & | snippetName | ) | const |
Lookup the named snippet in the list of registered snippets.
| snippetName |
| inline |
Get the number of registered snippets.
| inline |
Return a dictionary of registered snippets.
| static |
Returns the global instance of this singleton, call like this SnipRunManager::Instance().
| void SnipRunManager::RemoveSnippet | ( | SnpRunnable * | runnable | ) |
Remove snippet from list of registered snippets.
| runnable | snippet to be removed. |
| void SnipRunManager::SortSnippets | ( | void | ) |
Sort the list of registered snippets.