Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/eckit/cmd/CmdResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
#include "eckit/cmd/Arg.h"
#include "eckit/cmd/CmdArg.h"
#include "eckit/eckit.h"
#include "eckit/memory/NonCopyable.h"


namespace eckit {


class CmdResource : private eckit::NonCopyable {
class CmdResource {

using Proc = void (*)(CmdResource*, CmdArg&, std::istream&, std::ostream&);

Expand All @@ -30,6 +29,11 @@ class CmdResource : private eckit::NonCopyable {

CmdResource(const std::string&);

CmdResource(const CmdResource&) = delete;
CmdResource& operator=(const CmdResource&) = delete;
CmdResource(CmdResource&&) = delete;
CmdResource& operator=(CmdResource&&) = delete;

// -- Destructor

virtual ~CmdResource();
Expand Down
7 changes: 6 additions & 1 deletion src/eckit/cmd/RemoteCommandable.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ namespace eckit {

/// A RemoteCommand-able object

class RemoteCommandable : private eckit::NonCopyable {
class RemoteCommandable {
public:

// -- Contructors

RemoteCommandable(int port = 0);

RemoteCommandable(const RemoteCommandable&) = delete;
RemoteCommandable& operator=(const RemoteCommandable&) = delete;
RemoteCommandable(RemoteCommandable&&) = delete;
RemoteCommandable& operator=(RemoteCommandable&&) = delete;

// -- Destructor

~RemoteCommandable();
Expand Down
10 changes: 7 additions & 3 deletions src/eckit/config/EtcTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@
#include <string>
#include <vector>

#include "eckit/memory/NonCopyable.h"
#include "eckit/thread/Mutex.h"


namespace eckit {


class EtcTable : private NonCopyable {
class EtcTable {
public:

// -- Contructors
// -- Constructors

EtcTable(const std::string&, int = 0, const std::string& = "etc");

EtcTable(const EtcTable&) = delete;
EtcTable& operator=(const EtcTable&) = delete;
EtcTable(EtcTable&&) = delete;
EtcTable& operator=(EtcTable&&) = delete;

// -- Destructor

virtual ~EtcTable();
Expand Down
8 changes: 6 additions & 2 deletions src/eckit/config/ResourceBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <string>

#include "eckit/memory/NonCopyable.h"
#include "eckit/utils/Tokenizer.h"
#include "eckit/utils/Translator.h"

Expand All @@ -28,12 +27,17 @@ namespace eckit {
class Configurable;
class Url;

class ResourceBase : private NonCopyable {
class ResourceBase {

public: // methods

ResourceBase(Configurable* owner, const std::string& str);

ResourceBase(const ResourceBase&) = delete;
ResourceBase& operator=(const ResourceBase&) = delete;
ResourceBase(ResourceBase&&) = delete;
ResourceBase& operator=(ResourceBase&&) = delete;

virtual ~ResourceBase();

void reset() { inited_ = false; }
Expand Down
8 changes: 6 additions & 2 deletions src/eckit/config/ResourceMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <map>
#include <string>

#include "eckit/memory/NonCopyable.h"
#include "eckit/thread/Mutex.h"

namespace eckit {
Expand Down Expand Up @@ -50,7 +49,7 @@ class ResourceQualifier {
//----------------------------------------------------------------------------------------------------------------------


class ResourceMgr : private eckit::NonCopyable {
class ResourceMgr {

public: // class methods

Expand All @@ -64,6 +63,11 @@ class ResourceMgr : private eckit::NonCopyable {

ResourceMgr();

ResourceMgr(const ResourceMgr&) = delete;
ResourceMgr& operator=(const ResourceMgr&) = delete;
ResourceMgr(ResourceMgr&&) = delete;
ResourceMgr& operator=(ResourceMgr&&) = delete;

bool doLookUp(const std::string&, const std::string&, const std::string&, std::string&);

// Only for my friends
Expand Down
8 changes: 6 additions & 2 deletions src/eckit/config/YAMLConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "eckit/config/Configuration.h"
#include "eckit/io/SharedBuffer.h"
#include "eckit/memory/NonCopyable.h"

namespace eckit {

Expand All @@ -25,7 +24,7 @@ class Stream;

//----------------------------------------------------------------------------------------------------------------------

class YAMLConfiguration : public Configuration, private eckit::NonCopyable {
class YAMLConfiguration : public Configuration {

public:

Expand All @@ -35,6 +34,11 @@ class YAMLConfiguration : public Configuration, private eckit::NonCopyable {
YAMLConfiguration(const std::string&, char separator = '.');
YAMLConfiguration(const SharedBuffer&, char separator = '.');

YAMLConfiguration(const YAMLConfiguration&) = delete;
YAMLConfiguration& operator=(const YAMLConfiguration&) = delete;
YAMLConfiguration(YAMLConfiguration&&) = delete;
YAMLConfiguration& operator=(YAMLConfiguration&&) = delete;

~YAMLConfiguration() override;

private: // members
Expand Down
8 changes: 6 additions & 2 deletions src/eckit/container/BTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "eckit/exception/Exceptions.h"
#include "eckit/filesystem/PathName.h"
#include "eckit/io/PooledFileDescriptor.h"
#include "eckit/memory/NonCopyable.h"
#include "eckit/memory/Padded.h"
#include "eckit/os/Stat.h"
#include "eckit/thread/AutoLock.h"
Expand Down Expand Up @@ -63,7 +62,7 @@ class BTreeNoLock {
/// @invariant L implements locking policy
///
template <class K, class V, int S, class L = BTreeNoLock>
class BTree : private NonCopyable {
class BTree {
public:

using key_type = K;
Expand All @@ -74,6 +73,11 @@ class BTree : private NonCopyable {

BTree(const PathName&, bool readOnly = false, off_t offset = 0);

BTree(const BTree&) = delete;
BTree& operator=(const BTree&) = delete;
BTree(BTree&&) = delete;
BTree& operator=(BTree&&) = delete;

// -- Destructor

~BTree();
Expand Down
10 changes: 7 additions & 3 deletions src/eckit/container/BloomFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#ifndef eckit_containers_BloomFilter_H
#define eckit_containers_BloomFilter_H

#include "eckit/memory/NonCopyable.h"

#include <ostream>
#include <vector>

Expand All @@ -28,7 +26,7 @@ namespace eckit {
//----------------------------------------------------------------------------------------------------------------------

template <typename T>
class BloomFilter : private NonCopyable {
class BloomFilter {

public: // types

Expand All @@ -37,6 +35,12 @@ class BloomFilter : private NonCopyable {
public: // methods

BloomFilter(size_t size);

BloomFilter(const BloomFilter&) = delete;
BloomFilter& operator=(const BloomFilter&) = delete;
BloomFilter(BloomFilter&&) = delete;
BloomFilter& operator=(BloomFilter&&) = delete;

~BloomFilter();

bool empty() const;
Expand Down
9 changes: 6 additions & 3 deletions src/eckit/container/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

#include "eckit/eckit.h"

#include "eckit/memory/NonCopyable.h"

//-----------------------------------------------------------------------------

namespace eckit {
Expand All @@ -36,7 +34,7 @@ namespace eckit {
/// @todo implement the expire() and the different policies

template <typename K, typename V>
class Cache : private NonCopyable {
class Cache {

public: // types

Expand Down Expand Up @@ -89,6 +87,11 @@ class Cache : private NonCopyable {

Cache();

Cache(const Cache&) = delete;
Cache& operator=(const Cache&) = delete;
Cache(Cache&&) = delete;
Cache& operator=(Cache&&) = delete;

~Cache();

/// inserts an object in the cache
Expand Down
8 changes: 6 additions & 2 deletions src/eckit/container/CacheLRU.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@

#include "eckit/exception/Exceptions.h"
#include "eckit/log/CodeLocation.h"
#include "eckit/memory/NonCopyable.h"

namespace eckit {

//----------------------------------------------------------------------------------------------------------------------

template <typename K, typename V>
class CacheLRU : private NonCopyable {
class CacheLRU {

public: // types

Expand Down Expand Up @@ -59,6 +58,11 @@ class CacheLRU : private NonCopyable {

CacheLRU(size_t capacity, purge_handler_type purge = 0);

CacheLRU(const CacheLRU&) = delete;
CacheLRU& operator=(const CacheLRU&) = delete;
CacheLRU(CacheLRU&&) = delete;
CacheLRU& operator=(CacheLRU&&) = delete;

~CacheLRU();

/// Inserts an entry into the cache, overwrites if already exists
Expand Down
9 changes: 6 additions & 3 deletions src/eckit/container/ClassExtent.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,26 @@
#include <map>

#include "eckit/exception/Exceptions.h"
#include "eckit/memory/NonCopyable.h"
#include "eckit/thread/AutoLock.h"
#include "eckit/thread/Mutex.h"


namespace eckit {

//-----------------------------------------------------------------------------

template <class T>
class ClassExtent : private NonCopyable {
class ClassExtent {
public:

// -- Contructors

ClassExtent(T*);

ClassExtent(const ClassExtent&) = delete;
ClassExtent& operator=(const ClassExtent&) = delete;
ClassExtent(ClassExtent&&) = delete;
ClassExtent& operator=(ClassExtent&&) = delete;

// -- Destructor

~ClassExtent();
Expand Down
6 changes: 4 additions & 2 deletions src/eckit/container/MappedArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "eckit/exception/Exceptions.h"
#include "eckit/filesystem/PathName.h"
#include "eckit/memory/NonCopyable.h"
#include "eckit/os/Semaphore.h"


Expand All @@ -29,7 +28,7 @@ namespace eckit {
// Used to std::map an array to a file

template <class T>
class MappedArray : private NonCopyable {
class MappedArray {
public:

// stl compatibility
Expand All @@ -41,6 +40,9 @@ class MappedArray : private NonCopyable {

MappedArray(const PathName&, unsigned long);

MappedArray(const MappedArray&) = delete;
MappedArray& operator=(const MappedArray&) = delete;

// -- Destructor

~MappedArray();
Expand Down
8 changes: 6 additions & 2 deletions src/eckit/container/SharedMemArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <cstdint>

#include "eckit/memory/NonCopyable.h"
#include "eckit/os/Semaphore.h"

#include "eckit/memory/Padded.h"
Expand All @@ -35,7 +34,7 @@ namespace eckit {
/// Maps an array to shared memory

template <class T>
class SharedMemArray : private NonCopyable {
class SharedMemArray {
public: // types

using iterator = T*;
Expand All @@ -45,6 +44,11 @@ class SharedMemArray : private NonCopyable {

SharedMemArray(const PathName&, const std::string& shmName, size_t);

SharedMemArray(const SharedMemArray&) = delete;
SharedMemArray& operator=(const SharedMemArray&) = delete;
SharedMemArray(SharedMemArray&&) = delete;
SharedMemArray& operator=(SharedMemArray&&) = delete;

~SharedMemArray();

void sync();
Expand Down
10 changes: 7 additions & 3 deletions src/eckit/container/Trie.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#ifndef eckit_containers_Trie_H
#define eckit_containers_Trie_H

#include "eckit/memory/NonCopyable.h"

#include <ostream>
#include <vector>

Expand All @@ -28,11 +26,17 @@ namespace eckit {
//----------------------------------------------------------------------------------------------------------------------

template <class T>
class Trie : private NonCopyable {
class Trie {

public: // methods

Trie();

Trie(const Trie&) = delete;
Trie& operator=(const Trie&) = delete;
Trie(Trie&&) = delete;
Trie& operator=(Trie&&) = delete;

~Trie();

bool empty() const { return kids_.empty() && !set_; }
Expand Down
Loading