diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-11-25 08:42:45 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-11-25 08:42:45 -0800 |
commit | 684ac69af192670bb6547ec01df19a3159e7d8e6 (patch) | |
tree | e6c6762e9fc40cf0ad557e160e9ab6ba7bb99eea /starts/meaning-vm/level-1/ref.hpp | |
parent | 520119a6f6ed418b8ae45bfde8239bbb532562cd (diff) | |
download | standingwithresilience-684ac69af192670bb6547ec01df19a3159e7d8e6.tar.gz standingwithresilience-684ac69af192670bb6547ec01df19a3159e7d8e6.zip |
separate functionality out a bit
Diffstat (limited to 'starts/meaning-vm/level-1/ref.hpp')
-rw-r--r-- | starts/meaning-vm/level-1/ref.hpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/starts/meaning-vm/level-1/ref.hpp b/starts/meaning-vm/level-1/ref.hpp index 8a7394e..3f2214d 100644 --- a/starts/meaning-vm/level-1/ref.hpp +++ b/starts/meaning-vm/level-1/ref.hpp @@ -1,30 +1,14 @@ #pragma once #include "common.hpp" -#include "../level-0/baseref.hpp" -#include "../level-0/ref.hpp" +#include "baseref.hpp" namespace intellect { namespace level1 { -struct ref : public level0::baseref<ref,vref,level0::concept> +struct ref : public baseref<ref> { - 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") { } - ref() : ref("nothing") { } - - bool isa(ref group) const; - bool isan(ref group) const { return isa(group); } - - vref<std::string> name() const; - - level0::ref & l0() { return *reinterpret_cast<level0::ref*>(this); } - ref & l1() { return self; } - ref const & l1() const { return self; } + using baseref<ref>::baseref; std::string dump(ref skipmarkertype, ref skipmarkertarget); }; |