output.h
Go to the documentation of this file.
1 
11 #ifndef _OUTPUT_H_
12 #define _OUTPUT_H_
13 
14 #include <stdio.h>
15 #include <stdarg.h>
16 
17 #include "../types/model.h"
18 #include "../types/solution.h"
19 #include "../types/string-type.h"
20 
26 char* SDEFAULT;
27 char* SBDEFAULT;
28 char* SBLACK;
29 char* SRED;
30 char* SGREEN;
31 char* SYELLOW;
32 char* SBLUE;
33 char* SPURPLE;
34 char* SCYAN;
35 char* SWHITE;
36 char* SBBLACK;
37 char* SBRED;
38 char* SBGREEN;
39 char* SBYELLOW;
40 char* SBBLUE;
41 char* SBPURPLE;
42 char* SBCYAN;
43 char* SBWHITE;
44 char* SUBLACK;
45 char* SURED;
46 char* SUGREEN;
47 char* SUYELLOW;
48 char* SUBLUE;
49 char* SUPURPLE;
50 char* SUCYAN;
51 char* SUWHITE;
52 char* SBUBLACK;
53 char* SBURED;
54 char* SBUGREEN;
55 char* SBUYELLOW;
56 char* SBUBLUE;
57 char* SBUPURPLE;
58 char* SBUCYAN;
59 char* SBUWHITE;
61 
63 #define LERROR 8
64 
69 #define L0 0
70 #define L1 1
71 #define L2 2
72 #define L3 3
73 #define L4 4
74 #define L5 5
75 #define L6 6
76 #define L7 7
77 
78 
85 void genOutput(Solution* sol, Model* mdl, int recur);
86 
93 void genObjectOutput(OutObject* oo, Model* m, int recur);
94 
102 char* cPrint(const char* fmt, ...);
103 
108 void setOutputImportance(unsigned int level);
109 
113 unsigned int getOutputImportance();
114 
122 void output(unsigned int level, const char* fmt, ...);
123 
130 unsigned int extractVerbosityFromArg(const char* verbosity);
131 
136 void enableColors(unsigned int enable);
137 
145 void printNChar(unsigned int level, char c, unsigned int n);
146 
147 #endif // _OUTPUT_H_
Contains all the attributes and relations that compose an OutObject.
Definition: out-object.h:17
void output(unsigned int level, const char *fmt,...)
Print the message in the standard output only if its importance is high enough to be printed...
Definition: output.c:193
void genOutput(Solution *sol, Model *mdl, int recur)
Returns a string that contains the representation of the object in a readable presentation.
Definition: output.c:48
char * cPrint(const char *fmt,...)
Returns a string that contains the formatted output by concatening all the arguments.
Definition: output.c:170
Contains the attributes and relations definitions found in the model file.
Definition: model.h:20
unsigned int getOutputImportance()
Gets the max level of the messages to output (0 : only critical messages, the higher the value...
Definition: output.c:189
void enableColors(unsigned int enable)
Enables or not the colors in the output.
Definition: output.c:219
void setOutputImportance(unsigned int level)
Sets the max level of the messages to output (0 : only critical messages, the higher the value...
Definition: output.c:185
void printNChar(unsigned int level, char c, unsigned int n)
Print a fixed number of time a character.
Definition: output.c:294
unsigned int extractVerbosityFromArg(const char *verbosity)
Extract the verbosity value from the "-v[v..]" formated string.
Definition: output.c:207
void genObjectOutput(OutObject *oo, Model *m, int recur)
Print an OutObject.
Definition: output.c:55
Contains all the possible solutions.
Definition: solution.h:18