//****************************************************************************** // Copyright (c) 2003. All rights reserved. // Developed by Jarl Lindrud. // Contact: jlindrud@hotmail.com . //****************************************************************************** #ifndef INCLUDE_UTIL_TRACECOMMANDLINEOPTION_HPP #define INCLUDE_UTIL_TRACECOMMANDLINEOPTION_HPP #include "CommandLine.hpp" #include "InitDeinit.hpp" #include "Trace.hpp" namespace util { // TraceCommandLineOption class TraceCommandLineOption : public CommandLineOption { public: TraceCommandLineOption() : CommandLineOption("trace", "", "-trace ,") {} void on_notify_end() { // Go through values, making calls to util::Trace::setTraceChannel() const std::vector &values = getValues(); for (unsigned int i=0; i names = TraceManager::getSingleton().getTraceChannelNames(); for (unsigned int i=0; i { public: TraceChannelsCommandLineOption() : CommandLineOption("tracechannels", false, "dump names and targets for all trace channels") {} void on_notify_end() { if (CommandLineOption::get() == true) { std::vector names = TraceManager::getSingleton().getTraceChannelNames(); for (unsigned int i=0; i " << traceTargetName << "\n"; } exit(0); } } }; UTIL_ON_INIT_NAMED( TraceManager::getSingleton(); static TraceChannelsCommandLineOption traceChannelsCommandLineOption, TraceInitialize2 ) UTIL_ON_INIT_NAMED( TraceManager::getSingleton(); static TraceCommandLineOption traceCommandLineOption, TraceInitialize3 ) } // namespace util #endif // ! INCLUDE_UTIL_TRACECOMMANDLINEOPTION_HPP