data: NameHierarchy class
* replaced vector of strings as name hierarchy by a new NameHierarchy class. * Adjusted code in ASTVisitor, Storage and various test cases.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef NAME_HIERARCHY_H
|
||||
#define NAME_HIERARCHY_H
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "data/name/NameElement.h"
|
||||
|
||||
class NameHierarchy
|
||||
{
|
||||
public:
|
||||
NameHierarchy();
|
||||
~NameHierarchy();
|
||||
|
||||
void push(std::shared_ptr<NameElement> element);
|
||||
void pop();
|
||||
std::shared_ptr<NameElement> back();
|
||||
std::shared_ptr<NameElement> operator[](size_t pos) const;
|
||||
size_t size() const;
|
||||
|
||||
std::string getFullName() const;
|
||||
|
||||
private:
|
||||
std::vector<std::shared_ptr<NameElement>> m_elements;
|
||||
};
|
||||
|
||||
#endif // NAME_ELEMENT_H
|
||||
Reference in New Issue
Block a user