Add a not-very-useful generic CachedRealm implementation

This commit is contained in:
Thomas Goyne 2015-12-03 14:19:24 -08:00 committed by Thomas Goyne
parent 112c778d8e
commit 4eb49ce6dc
2 changed files with 47 additions and 0 deletions

View File

@ -35,6 +35,13 @@ if(APPLE)
impl/apple/cached_realm.hpp
impl/apple/external_commit_helper.hpp)
find_library(CF_LIBRARY CoreFoundation)
else()
include_directories(impl/generic)
list(APPEND SOURCES
impl/generic/external_commit_helper.cpp)
list(APPEND HEADERS
impl/generic/cached_realm.hpp
impl/generic/external_commit_helper.hpp)
endif()
add_library(realm-object-store SHARED ${SOURCES} ${HEADERS})

View File

@ -0,0 +1,40 @@
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
#ifndef REALM_CACHED_REALM_HPP
#define REALM_CACHED_REALM_HPP
#include "../cached_realm_base.hpp"
namespace realm {
class Realm;
namespace _impl {
class CachedRealm : public CachedRealmBase {
public:
using CachedRealmBase::CachedRealmBase;
// Do nothing, as this can't be implemented portably
void notify() { }
};
} // namespace _impl
} // namespace realm
#endif // REALM_CACHED_REALM_HPP