// // scope.h // reflection // // Created by Sam Jaffe on 2/20/23. // Copyright © 2023 Sam Jaffe. All rights reserved. // #pragma once #include #include #include namespace reflection { class Scope { private: std::string type_name_; std::vector path_; public: template > Scope(std::string const & type_name, C const & path) : type_name_(type_name), path_(path.begin(), path.end()) {} Scope(std::string const & type_name, std::vector const & path) : type_name_(type_name), path_(path) {} std::string_view type_name() const { return type_name_; } auto begin() const { return path_.begin(); } auto end() const { return path_.end(); } }; class ContextScope : public Scope { private: std::string context_; public: template > ContextScope(std::string const & context, std::string const & type_name, C const & path) : context_(context), Scope(type_name, path) {} std::string_view context() const { return context_; } }; }