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/vref.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/vref.hpp')
-rw-r--r-- | starts/meaning-vm/level-1/vref.hpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/starts/meaning-vm/level-1/vref.hpp b/starts/meaning-vm/level-1/vref.hpp deleted file mode 100644 index fb7ba5d..0000000 --- a/starts/meaning-vm/level-1/vref.hpp +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include "../level-0/vref.hpp" -#include "ref.hpp" - -#include <sstream> - -namespace intellect { -namespace level1 { - -template <typename T> -struct vref : public level0::vref<T> -{ - vref(level0::vref<T> other) : level0::vref<T>((level0::concept*)other.ref) { } - vref(level0::value<T> *p) : level0::vref<T>(p) { } - vref(ref const & other) : level0::vref<T>(other) { } - vref(T const & val) - : level0::vref<T>(val) - { - std::stringstream ss; - ss << "v:" << val; - ref(self).set(ref("name"), (level0::ref)level0::vref<std::string>(ss.str())); - } - - using level0::vref<T>::operator->; - using level0::vref<T>::operator T const &; - - vref<std::string> name() - { - return ref(self).name(); - } - - operator ref() { return level0::ref(level0::vref<T>::ptr); } -}; - - -} -} |