1641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang/* 2641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * Copyright 2010, The Android Open Source Project 3641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * 4641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * Licensed under the Apache License, Version 2.0 (the "License"); 5641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * you may not use this file except in compliance with the License. 6641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * You may obtain a copy of the License at 7641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * 8641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * http://www.apache.org/licenses/LICENSE-2.0 9641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * 10641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * Unless required by applicable law or agreed to in writing, software 11641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * distributed under the License is distributed on an "AS IS" BASIS, 12641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * See the License for the specific language governing permissions and 14641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang * limitations under the License. 15641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang */ 16641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang 17641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang#include "slang_rs_exportable.h" 18641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang 19e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hinesnamespace slang { 20641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang 213cd3dd327445fcfa49f0e96cb2de2055bce541e9Zonr Changbool RSExportable::keep() { 223cd3dd327445fcfa49f0e96cb2de2055bce541e9Zonr Chang if (isKeep()) 233cd3dd327445fcfa49f0e96cb2de2055bce541e9Zonr Chang return false; 24641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang // Invalidate associated Context. 255abbe0e9ca2508260b627ffef2bf01e2554e8357Chris Wailes mContext = nullptr; 263cd3dd327445fcfa49f0e96cb2de2055bce541e9Zonr Chang return true; 27641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang} 28641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang 29641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Changbool RSExportable::equals(const RSExportable *E) const { 305abbe0e9ca2508260b627ffef2bf01e2554e8357Chris Wailes return ((E == nullptr) ? false : (mK == E->mK)); 31641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang} 32e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines 33e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines} // namespace slang 34