Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/*
   Copyright (c) 2018 DIVIDE-Studio
   Copyright (c) 2009 Ionut Cava

   This file is part of DIVIDE Framework.

   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.

 */

#ifndef _CORE_CONSOLE_INL_
#define _CORE_CONSOLE_INL_

namespace Divide {
template <typename... Args>
void Console::d_printfn(const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        printfn(format, std::forward<Args>(args)...);
    }
}

template <typename... Args>
void Console::d_printf(const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        printf(format, std::forward<Args>(args)...);
    }
}

template <typename... T>
void Console::d_warnfn(const char* format, T&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        warnfn(format, std::forward<Args>(args)...);
    }
}

template <typename... T>
void Console::d_warnf(const char* format, T&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        warnf(format, std::forward<Args>(args)...);
    }
}

template <typename... Args>
void Console::d_errorfn(const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        errorfn(format, std::forward<Args>(args)...);
    }
}

template <typename... Args>
void Console::d_errorf(const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        errorf(format, std::forward<Args>(args)...);
    }
}

template <typename... Args>
void Console::printfn(const char* format, Args&&... args) {
    output(formatText(format, std::forward<Args>(args)...), true, EntryType::Info);
}

template <typename... Args>
void Console::printf(const char* format, Args&&... args) {
    output(formatText(format, std::forward<Args>(args)...), false, EntryType::Info);
}


template <typename... T>
void Console::warnfn(const char* format, T&&... args) {
    output(formatText(format, std::forward<Args>(args)...), true, EntryType::Warning);
}

template <typename... T>
void Console::warnf(const char* format, T&&... args) {
    output(formatText(format, std::forward<Args>(args)...), false, EntryType::Warning);
}

template <typename... Args>
void Console::errorfn(const char* format, Args&&... args) {
    output(formatText(format, std::forward<Args>(args)...), true, EntryType::Error);
}

template <typename... Args>
void Console::errorf(const char* format, Args&&... args) {
    output(formatText(format, std::forward<Args>(args)...), false, EntryType::Error);
}

template <typename... Args>
void Console::printfn(std::ofstream& outStream, const char* format, Args&&... args) {
    output(outStream, formatText(format, std::forward<Args>(args)...), true, EntryType::Info);
}

template <typename... Args>
void Console::printf(std::ofstream& outStream, const char* format, Args&&... args) {
    output(outStream, formatText(format, std::forward<Args>(args)...), false, EntryType::Info);
}

template <typename... T>
void Console::warnfn(std::ofstream& outStream, const char* format, T&&... args) {
    output(outStream, formatText(format, std::forward<Args>(args)...), true, EntryType::Warning);
}

template <typename... T>
void Console::warnf(std::ofstream& outStream, const char* format, T&&... args) {
    output(outStream, formatText(format, std::forward<Args>(args)...), false, EntryType::Warning);
}

template <typename... Args>
void Console::errorfn(std::ofstream& outStream, const char* format, Args&&... args) {
    output(outStream, formatText(format, std::forward<Args>(args)...), true, EntryType::Error);
}

template <typename... Args>
void Console::errorf(std::ofstream& outStream, const char* format, Args&&... args) {
    output(outStream, formatText(format, std::forward<Args>(args)...), false, EntryType::Error);
}

template <typename... Args>
void Console::d_printfn(std::ofstream& outStream, const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        printfn(outStream, format, std::forward<Args>(args)...);
    }
}

template <typename... Args>
void Console::d_printf(std::ofstream& outStream, const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        printf(outStream, format, std::forward<Args>(args)...);
    }
}

template <typename... T>
void Console::d_warnfn(std::ofstream& outStream, const char* format, T&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        warnfn(outStream, format, std::forward<Args>(args)...);
    }
}

template <typename... T>
void Console::d_warnf(std::ofstream& outStream, const char* format, T&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        warnf(outStream, format, std::forward<Args>(args)...);
    }
}

template <typename... Args>
void Console::d_errorfn(std::ofstream& outStream, const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        errorfn(outStream, format, std::forward<Args>(args)...);
    }
}

template <typename... Args>
void Console::d_errorf(std::ofstream& outStream, const char* format, Args&&... args) {
    if (Config::Build::IS_DEBUG_BUILD) {
        errorf(outStream, format, std::forward<Args>(args)...);
    }
}
};

#endif  //_CORE_CONSOLE_INL_

Commits for Divide-Framework/trunk/Source Code/Core/Headers/Console.inl

Diff revisions: vs.
Revision Author Commited Message
1029 Diff Diff IonutCava picture IonutCava Tue 30 Jan, 2018 17:28:39 +0000

[Ionut]
- Update copyright notices

977 Diff Diff IonutCava picture IonutCava Mon 20 Nov, 2017 17:13:16 +0000

[Ionut]
- Add an “ApplicationOutput” class that the Editor uses to show console entries and parse commands
- Add “Warning” messages to console outputs

836 Diff Diff IonutCava picture IonutCava Fri 27 Jan, 2017 14:59:56 +0000

[IonutCava]
- Update copyright notice

760 Diff Diff IonutCava picture IonutCava Tue 09 Aug, 2016 16:30:12 +0000

[IonutCava]
- Complete rewrite of RenderPass system:
— Allow every rendering pass (reflection, environment, etc) to use the same rendering system: occlusion culling, light culling, etc
— Define render passes by a param based token similar to modern API systems (DX12/Vulkan)
— W.I.P.: Depth rendering slightly wrong; Environment Mapping ,reflection and refraction rendering currently disabled
- Add compile time variables for DEBUG/PROFILE/RELEASE builds to validate all code for every build

665 Diff Diff IonutCava picture IonutCava Thu 31 Mar, 2016 15:50:03 +0000

[IonutCava]
- Added proper multi-threaded logging support for the Console system using moodycamel::ConcurrentQueue (https://github.com/cameron314/concurrentqueue)

664 Diff Diff IonutCava picture IonutCava Wed 30 Mar, 2016 16:23:51 +0000

[IonutCava]
- Split some render bin loops into multiple tasks
- Cleaned up the Task class
- Attempt to improve Console multithreaded performance (does not compile yet)

658 Diff Diff IonutCava picture IonutCava Tue 15 Mar, 2016 21:51:58 +0000

[IonutCava]
- Unify variable argument string formatting (GUI now uses the Util::StringFormat method)
— Console does not use the general purpose formatting for performance reasons (uses internally statically allocated buffer instead)
- Re-enabled allocation tracking in debug builds
— Added (and enabled) option to log all memory allocations, not just leaks.
- Added a macro that returns the current function signature (on all platforms)
- Fixed minor 3 memory leaks

648 Diff Diff IonutCava picture IonutCava Sun 21 Feb, 2016 16:32:52 +0000

[IonutCava]
- Update copyright notice
- Move BoundingBox and BoundingSphere to a new BoundsComponent
— Add a temp hack in SceneGraphNode to update these

415 IonutCava picture IonutCava Wed 29 Apr, 2015 16:11:21 +0000

[Ionut]
- Modified Console class to allow custom file streams for output
- Modified WarScene to use a file stream per agent.
- Removed most of the AI code from WarScene and left only “Go to flag -> grab flag -> return to base -> score -> idle” code to debug GOAP issues