Class Parser::TrackedListPtr¶
-
template<typename
T
>
classTrackedListPtr
¶ Class used to ensure ownership of dynamically allocated lists to string or Node objects that are dynamically allocated within the parser.
- Template Parameters
T
: - std::string or Node type
Public Functions
-
TrackedListPtr
(const TrackedListPtr&)¶
-
TrackedListPtr &
operator=
(const TrackedListPtr&)¶
-
std::list<T *> *
release
()¶ Releases ownership of contained string or Node pointer list and returns a pointer to the list.
-
void
push_back
(TrackedPtr<T> *item)¶ Proxy method for adding a TrackedPtr object to the end of contained string or Node pointer list.
- Parameters
item
: - TrackedPtr object to be added to list
-
void
push_back
(T *item)¶ Proxy method for adding a string or Node pointer to the end of contained string or Node pointer list. This method accepts a string or Node pointer, which is wrapped in a TrackedPtr object that is then added to the list.
- Parameters
item
: - string or Node pointer to be added to list
Public Static Functions
-
template<typename ...
Args
>
static TrackedListPtr<T> *make
(std::vector<std::unique_ptr<TrackedListPtr<T>>> &tracked_ptrs, Args&&... args)¶ Creates an instance of a TrackedListPtr and returns a pointer to created instance.
- Return
- pointer to created TrackedListPtr
- Parameters
tracked_ptrs
: - TrackedListPtr unique pointer vector, which takes ownership of dynamically allocated objects.args
: - Arguments to be used when creating contained string or Node pointer lists.
-
static TrackedListPtr<T> *
makeEmpty
()¶ Returns a pointer to a TrackedListPtr instance that represents an empty TrackedListPtr.