summaryrefslogtreecommitdiffstats
path: root/Source/cmState.h
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmState.h
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/cmState.h')
-rw-r--r--Source/cmState.h83
1 files changed, 47 insertions, 36 deletions
diff --git a/Source/cmState.h b/Source/cmState.h
index 705c1a8..7ecac56 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -33,6 +33,7 @@ class cmState
struct BuildsystemDirectoryStateType;
typedef cmLinkedTree<SnapshotDataType>::iterator PositionType;
friend class Snapshot;
+
public:
cmState();
~cmState();
@@ -51,7 +52,8 @@ public:
class Directory;
- class Snapshot {
+ class Snapshot
+ {
public:
Snapshot(cmState* state = 0);
Snapshot(cmState* state, PositionType position);
@@ -120,16 +122,15 @@ public:
{
Directory(cmLinkedTree<BuildsystemDirectoryStateType>::iterator iter,
Snapshot const& snapshot);
+
public:
const char* GetCurrentSource() const;
void SetCurrentSource(std::string const& dir);
const char* GetCurrentBinary() const;
void SetCurrentBinary(std::string const& dir);
- std::vector<std::string> const&
- GetCurrentSourceComponents() const;
- std::vector<std::string> const&
- GetCurrentBinaryComponents() const;
+ std::vector<std::string> const& GetCurrentSourceComponents() const;
+ std::vector<std::string> const& GetCurrentBinaryComponents() const;
const char* GetRelativePathTopSource() const;
const char* GetRelativePathTopBinary() const;
@@ -157,17 +158,17 @@ public:
cmStringRange GetCompileOptionsEntries() const;
cmBacktraceRange GetCompileOptionsEntryBacktraces() const;
void AppendCompileOptionsEntry(std::string const& vec,
- cmListFileBacktrace const& lfbt);
+ cmListFileBacktrace const& lfbt);
void SetCompileOptions(std::string const& vec,
- cmListFileBacktrace const& lfbt);
+ cmListFileBacktrace const& lfbt);
void ClearCompileOptions();
- void SetProperty(const std::string& prop, const char *value,
+ void SetProperty(const std::string& prop, const char* value,
cmListFileBacktrace lfbt);
- void AppendProperty(const std::string& prop, const char *value,
+ void AppendProperty(const std::string& prop, const char* value,
bool asString, cmListFileBacktrace lfbt);
- const char *GetProperty(const std::string& prop) const;
- const char *GetProperty(const std::string& prop, bool chain) const;
+ const char* GetProperty(const std::string& prop) const;
+ const char* GetProperty(const std::string& prop, bool chain) const;
bool GetPropertyAsBool(const std::string& prop) const;
std::vector<std::string> GetPropertyKeys() const;
@@ -181,17 +182,23 @@ public:
friend class Snapshot;
};
- enum TargetType { EXECUTABLE, STATIC_LIBRARY,
- SHARED_LIBRARY, MODULE_LIBRARY,
- OBJECT_LIBRARY, UTILITY, GLOBAL_TARGET,
- INTERFACE_LIBRARY,
- UNKNOWN_LIBRARY};
+ enum TargetType
+ {
+ EXECUTABLE,
+ STATIC_LIBRARY,
+ SHARED_LIBRARY,
+ MODULE_LIBRARY,
+ OBJECT_LIBRARY,
+ UTILITY,
+ GLOBAL_TARGET,
+ INTERFACE_LIBRARY,
+ UNKNOWN_LIBRARY
+ };
static const char* GetTargetTypeName(cmState::TargetType targetType);
Snapshot CreateBaseSnapshot();
- Snapshot
- CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot);
+ Snapshot CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot);
Snapshot CreateFunctionCallSnapshot(Snapshot originSnapshot,
std::string const& fileName);
Snapshot CreateMacroCallSnapshot(Snapshot originSnapshot,
@@ -204,8 +211,16 @@ public:
Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot);
Snapshot Pop(Snapshot originSnapshot);
- enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC,
- UNINITIALIZED };
+ enum CacheEntryType
+ {
+ BOOL = 0,
+ PATH,
+ FILEPATH,
+ STRING,
+ INTERNAL,
+ STATIC,
+ UNINITIALIZED
+ };
static CacheEntryType StringToCacheEntryType(const char*);
static const char* CacheEntryTypeToString(CacheEntryType);
static bool IsCacheEntryType(std::string const& key);
@@ -214,7 +229,7 @@ public:
std::set<std::string>& excludes,
std::set<std::string>& includes);
- bool SaveCache(const std::string& path) ;
+ bool SaveCache(const std::string& path);
bool DeleteCache(const std::string& path);
@@ -231,8 +246,7 @@ public:
std::string const& propertyName,
std::string const& value);
void SetCacheEntryBoolProperty(std::string const& key,
- std::string const& propertyName,
- bool value);
+ std::string const& propertyName, bool value);
const char* GetCacheEntryProperty(std::string const& key,
std::string const& propertyName);
bool GetCacheEntryPropertyAsBool(std::string const& key,
@@ -245,21 +259,18 @@ public:
std::string const& propertyName);
///! Break up a line like VAR:type="value" into var, type and value
- static bool ParseCacheEntry(const std::string& entry,
- std::string& var,
- std::string& value,
- CacheEntryType& type);
+ static bool ParseCacheEntry(const std::string& entry, std::string& var,
+ std::string& value, CacheEntryType& type);
Snapshot Reset();
// Define a property
void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
- const char *ShortDescription,
- const char *FullDescription,
- bool chain = false);
+ const char* ShortDescription,
+ const char* FullDescription, bool chain = false);
// get property definition
- cmPropertyDefinition const* GetPropertyDefinition
- (const std::string& name, cmProperty::ScopeType scope) const;
+ cmPropertyDefinition const* GetPropertyDefinition(
+ const std::string& name, cmProperty::ScopeType scope) const;
// Is a property defined?
bool IsPropertyDefined(const std::string& name,
@@ -283,10 +294,10 @@ public:
void RemoveUserDefinedCommands();
std::vector<std::string> GetCommandNames() const;
- void SetGlobalProperty(const std::string& prop, const char *value);
- void AppendGlobalProperty(const std::string& prop,
- const char *value,bool asString=false);
- const char *GetGlobalProperty(const std::string& prop);
+ void SetGlobalProperty(const std::string& prop, const char* value);
+ void AppendGlobalProperty(const std::string& prop, const char* value,
+ bool asString = false);
+ const char* GetGlobalProperty(const std::string& prop);
bool GetGlobalPropertyAsBool(const std::string& prop);
const char* GetSourceDirectory() const;