diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 7f929cce..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Bartek Kryza - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index d2530451..b2ff574d 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,40 @@ -# clang-uml - Clang based UML generator +# clang-uml - UML diagram generator based on Clang and PlantUML +clang-uml is an automatic PlantUML class and sequence diagram generator, driven by +YAML configuration files. The main idea behind the project is to easily +maintain up-to-date diagrams within a code-base. The configuration file or +files for clang-uml define the type and scope of each diagram. -### Compiling, installing and running your code -To compile the project, run the following in the project root: -``` - mkdir build - cd build - cmake .. - make -``` -To install the project in `/usr/local/`, run the following in the `build/` -directory created above: -``` - make install -``` -To run unit tests via CTest, again run the following in the `build/` directory: -``` - make test -``` -or -``` - ctest +## Installation + +TODO + +## Usage + +## Building + +### Ubuntu +To build under Ubuntu follow the following steps: +```bash + sudo apt-get install cmake build-essential libyaml-cpp-dev libspdlog-dev libclang-11-dev libclang-cpp11-dev + git clone https://github.com/bkryza/clang-uml + cd clang-uml + make release # or make debug for debug builds ``` +## LICENSE + + Copyright 2021-present Bartek Kryza + + 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. + diff --git a/src/config/config.cc b/src/config/config.cc index c91d4e69..e00faef8 100644 --- a/src/config/config.cc +++ b/src/config/config.cc @@ -1,3 +1,20 @@ +/** + * src/config/config.cc + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #include "config.h" namespace clanguml { diff --git a/src/config/config.h b/src/config/config.h index b6d21001..a6a45b38 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -1,3 +1,20 @@ +/** + * src/config/config.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include diff --git a/src/cx/compilation_database.cc b/src/cx/compilation_database.cc index 286a24bf..b9f06ec4 100644 --- a/src/cx/compilation_database.cc +++ b/src/cx/compilation_database.cc @@ -1,3 +1,20 @@ +/** + * src/cx/compilation_database.cc + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #include "compilation_database.h" #include diff --git a/src/cx/compilation_database.h b/src/cx/compilation_database.h index e8623857..cd320eef 100644 --- a/src/cx/compilation_database.h +++ b/src/cx/compilation_database.h @@ -1,3 +1,20 @@ +/** + * src/cx/compilation_database.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include diff --git a/src/cx/cursor.h b/src/cx/cursor.h index 21f116d3..0a10876e 100644 --- a/src/cx/cursor.h +++ b/src/cx/cursor.h @@ -1,3 +1,20 @@ +/** + * src/cx/cursor.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include "cx/type.h" diff --git a/src/cx/type.h b/src/cx/type.h index 9fc6bde2..60f9e2e8 100644 --- a/src/cx/type.h +++ b/src/cx/type.h @@ -1,3 +1,20 @@ +/** + * src/cx/type.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include diff --git a/src/main.cc b/src/main.cc index d9997770..62d33e05 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,3 +1,21 @@ +/** + * src/main.cc + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ + #include "config/config.h" #include "cx/compilation_database.h" #include "puml/class_diagram_generator.h" diff --git a/src/puml/class_diagram_generator.h b/src/puml/class_diagram_generator.h index 1d1fb4d3..c00c7e48 100644 --- a/src/puml/class_diagram_generator.h +++ b/src/puml/class_diagram_generator.h @@ -1,3 +1,20 @@ +/** + * src/puml/class_diagram_generator.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include "config/config.h" diff --git a/src/puml/sequence_diagram_generator.h b/src/puml/sequence_diagram_generator.h index deabd388..f44ee42e 100644 --- a/src/puml/sequence_diagram_generator.h +++ b/src/puml/sequence_diagram_generator.h @@ -1,3 +1,20 @@ +/** + * src/puml/sequence_diagram_generator.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include "config/config.h" diff --git a/src/uml/class_diagram_model.h b/src/uml/class_diagram_model.h index 479ecbbd..1c90fb12 100644 --- a/src/uml/class_diagram_model.h +++ b/src/uml/class_diagram_model.h @@ -1,3 +1,20 @@ +/** + * src/uml/class_diagram_model.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include diff --git a/src/uml/class_diagram_visitor.h b/src/uml/class_diagram_visitor.h index 2a6acc24..bb6f3a87 100644 --- a/src/uml/class_diagram_visitor.h +++ b/src/uml/class_diagram_visitor.h @@ -1,3 +1,20 @@ +/** + * src/uml/class_diagram_visitor.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include "class_diagram_model.h" diff --git a/src/uml/sequence_diagram_model.h b/src/uml/sequence_diagram_model.h index 0284baac..df9c7704 100644 --- a/src/uml/sequence_diagram_model.h +++ b/src/uml/sequence_diagram_model.h @@ -1,3 +1,20 @@ +/** + * src/uml/sequence_diagram_model.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include diff --git a/src/uml/sequence_diagram_visitor.h b/src/uml/sequence_diagram_visitor.h index eb3e4dc2..44f30140 100644 --- a/src/uml/sequence_diagram_visitor.h +++ b/src/uml/sequence_diagram_visitor.h @@ -1,3 +1,20 @@ +/** + * src/uml/sequence_diagram_visitor.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include "cx/cursor.h" diff --git a/src/util/util.h b/src/util/util.h index 0eaa3644..fe208a30 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -1,3 +1,20 @@ +/** + * src/util/util.h + * + * Copyright (c) 2021 Bartek Kryza + * + * 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. + */ #pragma once #include