Sha256: b62c93921c7fc8b299ec87a35699d2f10dce895e0fbe86d0d7ac6aad49729054
Contents?: true
Size: 974 Bytes
Versions: 5
Compression:
Stored size: 974 Bytes
Contents
// // refract/TypeQueryVisitor.cc // librefract // // Created by Jiri Kratochvil on 17/06/15. // Copyright (c) 2015 Apiary Inc. All rights reserved. // #include "Element.h" #include "TypeQueryVisitor.h" #define VISIT_IMPL( ELEMENT ) void TypeQueryVisitor::operator()(const ELEMENT ## Element& e) { typeInfo = ELEMENT; } namespace refract { TypeQueryVisitor::TypeQueryVisitor() : typeInfo(Unknown) { } void TypeQueryVisitor::operator()(const IElement& e) { TypeQueryVisitor query; VisitBy(e, query); typeInfo = query.get(); } VISIT_IMPL(Null) VISIT_IMPL(String) VISIT_IMPL(Number) VISIT_IMPL(Boolean) VISIT_IMPL(Array) VISIT_IMPL(Enum) VISIT_IMPL(Member) VISIT_IMPL(Object) VISIT_IMPL(Extend) VISIT_IMPL(Option) VISIT_IMPL(Select) TypeQueryVisitor::ElementType TypeQueryVisitor::get() const { return typeInfo; } }; // namespace refract #undef VISIT_IMPL
Version data entries
5 entries across 5 versions & 1 rubygems