summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-1/ref.hpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 05:02:10 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 05:02:10 -0800
commit520119a6f6ed418b8ae45bfde8239bbb532562cd (patch)
tree6cc381877adb5ddfaf131415c64f87eca5649676 /starts/meaning-vm/level-1/ref.hpp
parentcd03e291664cb102bde61d86a15f0add11809766 (diff)
downloadstandingwithresilience-520119a6f6ed418b8ae45bfde8239bbb532562cd.tar.gz
standingwithresilience-520119a6f6ed418b8ae45bfde8239bbb532562cd.zip
cleanup mixin pointer mess for refs
Diffstat (limited to 'starts/meaning-vm/level-1/ref.hpp')
-rw-r--r--starts/meaning-vm/level-1/ref.hpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/starts/meaning-vm/level-1/ref.hpp b/starts/meaning-vm/level-1/ref.hpp
index 40eee20..8a7394e 100644
--- a/starts/meaning-vm/level-1/ref.hpp
+++ b/starts/meaning-vm/level-1/ref.hpp
@@ -1,15 +1,17 @@
#pragma once
#include "common.hpp"
+#include "../level-0/baseref.hpp"
#include "../level-0/ref.hpp"
-#include "../level-0/ref-mixin.hpp"
namespace intellect {
namespace level1 {
-struct ref : public level0::refmixin<ref,vref>
+struct ref : public level0::baseref<ref,vref,level0::concept>
{
- ref(level0::ref const & other) : ref0(other) { }
+ using level0::baseref<ref,vref,level0::concept>::baseref;
+ ref(level0::concept * p) : baseref(p) { }
+ ref(level0::ref const & other) : baseref(other.ptr()) { }
ref(std::string const & name);
ref(const char *name) : ref(std::string(name)) { }
ref(bool b) : ref(b ? "true" : "false") { }
@@ -20,14 +22,11 @@ struct ref : public level0::refmixin<ref,vref>
vref<std::string> name() const;
- level0::ref & l0() { return ref0; }
+ level0::ref & l0() { return *reinterpret_cast<level0::ref*>(this); }
ref & l1() { return self; }
ref const & l1() const { return self; }
std::string dump(ref skipmarkertype, ref skipmarkertarget);
-private:
-
- level0::ref ref0;
};
}