Cache: Rename all C++ headers from *.h to *.hh

Also remove some superfluous files and old include guards.
This commit is contained in:
Johan Wikman 2016-12-09 09:35:39 +02:00
parent 3877d7bc5e
commit f871664796
38 changed files with 47 additions and 84 deletions

View File

@ -12,12 +12,12 @@
*/
#define MXS_MODULE_NAME "cache"
#include "cache.h"
#include "cache.hh"
#include <new>
#include <maxscale/alloc.h>
#include <maxscale/gwdirs.h>
#include "storagefactory.h"
#include "storage.h"
#include "storagefactory.hh"
#include "storage.hh"
Cache::Cache(const std::string& name,
const CACHE_CONFIG* pConfig,

View File

@ -17,8 +17,8 @@
#include <maxscale/gwdirs.h>
#include <maxscale/modulecmd.h>
#include <maxscale/cpp.hh>
#include "cachemt.h"
#include "cachept.h"
#include "cachemt.hh"
#include "cachept.hh"
using std::auto_ptr;
using std::string;

View File

@ -17,7 +17,7 @@
#include <maxscale/alloc.h>
#include <maxscale/query_classifier.h>
#include <maxscale/mysql_utils.h>
#include "storage.h"
#include "storage.hh"
CacheFilterSession::CacheFilterSession(SESSION* pSession, Cache* pCache, char* zDefaultDb)
: maxscale::FilterSession(pSession)

View File

@ -15,7 +15,7 @@
#include <maxscale/cdefs.h>
#include <maxscale/buffer.h>
#include <maxscale/filter.hh>
#include "cache.h"
#include "cache.hh"
#include "cachefilter.h"
#include "cache_storage_api.h"

View File

@ -12,9 +12,9 @@
*/
#define MXS_MODULE_NAME "cache"
#include "cachemt.h"
#include "storage.h"
#include "storagefactory.h"
#include "cachemt.hh"
#include "storage.hh"
#include "storagefactory.hh"
using maxscale::SpinLockGuard;
using std::tr1::shared_ptr;

View File

@ -14,7 +14,7 @@
#include <maxscale/cdefs.h>
#include <maxscale/spinlock.hh>
#include "cachesimple.h"
#include "cachesimple.hh"
class CacheMT : public CacheSimple
{

View File

@ -12,12 +12,12 @@
*/
#define MXS_MODULE_NAME "cache"
#include "cachept.h"
#include "cachept.hh"
#include <maxscale/atomic.h>
#include <maxscale/platform.h>
#include <maxscale/cpp.hh>
#include "cachest.h"
#include "storagefactory.h"
#include "cachest.hh"
#include "storagefactory.hh"
using std::tr1::shared_ptr;
using std::string;

View File

@ -15,7 +15,7 @@
#include <maxscale/cdefs.h>
#include <tr1/memory>
#include <vector>
#include "cache.h"
#include "cache.hh"
class CachePT : public Cache
{

View File

@ -12,9 +12,9 @@
*/
#define MXS_MODULE_NAME "cache"
#include "cachesimple.h"
#include "storage.h"
#include "storagefactory.h"
#include "cachesimple.hh"
#include "storage.hh"
#include "storagefactory.hh"
CacheSimple::CacheSimple(const std::string& name,
const CACHE_CONFIG* pConfig,

View File

@ -15,7 +15,7 @@
#include <maxscale/cdefs.h>
#include <tr1/unordered_map>
#include <maxscale/hashtable.h>
#include "cache.h"
#include "cache.hh"
#include "cache_storage_api.hh"
class Storage;

View File

@ -12,10 +12,10 @@
*/
#define MXS_MODULE_NAME "cache"
#include "cachest.h"
#include "cachest.hh"
#include <maxscale/cpp.hh>
#include "storage.h"
#include "storagefactory.h"
#include "storage.hh"
#include "storagefactory.hh"
using std::tr1::shared_ptr;

View File

@ -13,7 +13,7 @@
*/
#include <maxscale/cdefs.h>
#include "cachesimple.h"
#include "cachesimple.hh"
class CacheST : public CacheSimple
{

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "cache"
#include "lrustorage.h"
#include "lrustorage.hh"
LRUStorage::LRUStorage(Storage* pstorage, size_t max_count, size_t max_size)
: pstorage_(pstorage)

View File

@ -16,7 +16,7 @@
#include <tr1/unordered_map>
#include "cachefilter.h"
#include "cache_storage_api.hh"
#include "storage.h"
#include "storage.hh"
class LRUStorage : public Storage
{

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "cache"
#include "lrustoragemt.h"
#include "lrustoragemt.hh"
using maxscale::SpinLockGuard;

View File

@ -14,7 +14,7 @@
#include <maxscale/cdefs.h>
#include <maxscale/spinlock.hh>
#include "lrustorage.h"
#include "lrustorage.hh"
class LRUStorageMT : public LRUStorage
{

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "cache"
#include "lrustoragest.h"
#include "lrustoragest.hh"
#include <maxscale/cpp.hh>
LRUStorageST::LRUStorageST(Storage* pstorage, size_t max_count, size_t max_size)

View File

@ -13,7 +13,7 @@
*/
#include <maxscale/cdefs.h>
#include "lrustorage.h"
#include "lrustorage.hh"
class LRUStorageST : public LRUStorage
{

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "cache"
#include "storage.h"
#include "storage.hh"
Storage::Storage()

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "storage_inmemory"
#include "inmemorystorage.h"
#include "inmemorystorage.hh"
#include <openssl/sha.h>
#include <algorithm>
#include <set>

View File

@ -17,7 +17,6 @@
#include <string>
#include <vector>
#include <tr1/unordered_map>
#include "../../cachefilter.h"
#include "../../cache_storage_api.hh"
class InMemoryStorage

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "storage_inmemory"
#include "inmemorystoragemt.h"
#include "inmemorystoragemt.hh"
using maxscale::SpinLockGuard;

View File

@ -14,7 +14,7 @@
#include <maxscale/cdefs.h>
#include <maxscale/spinlock.hh>
#include "inmemorystorage.h"
#include "inmemorystorage.hh"
class InMemoryStorageMT : public InMemoryStorage
{

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "storage_inmemory"
#include "inmemorystoragest.h"
#include "inmemorystoragest.hh"
InMemoryStorageST::InMemoryStorageST(const std::string& name, uint32_t ttl)
: InMemoryStorage(name, ttl)

View File

@ -13,7 +13,7 @@
*/
#include <maxscale/cdefs.h>
#include "inmemorystorage.h"
#include "inmemorystorage.hh"
class InMemoryStorageST : public InMemoryStorage
{

View File

@ -14,8 +14,8 @@
#define MXS_MODULE_NAME "storage_inmemory"
#include <inttypes.h>
#include "../../cache_storage_api.h"
#include "inmemorystoragest.h"
#include "inmemorystoragemt.h"
#include "inmemorystoragest.hh"
#include "inmemorystoragemt.hh"
namespace
{

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "storage_rocksdb"
#include "rocksdbinternals.h"
#include "rocksdbinternals.hh"
#include <rocksdb/env.h>
#include <util/coding.h>

View File

@ -1,6 +1,4 @@
#pragma once
#ifndef _ROCKSDBINTERNALS_H
#define _ROCKSDBINTERNALS_H
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
@ -15,7 +13,6 @@
*/
#include <maxscale/cdefs.h>
#include "storage_rocksdb.h"
#include <rocksdb/env.h>
#include <rocksdb/version.h>
#include <rocksdb/slice.h>
@ -38,5 +35,3 @@ static const uint32_t TS_LENGTH = sizeof(int32_t);
bool IsStale(const rocksdb::Slice& slice, int32_t ttl, rocksdb::Env* pEnv);
}
#endif

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "storage_rocksdb"
#include "rocksdbstorage.h"
#include "rocksdbstorage.hh"
#include <openssl/sha.h>
#include <sys/stat.h>
#include <sys/types.h>
@ -25,7 +25,7 @@
#include <maxscale/gwdirs.h>
#include <maxscale/modutil.h>
#include <maxscale/query_classifier.h>
#include "rocksdbinternals.h"
#include "rocksdbinternals.hh"
using std::for_each;
using std::set;

View File

@ -1,6 +1,4 @@
#pragma once
#ifndef _ROCKSDBSTORAGE_H
#define _ROCKSDBSTORAGE_H
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
@ -15,7 +13,6 @@
*/
#include <maxscale/cdefs.h>
#include "storage_rocksdb.h"
#include <memory>
#include <string>
#include <rocksdb/utilities/db_ttl.h>
@ -62,5 +59,3 @@ private:
static rocksdb::WriteOptions s_writeOptions;
};
#endif

View File

@ -12,10 +12,9 @@
*/
#define MXS_MODULE_NAME "storage_rocksdb"
#include "storage_rocksdb.h"
#include <inttypes.h>
#include "../../cache_storage_api.h"
#include "rocksdbstorage.h"
#include "rocksdbstorage.hh"
namespace
{

View File

@ -1,21 +0,0 @@
#pragma once
#ifndef _STORAGE_ROCKSDB_H
#define _STORAGE_ROCKSDB_H
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
*
* Change Date: 2019-07-01
*
* On the date above, in accordance with the Business Source License, use
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#define MXS_MODULE_NAME "storage_rocksdb"
#include <maxscale/cdefs.h>
#include <maxscale/log_manager.h>
#endif

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "cache"
#include "storagefactory.h"
#include "storagefactory.hh"
#include <dlfcn.h>
#include <sys/param.h>
#include <new>
@ -20,9 +20,9 @@
#include <maxscale/gwdirs.h>
#include <maxscale/log_manager.h>
#include "cachefilter.h"
#include "lrustoragest.h"
#include "lrustoragemt.h"
#include "storagereal.h"
#include "lrustoragest.hh"
#include "lrustoragemt.hh"
#include "storagereal.hh"
namespace

View File

@ -1,6 +1,4 @@
#pragma once
#ifndef _MAXSCALE_FILTER_CACHE_STORAGEFACTORY_H
#define _MAXSCALE_FILTER_CACHE_STORAGEFACTORY_H
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
@ -44,5 +42,3 @@ private:
CACHE_STORAGE_API* m_pApi; /*< API of storage. */
uint32_t m_capabilities; /*< Capabilities of storage. */
};
#endif

View File

@ -12,7 +12,7 @@
*/
#define MXS_MODULE_NAME "cache"
#include "storagereal.h"
#include "storagereal.hh"
StorageReal::StorageReal(CACHE_STORAGE_API* pApi, CACHE_STORAGE* pStorage)

View File

@ -13,7 +13,7 @@
*/
#include <maxscale/cdefs.h>
#include "storage.h"
#include "storage.hh"
class StorageReal : public Storage
{