blob: 48458ccf51e4513039053ac11167aa742d2cdec7 [file] [log] [blame]
Brian Osman7c979f52019-02-12 13:27:51 -05001/*
2* Copyright 2019 Google LLC
3*
4* Use of this source code is governed by a BSD-style license that can be
5* found in the LICENSE file.
6*/
7
8#include "SkReflected.h"
9
10SkSTArray<16, const SkReflected::Type*, true> SkReflected::gTypes;
11
12void SkReflected::VisitTypes(std::function<void(const Type*)> visitor, const Type* baseType) {
13 for (const Type* type : gTypes) {
14 if (type->isDerivedFrom(baseType)) {
15 visitor(type);
16 }
17 }
18}