Cleanup: indentation of public/protected/private keywords

This commit is contained in:
Twan van Laarhoven
2020-05-12 21:57:37 +02:00
parent 86aec577a2
commit 0c3712b61a
167 changed files with 751 additions and 752 deletions
+3 -3
View File
@@ -112,7 +112,7 @@ public:
template <typename K, typename V> void handle(const DelayedIndexMaps<K,V>&);
template <typename K, typename V> void handle(const DelayedIndexMapsData<K,V>&);
private:
private:
const String& target_name; ///< The name we are looking for
GetDefaultMember gdm; ///< Object to store and retrieve the value
};
@@ -148,7 +148,7 @@ public:
/// Handler to be used when reflecting enumerations for GetMember
class EnumGetMember {
public:
public:
inline EnumGetMember(GetDefaultMember& gdm)
: gdm(gdm) {}
@@ -160,7 +160,7 @@ class EnumGetMember {
}
}
private:
private:
GetDefaultMember& gdm; ///< The object to store output in
};
+9 -9
View File
@@ -81,7 +81,7 @@ private:
* TODO: maybe support sub packages (a package inside another package)?
*/
class Package : public IntrusivePtrVirtualBase {
public:
public:
// --------------------------------------------------- : Managing the outside of the package
/// Creates a new package
@@ -181,7 +181,7 @@ class Package : public IntrusivePtrVirtualBase {
writer.handle(obj);
}
protected:
protected:
// TODO: I dislike putting this here very much. There ought to be a better way.
virtual VCSP getVCS() { return make_intrusive<VCS>(); }
@@ -208,13 +208,13 @@ class Package : public IntrusivePtrVirtualBase {
/// Last modified time
DateTime modified;
public:
public:
/// Information on files in the package
typedef map<String, FileInfo> FileInfos;
inline const FileInfos& getFileInfos() const { return files; }
/// When was a file last modified?
DateTime modificationTime(const pair<String, FileInfo>& fi) const;
private:
private:
/// All files in the package
FileInfos files;
/// Filestream/zipstream for reading zip files
@@ -244,7 +244,7 @@ class Package : public IntrusivePtrVirtualBase {
/// Dependencies of a package
class PackageDependency : public IntrusivePtrBase<PackageDependency> {
public:
public:
String package; ///< Name of the package someone depends on
vector<String> suggests; ///< Packages suggested to fulfill this dependency
Version version; ///< Minimal required version of that package
@@ -256,7 +256,7 @@ class PackageDependency : public IntrusivePtrBase<PackageDependency> {
/** When the package is opened/saved a file describing the data object is read/written
*/
class Packaged : public Package {
public:
public:
Packaged();
virtual ~Packaged() {}
@@ -290,7 +290,7 @@ class Packaged : public Package {
return fully_loaded;
}
protected:
protected:
/// filename of the data file, and extension of the package file
virtual String typeName() const = 0;
/// Can be overloaded to do validation after loading
@@ -301,7 +301,7 @@ class Packaged : public Package {
DECLARE_REFLECTION_VIRTUAL();
friend void after_reading(Packaged& p, Version file_app_version);
private:
private:
bool fully_loaded; ///< Is the package fully loaded?
friend struct JustAsPackageProxy;
friend class Installer;
@@ -315,7 +315,7 @@ inline void after_reading(Packaged& p, Version file_app_version) {
/// A package that just contains a bunch of files that are used from other packages
class IncludePackage : public Packaged {
protected:
protected:
String typeName() const;
Version fileVersion() const;
DECLARE_REFLECTION();
+8 -8
View File
@@ -23,7 +23,7 @@ class PackageDependency;
/// Information on a package in a repository
class PackageVersionData : public IntrusivePtrVirtualBase {
public:
public:
PackageVersionData() {}
String name; ///< Name of the package
@@ -58,7 +58,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(UpdateData) {
/// A directory for packages
class PackageDirectory {
public:
public:
void init(bool local);
void init(const String& dir);
@@ -88,7 +88,7 @@ class PackageDirectory {
void loadDatabase();
void saveDatabase();
private:
private:
bool is_local;
String directory;
vector<PackageVersionP> packages; // sorted by name
@@ -107,7 +107,7 @@ class PackageDirectory {
* There is a single global instance of the PackageManager, called packages
*/
class PackageManager {
public:
public:
/// Initialize the package manager
void init();
/// Empty the list of packages.
@@ -176,7 +176,7 @@ class PackageManager {
// --------------------------------------------------- : Packages on a server
private:
private:
map<String, PackagedP> loaded_packages;
PackageDirectory local, global;
};
@@ -188,7 +188,7 @@ extern PackageManager package_manager;
/// Version information for an installed package
class PackageVersion : public IntrusivePtrBase<PackageVersion> {
public:
public:
PackageVersion() : status(0) {}
PackageVersion(int status) : status(status) {}
@@ -209,7 +209,7 @@ class PackageVersion : public IntrusivePtrBase<PackageVersion> {
/// Set blessed status to true
void bless();
public:
public:
/// Status of a single file
enum FileStatus
{ FILE_UNCHANGED
@@ -228,7 +228,7 @@ class PackageVersion : public IntrusivePtrBase<PackageVersion> {
FileStatus status;
inline bool operator < (const FileInfo& f) const { return file < f.file; }
};
private:
private:
vector<FileInfo> files; // sorted by filename
DECLARE_REFLECTION();
};
+2 -2
View File
@@ -123,7 +123,7 @@ void Reader::moveNext() {
* making startup slightly faster.
*/
template <typename T> class LocalVector {
public:
public:
LocalVector() : the_size(0), alloced(SMALL_SIZE), buffer(small) {}
~LocalVector() { if (buffer != small) free(buffer); }
void push_back(T t) {
@@ -141,7 +141,7 @@ template <typename T> class LocalVector {
}
inline const T* get() const { return buffer; }
inline size_t size() const { return the_size; }
private:
private:
static const int SMALL_SIZE = 1024;
size_t the_size, alloced;
T* buffer;
+3 -3
View File
@@ -28,7 +28,7 @@ class Packaged;
* object that was just read.
*/
class Reader {
public:
public:
/// Construct a reader that reads from the given input stream
/** filename is used only for error messages
* package is used for looking up included files.
@@ -273,7 +273,7 @@ void Reader::handle(IndexMap<K,V>& m) {
/// 'Handler' to be used when reflecting enumerations for Reader
class EnumReader {
public:
public:
inline EnumReader(String const& read)
: read(read), first(nullptr), done(false) {}
@@ -295,7 +295,7 @@ class EnumReader {
void warnIfNotDone(Reader* errors_to);
void errorIfNotDone();
private:
private:
String read; ///< The string to match to a value name
Char const* first; ///< Has the first (default) value been handled? If so, what is its name.
bool done; ///< Was anything matched?
+4 -4
View File
@@ -20,7 +20,7 @@ DECLARE_POINTER_TYPE(StyleSheet);
/// The Writer can be used for writing (serializing) objects
class Writer {
public:
public:
/// Construct a writer that writes to the given output stream
Writer(OutputStream& output, Version file_app_version);
@@ -69,7 +69,7 @@ class Writer {
void handle(const GameP&);
void handle(const StyleSheetP&);
private:
private:
// --------------------------------------------------- : Data
/// Indentation of the current block
int indentation;
@@ -147,7 +147,7 @@ void Writer::handle(const IndexMap<K,V>& m) {
/// Handler to be used when reflecting enumerations for Writer
class EnumWriter {
public:
public:
inline EnumWriter(Writer& writer)
: writer(writer) {}
@@ -159,7 +159,7 @@ class EnumWriter {
}
}
private:
private:
Writer& writer; ///< The writer to write output to
};