2 * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
18 * @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
19 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
33 class StringifyBasic<false> {
34 StringifyBasic() = delete;
36 static std::string Merge() {
40 template <typename... Args>
41 static std::string Merge(const Args&...){
47 class StringifyBasic<true> {
48 StringifyBasic() = delete;
50 static void Concatenate(std::ostringstream&) {}
52 template <typename t, typename... Args>
53 static void Concatenate(std::ostringstream& stream, const t& arg1, const Args&... args) {
55 Concatenate(stream, args...);
58 static std::string Merge() {
62 template <typename T, typename... Args>
63 static std::string Merge(const T& arg1, const Args&... args) {
64 std::ostringstream stream;
65 Concatenate(stream, arg1, args...);
71 #define DEBUG_STATUS true
73 #define DEBUG_STATUS false
76 typedef StringifyBasic<true> Stringify;
77 typedef StringifyBasic<false> StringifyAvoid;
78 typedef StringifyBasic<true> StringifyError;
79 typedef StringifyBasic<DEBUG_STATUS> StringifyDebug;