GsvRepository constructs and store GsvScope objects.
More...
#include <GsvRepository.h>
Inherits std::enable_shared_from_this< GsvRepository >.
|
GsvScopePtr | build (const GsvSets &gsvSets, const GsvScopePtr parent=nullptr) |
|
GsvScopePtr | get (const GsvScopeId &scopeId) const |
|
size_t | size () const |
| Returns the number of GsvScopes in the repository.
|
|
GsvRepositoryPtr | ptr () |
| Returns a shared pointer to the GsvRepository.
|
|
|
static GsvRepositoryPtr | create () |
|
GsvRepository constructs and store GsvScope objects.
◆ create()
GsvRepositoryPtr GsvRepository::create |
( |
| ) |
|
|
static |
Creates a new GsvRepository. The repository initially contains an empty GsvScope, that will be the parent of all scopes created.
◆ build()
GsvScopePtr GsvRepository::build |
( |
const GsvSets & |
gsvSets, |
|
|
const GsvScopePtr |
parent = nullptr |
|
) |
| |
Returns a GsvScope with gsvSets and parent as its parent GsvScope. If an existing GsvScope matches the arguments it will be returned instead of creating a new one.
References ptr().
◆ get()
GsvScopePtr GsvRepository::get |
( |
const GsvScopeId & |
scopeId | ) |
const |
Retrieves a GsvScope from the repository. If no GsvScope is found, an empty shared pointer is returned.