Commit 1205f75e authored by Stephen Kelly's avatar Stephen Kelly

cmState: Move nested struct into separate top-level namespace

Add a friend declaration to give the struct access to
cmState::PositionType.  This will be removed when that type is also
extracted.
parent 163991dd
Pipeline #31511 passed with stage
......@@ -35,7 +35,7 @@ struct cmState::SnapshotDataType
cmState::SnapshotType SnapshotType;
bool Keep;
cmLinkedTree<std::string>::iterator ExecutionListFile;
cmLinkedTree<cmState::BuildsystemDirectoryStateType>::iterator
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator
BuildSystemDirectory;
cmLinkedTree<cmDefinitions>::iterator Vars;
cmLinkedTree<cmDefinitions>::iterator Root;
......@@ -66,7 +66,7 @@ struct cmState::PolicyStackEntry : public cmPolicies::PolicyMap
bool Weak;
};
struct cmState::BuildsystemDirectoryStateType
struct cmStateDetail::BuildsystemDirectoryStateType
{
cmState::PositionType DirectoryEnd;
......@@ -313,7 +313,7 @@ cmState::Snapshot cmState::Reset()
this->ExecutionListFiles.Truncate();
{
cmLinkedTree<BuildsystemDirectoryStateType>::iterator it =
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator it =
this->BuildsystemDirectory.Truncate();
it->IncludeDirectories.clear();
it->IncludeDirectoryBacktraces.clear();
......@@ -1119,7 +1119,7 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy(
return status;
}
cmLinkedTree<BuildsystemDirectoryStateType>::iterator dir =
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator dir =
this->Position->BuildSystemDirectory;
while (true) {
......@@ -1366,7 +1366,7 @@ void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand()
}
cmState::Directory::Directory(
cmLinkedTree<BuildsystemDirectoryStateType>::iterator iter,
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator iter,
const cmState::Snapshot& snapshot)
: DirectoryState(iter)
, Snapshot_(snapshot)
......
......@@ -23,13 +23,17 @@ class cmCommand;
class cmListFileBacktrace;
class cmPropertyDefinition;
namespace cmStateDetail {
struct BuildsystemDirectoryStateType;
}
class cmState
{
struct SnapshotDataType;
struct PolicyStackEntry;
struct BuildsystemDirectoryStateType;
typedef cmLinkedTree<SnapshotDataType>::iterator PositionType;
friend class Snapshot;
friend struct cmStateDetail::BuildsystemDirectoryStateType;
public:
cmState();
......@@ -117,7 +121,8 @@ public:
class Directory
{
Directory(cmLinkedTree<BuildsystemDirectoryStateType>::iterator iter,
Directory(cmLinkedTree<
cmStateDetail::BuildsystemDirectoryStateType>::iterator iter,
Snapshot const& snapshot);
public:
......@@ -173,7 +178,8 @@ public:
void ComputeRelativePathTopBinary();
private:
cmLinkedTree<BuildsystemDirectoryStateType>::iterator DirectoryState;
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator
DirectoryState;
Snapshot Snapshot_;
friend class Snapshot;
};
......@@ -329,7 +335,8 @@ private:
cmPropertyMap GlobalProperties;
cmCacheManager* CacheManager;
cmLinkedTree<BuildsystemDirectoryStateType> BuildsystemDirectory;
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>
BuildsystemDirectory;
cmLinkedTree<std::string> ExecutionListFiles;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment