Skip to content

Commit

Permalink
Fixes ABI compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-at-work committed Jan 8, 2021
1 parent d906f8d commit b4ab4fe
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 25 deletions.
10 changes: 4 additions & 6 deletions cppcache/include/geode/AuthenticatedView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,12 @@ class APACHE_GEODE_EXPORT AuthenticatedView : public RegionService {
*/
std::vector<std::shared_ptr<Region>> rootRegions() const override;

/**
* @brief destructor
*/
#if (APACHE_GEODE_ABI_VERSION > 1)
~AuthenticatedView() override;
#else
virtual ~AuthenticatedView();
#endif

/**
* @brief constructors
*/
AuthenticatedView(std::shared_ptr<Properties> credentials,
std::shared_ptr<Pool> pool, CacheImpl* cacheImpl);
AuthenticatedView(AuthenticatedView&& other) = default;
Expand Down
6 changes: 6 additions & 0 deletions cppcache/include/geode/Cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,13 @@ class APACHE_GEODE_EXPORT Cache : public GeodeCache {
LogLevel getLogLevel();

Cache() = delete;

#if (APACHE_GEODE_ABI_VERSION > 1)
~Cache() override;
#else
virtual ~Cache();
#endif

Cache(const Cache& other) = delete;
Cache& operator=(const Cache& other) = delete;
Cache(Cache&& other) noexcept;
Expand Down
18 changes: 8 additions & 10 deletions cppcache/include/geode/GeodeCache.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#pragma once

#ifndef GEODE_GEMFIRECACHE_H_
#define GEODE_GEMFIRECACHE_H_

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand All @@ -20,13 +15,14 @@
* limitations under the License.
*/

#pragma once

#ifndef GEODE_GEMFIRECACHE_H_
#define GEODE_GEMFIRECACHE_H_

#include "RegionService.hpp"
#include "internal/geode_globals.hpp"

/**
* @file
*/

namespace apache {
namespace geode {
namespace client {
Expand All @@ -47,7 +43,9 @@ class SystemProperties;

class APACHE_GEODE_EXPORT GeodeCache : public RegionService {
public:
~GeodeCache() override = default;
#if (APACHE_GEODE_ABI_VERSION > 1)
~GeodeCache() override = 0;
#endif

/** Returns the name of this cache.
* @return the string name of this cache
Expand Down
12 changes: 4 additions & 8 deletions cppcache/include/geode/RegionService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
#include "PdxInstanceFactory.hpp"
#include "internal/geode_globals.hpp"

/**
* @file
*/

namespace apache {
namespace geode {
namespace client {
Expand Down Expand Up @@ -60,11 +56,10 @@ class QueryService;
*/

class APACHE_GEODE_EXPORT RegionService {
/**
* @brief public methods
*/
public:
virtual ~RegionService() = default;
#if (APACHE_GEODE_ABI_VERSION > 1)
virtual ~RegionService() = 0;
#endif

/**
* Indicates if this cache has been closed.
Expand Down Expand Up @@ -129,6 +124,7 @@ class APACHE_GEODE_EXPORT RegionService {
virtual PdxInstanceFactory createPdxInstanceFactory(
const std::string& className, bool expectDomainClass) const = 0;
};

} // namespace client
} // namespace geode
} // namespace apache
Expand Down
4 changes: 4 additions & 0 deletions cppcache/include/geode/internal/geode_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

#include "apache-geode_export.h"

#ifndef APACHE_GEODE_ABI_VERSION
#define APACHE_GEODE_ABI_VERSION 0
#endif

/**@namespace geode This namespace contains all the Geode
* C++ API classes, enumerations and globals.
*/
Expand Down
2 changes: 1 addition & 1 deletion cppcache/src/AuthenticatedView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ AuthenticatedView::AuthenticatedView(std::shared_ptr<Properties> credentials,
m_remoteQueryService(nullptr),
m_cacheImpl(cacheImpl) {}

AuthenticatedView::~AuthenticatedView() {}
AuthenticatedView::~AuthenticatedView() = default;

PdxInstanceFactory AuthenticatedView::createPdxInstanceFactory(
const std::string& className, bool expectDomainClass) const {
Expand Down
30 changes: 30 additions & 0 deletions cppcache/src/GeodeCache.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/

#include <geode/GeodeCache.hpp>

namespace apache {
namespace geode {
namespace client {

#if (APACHE_GEODE_ABI_VERSION > 1)
GeodeCache::~GeodeCache() = default;
#endif

} // namespace client
} // namespace geode
} // namespace apache
30 changes: 30 additions & 0 deletions cppcache/src/RegionService.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/

#include <geode/RegionService.hpp>

namespace apache {
namespace geode {
namespace client {

#if (APACHE_GEODE_ABI_VERSION > 1)
virtual RegionService::~RegionService() = default;
#endif

} // namespace client
} // namespace geode
} // namespace apache

0 comments on commit b4ab4fe

Please sign in to comment.