// Copyright 2018 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// dot -Tpng subprojects/docs/src/docs/userguide/img/visual-studio-task-graph.dot > subprojects/docs/src/docs/userguide/img/visual-studio-task-graph.png
digraph visualStudioTaskGraph {
  graph [ dpi = 100, fontname="Sans"];
  node [fontname = "Sans"];
  edge [fontname = "Sans"];
  node [shape=rectangle, fixedsize=true, width=3.3, height=0.5];
  node [style=filled, fillcolor="#cfe2f3"]
  rankdir=LR


  subgraph cluster_cppApplication {
    label = "C++ Application Plugin"
    color = black

    mainVisualStudio -> {nameVisualStudioProject, nameVisualStudioFilters}

    nameVisualStudioProject[label=<<i>projectName</i>VisualStudioProject>]
    nameVisualStudioFilters[label=<<i>projectName</i>VisualStudioFilters>]
    mainVisualStudio[label="mainVisualStudio"]
  }

  subgraph cluster_cppLibrary {
    label = "C++ Library Plugin"
    cppLibrary_mainVisualStudio[label="mainVisualStudio"]

    subgraph cluster_cppLibrarySharedLinkage {
      label = "Shared Linkage"
      style = dashed

      nameDllVisualStudioProject[label=<<i>projectName</i>DllVisualStudioProject>]
      nameDllVisualStudioFilters[label=<<i>projectName</i>DllVisualStudioFilters>]
    }
    cppLibrary_mainVisualStudio -> {nameDllVisualStudioProject, nameDllVisualStudioFilters}

    cppLibrary_mainVisualStudio -> text [style=invis]
    text[shape=plain, label="and/or"]

    subgraph cluster_cppLibraryStaticLinkage {
      label = "Static Linkage"
      style = dashed

      nameLibVisualStudioProject[label=<<i>projectName</i>LibVisualStudioProject>]
      nameLibVisualStudioFilters[label=<<i>projectName</i>LibVisualStudioFilters>]
    }
    cppLibrary_mainVisualStudio -> {nameLibVisualStudioProject, nameLibVisualStudioFilters}
  }

  {nameDllVisualStudioProject, nameDllVisualStudioFilters, nameLibVisualStudioProject, nameLibVisualStudioFilters} -> visualStudio [dir=back, style=dashed]
  {nameVisualStudioProject, nameVisualStudioFilters} -> visualStudio [dir=back, style=dashed]
  nameVisualStudioSolution -> visualStudio -> openVisualStudio [dir=back]

  nameVisualStudioSolution[label=<<i>projectName</i>VisualStudioSolution>]

  nameVisualStudioSolution -> cleanVisualStudio [style=invis]
  {rank=same nameVisualStudioSolution cleanVisualStudio}
}