Moving Some includes from options.h to forward declaration

Summary: By removing some includes form options.h and reply on forward declaration, we can more easily reason the dependencies.

Test Plan: make all check

Reviewers: kailiu, haobo, igor, dhruba

Reviewed By: kailiu

CC: leveldb

Differential Revision: https://reviews.facebook.net/D15411
This commit is contained in:
Siying Dong 2014-01-24 16:15:05 -08:00
parent f653fdcf5a
commit 8477255da3
14 changed files with 33 additions and 14 deletions

View File

@ -8,6 +8,8 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/compaction_picker.h"
#include <limits>
#include "util/statistics.h"
namespace rocksdb {

View File

@ -21,6 +21,8 @@
#include "rocksdb/env.h"
#include "rocksdb/memtablerep.h"
#include "rocksdb/write_batch.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
#include "rocksdb/statistics.h"
#include "port/port.h"
#include "util/bit_set.h"

View File

@ -21,6 +21,8 @@
#include "rocksdb/cache.h"
#include "rocksdb/compaction_filter.h"
#include "rocksdb/env.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
#include "rocksdb/table.h"
#include "util/hash.h"
#include "util/logging.h"

View File

@ -12,6 +12,8 @@
#pragma once
#include "rocksdb/iterator.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
namespace rocksdb {

View File

@ -35,6 +35,7 @@
#include <stdlib.h>
#include "port/port.h"
#include "util/random.h"
#include "rocksdb/arena.h"
namespace rocksdb {

View File

@ -8,6 +8,8 @@
#include <string>
#include <utility>
#include "db/db_impl.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
namespace rocksdb {

View File

@ -37,12 +37,13 @@
#define STORAGE_ROCKSDB_DB_MEMTABLEREP_H_
#include <memory>
#include "rocksdb/arena.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
namespace rocksdb {
class Arena;
class Slice;
class SliceTransform;
class MemTableRep {
public:
// KeyComparator provides a means to compare keys, which are internal keys

View File

@ -15,11 +15,6 @@
#include <vector>
#include <stdint.h>
#include "rocksdb/memtablerep.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
#include "rocksdb/statistics.h"
#include "rocksdb/table_properties.h"
#include "rocksdb/universal_compaction.h"
namespace rocksdb {
@ -34,6 +29,11 @@ class Logger;
class MergeOperator;
class Snapshot;
class TableFactory;
class MemTableRepFactory;
class TablePropertiesCollector;
class Slice;
class SliceTransform;
class Statistics;
using std::shared_ptr;

View File

@ -6,14 +6,8 @@
#ifndef STORAGE_ROCKSDB_UNIVERSAL_COMPACTION_OPTIONS_H
#define STORAGE_ROCKSDB_UNIVERSAL_COMPACTION_OPTIONS_H
#include <stddef.h>
#include <string>
#include <memory>
#include <vector>
#include <stdint.h>
#include <climits>
#include "rocksdb/slice.h"
#include "rocksdb/statistics.h"
namespace rocksdb {

View File

@ -31,6 +31,8 @@
#include "utilities/utility_db.h"
#include "rocksdb/env.h"
#include "rocksdb/write_batch.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
#include "rocksdb/statistics.h"
#include "port/port.h"
#include "util/coding.h"

View File

@ -9,6 +9,10 @@
#include "util/coding.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
#include <algorithm>
namespace rocksdb {

View File

@ -16,6 +16,8 @@
#include <stdint.h>
#include <string.h>
#include <string>
#include "rocksdb/write_batch.h"
#include "port/port.h"
namespace rocksdb {

View File

@ -17,6 +17,10 @@
#include "rocksdb/env.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/merge_operator.h"
#include "rocksdb/memtablerep.h"
#include "rocksdb/slice.h"
#include "rocksdb/slice_transform.h"
#include "rocksdb/table_properties.h"
#include "table/block_based_table_factory.h"
namespace rocksdb {

View File

@ -21,6 +21,7 @@
#include <string>
#include <limits>
#include <atomic>
#include <unordered_map>
namespace rocksdb {