2 * Copyright (c) 2000 - 2014 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> {
35 std::string operator()() {
39 template <typename... Args>
40 std::string operator()(const Args&...){
46 class StringifyBasic<true> {
47 void concatenate(std::ostringstream&) {}
49 template <typename t, typename... Args>
50 void concatenate(std::ostringstream& stream, const t& arg1, const Args&... args) {
52 concatenate(stream, args...);
55 std::string operator()() {
59 template <typename T, typename... Args>
60 std::string operator()(const T& arg1, const Args&... args){
61 std::ostringstream stream;
62 concatenate(stream, arg1, args...);
68 #define DEBUG_STATUS true
70 #define DEBUG_STATUS false
73 typedef StringifyBasic<true> Stringify;
74 typedef StringifyBasic<false> StringifyAvoid;
75 typedef StringifyBasic<true> StringifyError;
76 typedef StringifyBasic<DEBUG_STATUS> StringifyDebug;