1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@@ -34,55 +34,55 @@ namespace idbdatafile
class IDBFileSystem
{
public:
/**
* The TYPE enum defines the supported underlying filesystem types
*/
enum Types
{
UNKNOWN = 0x00,
POSIX = 0x0001,
HDFS = 0x0002
};
/**
* The TYPE enum defines the supported underlying filesystem types
*/
enum Types
{
UNKNOWN = 0x00,
POSIX = 0x0001,
HDFS = 0x0002
};
/**
* Destructor
*/
virtual ~IDBFileSystem();
/**
* Destructor
*/
virtual ~IDBFileSystem();
/**
* getFs() returns a reference to the IDBFileSystem instance for the
* specified type
*/
static IDBFileSystem& getFs(IDBDataFile::Types type);
/**
* getFs() returns a reference to the IDBFileSystem instance for the
* specified type
*/
static IDBFileSystem& getFs(IDBDataFile::Types type);
/**
* mkdir() creates a directory specified by pathname including any
* parent directories if needed.
* Returns 0 on success, -1 on error
*/
virtual int mkdir(const char *pathname) = 0;
/**
* mkdir() creates a directory specified by pathname including any
* parent directories if needed.
* Returns 0 on success, -1 on error
*/
virtual int mkdir(const char* pathname) = 0;
/**
* remove() removes a path from the filesystem. It will handle
* both files and directories (including non-empty directories). Note
* that a call to remove of a path that does not exist will return as
* success.
*
* Returns 0 on success, -1 on error
*/
virtual int remove(const char *pathname) = 0;
/**
* remove() removes a path from the filesystem. It will handle
* both files and directories (including non-empty directories). Note
* that a call to remove of a path that does not exist will return as
* success.
*
* Returns 0 on success, -1 on error
*/
virtual int remove(const char* pathname) = 0;
/**
* rename() names a file, moving it between directories if required.
* Returns 0 on success, -1 on error
*/
virtual int rename(const char *oldpath, const char *newpath) = 0;
/**
* rename() names a file, moving it between directories if required.
* Returns 0 on success, -1 on error
*/
virtual int rename(const char* oldpath, const char* newpath) = 0;
/**
* size() returns the size of the file specified by path.
* Returns the size on success, -1 on error
*/
virtual off64_t size(const char* path) const = 0;
/**
* size() returns the size of the file specified by path.
* Returns the size on success, -1 on error
*/
virtual off64_t size(const char* path) const = 0;
/**
* compressedSize() returns the decompressed size of the file
@@ -91,45 +91,48 @@ public:
*/
virtual off64_t compressedSize(const char* path) const = 0;
/**
* exists() checks for the existence of a particular path.
* Returns true if exists, false otherwise.
*/
virtual bool exists(const char* pathname) const = 0;
/**
* exists() checks for the existence of a particular path.
* Returns true if exists, false otherwise.
*/
virtual bool exists(const char* pathname) const = 0;
/**
* listDirectory() returns the contents of the directory as a
* list of strings. For now, no indication of whether each
* item is a file or directory - both files and subdirectories
* will be returned.
* Returns 0 on success. -1 on error (incl if directory does
* not exist.
*/
/**
* listDirectory() returns the contents of the directory as a
* list of strings. For now, no indication of whether each
* item is a file or directory - both files and subdirectories
* will be returned.
* Returns 0 on success. -1 on error (incl if directory does
* not exist.
*/
virtual int listDirectory(const char* pathname, std::list<std::string>& contents) const = 0;
virtual int listDirectory(const char* pathname, std::list<std::string>& contents) const = 0;
/**
* isDir() returns whether or not the path is a directory
*/
virtual bool isDir(const char* pathname) const = 0;
/**
* isDir() returns whether or not the path is a directory
*/
virtual bool isDir(const char* pathname) const = 0;
/**
* copyfile() copies the source file to the destination file
* Returns 0 on success. -1 on error.
*/
virtual int copyFile(const char* srcPath, const char* destPath) const = 0;
/**
* copyfile() copies the source file to the destination file
* Returns 0 on success. -1 on error.
*/
virtual int copyFile(const char* srcPath, const char* destPath) const = 0;
/**
* isFsUp() checks if the filesystem is up
* Returns 0 on success. -1 on error.
*/
virtual bool filesystemIsUp() const { return true; }
/**
* isFsUp() checks if the filesystem is up
* Returns 0 on success. -1 on error.
*/
virtual bool filesystemIsUp() const
{
return true;
}
protected:
IDBFileSystem( Types type );
IDBFileSystem( Types type );
private:
Types m_type;
Types m_type;
};
/**
@@ -139,7 +142,7 @@ private:
inline
IDBFileSystem& IDBFileSystem::getFs(IDBDataFile::Types type)
{
return IDBFactory::getFs(type);
return IDBFactory::getFs(type);
}
}