slang_rs_exportable.cpp revision 641558f02fe6ce0ee3ae5076eb366c25e2ad5903
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
19641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Changusing namespace slang;
20641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang
21641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Changvoid RSExportable::keep() {
22641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang  // Invalidate associated Context.
23641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang  mContext = NULL;
24641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang  return;
25641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang}
26641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang
27641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Changbool RSExportable::equals(const RSExportable *E) const {
28641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang  return ((E == NULL) ? false : (mK == E->mK));
29641558f02fe6ce0ee3ae5076eb366c25e2ad5903Zonr Chang}
30