IndexedFieldStack.h
Go to the documentation of this file.
1 #pragma once
2 
4 
6 {
8  {
9  private:
10 
15  uint64_t _index;
16 
17  public:
18 
24  IndexedFieldStack(const FieldStack& previous)
25  : FieldStack(&previous), _index(0) { }
26 
33  {
34  ++_index;
35  return *this;
36  }
37 
43  virtual std::string GetLocation() const override
44  {
45  return GetPrevious()->GetLocation() + "[" + std::to_string(_index) + "]";
46  }
47  };
48 }
49 
virtual std::string GetLocation() const =0
Construct the current location.
IndexedFieldStack & operator++()
Operator overload to increment current index.
virtual std::string GetLocation() const override
Construct the current location.
const FieldStack * GetPrevious() const
Get the previus element in the stack.
Definition: FieldStack.h:24
IndexedFieldStack(const FieldStack &previous)
Constructor.


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48