michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #include "SkDisplayInclude.h" michael@0: #include "SkAnimateMaker.h" michael@0: #include "SkAnimator.h" michael@0: michael@0: #if 0 michael@0: #undef SK_MEMBER michael@0: #define SK_MEMBER(_member, _type) \ michael@0: { #_member, SK_OFFSETOF(BASE_CLASS::_A, _member), SkType_##_type, \ michael@0: sizeof(((BASE_CLASS::_A*) 0)->_member) / sizeof(SkScalar) } michael@0: #endif michael@0: michael@0: #if SK_USE_CONDENSED_INFO == 0 michael@0: michael@0: const SkMemberInfo SkInclude::fInfo[] = { michael@0: SK_MEMBER(src, String) michael@0: }; michael@0: michael@0: #endif michael@0: michael@0: DEFINE_GET_MEMBER(SkInclude); michael@0: michael@0: //SkInclude::SkInclude() { michael@0: // src.init(); michael@0: //} michael@0: michael@0: //SkInclude::~SkInclude() { michael@0: // src.unref(); michael@0: //} michael@0: michael@0: bool SkInclude::enable(SkAnimateMaker & ) { michael@0: return true; michael@0: } michael@0: michael@0: bool SkInclude::hasEnable() const { michael@0: return true; michael@0: } michael@0: michael@0: void SkInclude::onEndElement(SkAnimateMaker& maker) { michael@0: maker.fInInclude = true; michael@0: if (src.size() == 0 || maker.decodeURI(src.c_str()) == false) { michael@0: if (maker.getErrorCode() != SkXMLParserError::kNoError || maker.getNativeCode() != -1) { michael@0: maker.setInnerError(&maker, src); michael@0: maker.setErrorCode(SkDisplayXMLParserError::kInInclude); michael@0: } else { michael@0: maker.setErrorNoun(src); michael@0: maker.setErrorCode(SkDisplayXMLParserError::kIncludeNameUnknownOrMissing); michael@0: } michael@0: } michael@0: maker.fInInclude = false; michael@0: }