Adaptagrams
logging.h
1 /*
2  * vim: ts=4 sw=4 et tw=0 wm=0
3  *
4  * libdialect - A library for computing DiAlEcT layouts:
5  * D = Decompose/Distribute
6  * A = Arrange
7  * E = Expand/Emend
8  * T = Transform
9  *
10  * Copyright (C) 2018 Monash University
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  * See the file LICENSE.LGPL distributed with the library.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21  *
22  * Author(s): Steve Kieffer <http://skieffer.info>
23 */
24 
25 #ifndef DIALECT_LOGGING_H
26 #define DIALECT_LOGGING_H
27 
28 #include <string>
29 #include <vector>
30 
31 #include "libdialect/commontypes.h"
32 
33 namespace dialect {
34 
35 struct Logger {
36  std::string outputDir = "";
37  std::string prefix = "";
38  std::vector<std::string> contents;
39  std::vector<std::string> names;
40  bool hasOutputDir = false;
41  bool hasPrefix = false;
43  bool verbose = false;
44 
48  unsigned nextLoggingIndex = 0;
49 
57  Logger(std::string outputDir = "", std::string prefix = "", bool verbose = false);
58 
62  void log(std::string content, std::string name="");
63 
68  void log(Graph &G, std::string name="");
69 
73  std::string writeFullPathForFilename(std::string name);
74 
75 };
76 
77 
78 } // namespace dialect
79 
80 #endif // DIALECT_LOGGING_H
libdialect: A library for computing human-like orthogonal network (DiAlEcT) layouts.
Definition: cola.h:44