From bcbd05d7eb6e8a54e68a51a779ba6f8fe04cd3ec Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 1 Sep 2013 17:36:05 +0200 Subject: [PATCH] reorganise some boost::format usage using our util::_Fmt front-end helps to reduce the code size, since all usages rely on a single inclusion of boost::format including boost::format via header can cause quite some code bloat NOTE: partial solution, still some further includes to reorganise --- src/lib/hash-value.h | 2 ++ src/lib/meta/util.hpp | 2 +- src/lib/test/test-helper.cpp | 13 ++++++------- src/lib/time/time.cpp | 14 ++++++++++++++ src/lib/time/timevalue.hpp | 2 ++ src/proc/asset.cpp | 19 +++++++++++++------ src/proc/asset/meta/time-grid.cpp | 8 ++++---- tests/41asset.tests | 2 +- tests/core/proc/asset/asset-category-test.cpp | 6 +++--- tests/core/proc/asset/asset-diagnostics.hpp | 6 +++--- tests/core/proc/asset/basicpipetest.cpp | 4 +--- tests/core/proc/asset/deleteassettest.cpp | 2 -- tests/core/proc/asset/testasset.cpp | 6 +++--- tests/core/proc/asset/testasset.hpp | 12 +++++------- tests/core/proc/asset/testclipasset.hpp | 2 -- .../proc/control/command-argument-test.cpp | 6 +++--- tests/core/proc/control/command-use2-test.cpp | 7 +++---- tests/library/meta/config-flags-test.cpp | 7 ++++--- tests/library/meta/dummy-functions.hpp | 5 ----- .../meta/generator-combinations-test.cpp | 12 +++++------- tests/library/meta/generator-test.cpp | 7 ++++--- tests/library/meta/tuple-diagnostics.hpp | 9 ++++----- tests/library/meta/typelist-diagnostics.hpp | 16 +++++++--------- tests/library/singleton-subclass-test.cpp | 8 ++++---- tests/library/singleton-test.cpp | 6 +++--- tests/library/time/digxel-test.cpp | 4 ++-- .../plugin/test-cpp-plugin/example_plugin.cpp | 8 ++++---- 27 files changed, 101 insertions(+), 94 deletions(-) diff --git a/src/lib/hash-value.h b/src/lib/hash-value.h index 06fe86d18..57ea29d96 100644 --- a/src/lib/hash-value.h +++ b/src/lib/hash-value.h @@ -35,6 +35,8 @@ #ifndef LIB_HASH_VALUE_H #define LIB_HASH_VALUE_H +#include + /** * storage for a Lumiera unique ID, diff --git a/src/lib/meta/util.hpp b/src/lib/meta/util.hpp index 63ae2aa47..b8a61782e 100644 --- a/src/lib/meta/util.hpp +++ b/src/lib/meta/util.hpp @@ -72,7 +72,7 @@ namespace meta { /** detect possibility of a conversion to string. - * Naive implementation just trying a the direct conversion. + * Naive implementation just trying the direct conversion. * The embedded constant #value will be true in case this succeeds. * Might fail in more tricky situations (references, const, volatile) * @see string-util.hpp more elaborate solution including lexical_cast diff --git a/src/lib/test/test-helper.cpp b/src/lib/test/test-helper.cpp index 1d031b3b0..16c81ebf3 100644 --- a/src/lib/test/test-helper.cpp +++ b/src/lib/test/test-helper.cpp @@ -23,12 +23,11 @@ #include "lib/test/test-helper.hpp" #include "lib/test/testdummy.hpp" +#include "lib/format-string.hpp" -#include - -using boost::format; -using boost::str; +#include +using std::string; namespace lib { namespace test{ @@ -37,8 +36,8 @@ namespace test{ string showSizeof (size_t siz, const char* name) { - static format fmt ("sizeof( %s ) %|30t|= %3d"); - return str (fmt % (name? name:"?") % siz); + static util::_Fmt fmt ("sizeof( %s ) %|30t|= %3d"); + return string (fmt % (name? name:"?") % siz); } @@ -58,7 +57,7 @@ namespace test{ } - /** storage for testdummy flags */ + /** storage for test-dummy flags */ long Dummy::_local_checksum = 0; bool Dummy::_throw_in_ctor = false; diff --git a/src/lib/time/time.cpp b/src/lib/time/time.cpp index 48b0b31ec..73ca17180 100644 --- a/src/lib/time/time.cpp +++ b/src/lib/time/time.cpp @@ -56,12 +56,14 @@ extern "C" { #include #include #include +#include using std::string; using util::floordiv; using lib::time::FSecs; using lib::time::FrameRate; using boost::rational_cast; +using boost::lexical_cast; namespace error = lumiera::error; @@ -167,6 +169,18 @@ namespace time { } + /** visual framerate representation (for diagnostics) */ + FrameRate::operator string() const + { + return 1==denominator() ? lexical_cast (numerator())+"FPS" + : lexical_cast (numerator()) + + "/" + + lexical_cast (denominator()) + + "FPS"; + } + + + Offset operator* (boost::rational factor, Offset const& o) { diff --git a/src/lib/time/timevalue.hpp b/src/lib/time/timevalue.hpp index 3dc688d86..8dd36ad47 100644 --- a/src/lib/time/timevalue.hpp +++ b/src/lib/time/timevalue.hpp @@ -530,6 +530,8 @@ namespace time { /** duration of one frame */ Duration duration() const; + + operator std::string() const; }; diff --git a/src/proc/asset.cpp b/src/proc/asset.cpp index 8b8865c65..1b1ba2d58 100644 --- a/src/proc/asset.cpp +++ b/src/proc/asset.cpp @@ -24,23 +24,24 @@ #include "proc/asset.hpp" #include "proc/assetmanager.hpp" #include "proc/asset/asset-format.hpp" +#include "lib/format-string.hpp" #include "lib/util-foreach.hpp" #include "lib/util.hpp" -#include #include +#include using std::tr1::function; using std::tr1::placeholders::_1; using std::tr1::bind; -using boost::format; using util::contains; using util::removeall; using util::for_each; using util::and_all; using util::isnil; using util::cStr; +using util::_Fmt; namespace proc { @@ -77,15 +78,21 @@ namespace asset { Asset::Ident::operator string () const { - format id_tuple("(%2%:%3%.%1% v%4%)"); - return str (id_tuple % name % category % org % version); + return string (_Fmt("(%2%:%3%.%1% v%4%)") + % name + % category + % org + % version); } Asset::operator string () const { - format id_tuple("Asset(%2%:%3%.%1% v%4%)"); - return str (id_tuple % ident.name % ident.category % ident.org % ident.version); + return string (_Fmt("Asset(%2%:%3%.%1% v%4%)") + % ident.name + % ident.category + % ident.org + % ident.version); } diff --git a/src/proc/asset/meta/time-grid.cpp b/src/proc/asset/meta/time-grid.cpp index 4ef8cdfe0..62768fa4c 100644 --- a/src/proc/asset/meta/time-grid.cpp +++ b/src/proc/asset/meta/time-grid.cpp @@ -27,15 +27,15 @@ #include "lib/time/quantiser.hpp" #include "lib/time/timevalue.hpp" #include "lib/time/display.hpp" +#include "lib/format-string.hpp" #include "common/advice.hpp" #include "lib/util.hpp" -#include #include +using util::_Fmt; using util::cStr; using util::isnil; -using boost::format; using boost::str; using std::string; @@ -146,8 +146,8 @@ namespace meta { if (isnil (id_)) { - format gridIdFormat("grid(%f_%d)"); - id_ = str(gridIdFormat % fps_ % _raw(origin_)); + _Fmt gridIdFormat("grid(%f_%d)"); + id_ = string(gridIdFormat % fps_ % _raw(origin_)); } EntryID nameID (id_); diff --git a/tests/41asset.tests b/tests/41asset.tests index 2e1543413..d50b13c17 100644 --- a/tests/41asset.tests +++ b/tests/41asset.tests @@ -71,6 +71,6 @@ END TEST "Simple TimeGrid" TimeGridBasics_test < #include -using boost::format; +using util::_Fmt; using util::isnil; using std::string; using std::cout; @@ -68,7 +68,7 @@ namespace test { Category c3 (VIDEO,"bin1/subbin"); Category c4 (EFFECT,"some_kind"); - format fmt ("Category: %s"); + _Fmt fmt ("Category: %s"); cout << fmt % c1 << "\n"; cout << fmt % c2 << "\n"; diff --git a/tests/core/proc/asset/asset-diagnostics.hpp b/tests/core/proc/asset/asset-diagnostics.hpp index 36ff66a33..28174d415 100644 --- a/tests/core/proc/asset/asset-diagnostics.hpp +++ b/tests/core/proc/asset/asset-diagnostics.hpp @@ -34,18 +34,18 @@ #include "proc/assetmanager.hpp" +#include "lib/format-string.hpp" #include "lib/util-foreach.hpp" #include "lib/util.hpp" -#include #include #include using util::contains; using util::for_each; +using util::_Fmt; using std::tr1::placeholders::_1; using std::tr1::bind; -using boost::format; using std::string; using std::cout; @@ -60,7 +60,7 @@ namespace asset { cout << "Asset(NULL)\n"; else { - format fmt("%s %|50T.| id=%s adr=%p smart-ptr=%p use-count=%u"); + _Fmt fmt("%s %|50T.| id=%s adr=%p smart-ptr=%p use-count=%u"); cout << fmt % str(aa) % aa->getID() % aa.get() % &aa % (aa.use_count() - 1) << "\n"; } } diff --git a/tests/core/proc/asset/basicpipetest.cpp b/tests/core/proc/asset/basicpipetest.cpp index b8d8b6443..d35dfa781 100644 --- a/tests/core/proc/asset/basicpipetest.cpp +++ b/tests/core/proc/asset/basicpipetest.cpp @@ -33,10 +33,8 @@ #include "lib/query-util.hpp" #include "common/query.hpp" -#include #include -using boost::format; using util::contains; using util::isnil; using std::string; @@ -187,7 +185,7 @@ namespace test { aMang.remove (pattern2->getID()); CHECK ( aMang.known (thePatt->getID())); CHECK (!aMang.known (pattern2->getID())); - CHECK (!aMang.known (thePipe->getID())); // has been unlinked too, because dependant on pattern2 + CHECK (!aMang.known (thePipe->getID())); // has been unlinked too, because dependent on pattern2 CHECK (thePipe); PProcPatt pattern3 = thePipe->getProcPatt(); /////TODO: transition to P<> diff --git a/tests/core/proc/asset/deleteassettest.cpp b/tests/core/proc/asset/deleteassettest.cpp index 8b16d822f..89dddd42b 100644 --- a/tests/core/proc/asset/deleteassettest.cpp +++ b/tests/core/proc/asset/deleteassettest.cpp @@ -24,10 +24,8 @@ #include "lib/test/run.hpp" //#include "lib/util.hpp" -//#include #include -//using boost::format; using std::string; using std::cout; diff --git a/tests/core/proc/asset/testasset.cpp b/tests/core/proc/asset/testasset.cpp index 31aba2acf..a1d6e4fed 100644 --- a/tests/core/proc/asset/testasset.cpp +++ b/tests/core/proc/asset/testasset.cpp @@ -41,7 +41,7 @@ namespace test { Asset::Ident make_new_ident () { - return Asset::Ident ( str(format("TestAsset.%i") % counter) + return Asset::Ident ( string(_Fmt("TestAsset.%i") % counter) , Category (META) , "test" , counter++ @@ -50,8 +50,8 @@ namespace test { Asset::Ident make_new_ident (PAsset& ref) { - return Asset::Ident ( str(format("%s-TestAsset.%i") % ref->ident.name - % counter) + return Asset::Ident ( string(_Fmt("%s-TestAsset.%i") % ref->ident.name + % counter) , ref->ident.category , "test" , counter++ diff --git a/tests/core/proc/asset/testasset.hpp b/tests/core/proc/asset/testasset.hpp index 7de1006ab..188178bfd 100644 --- a/tests/core/proc/asset/testasset.hpp +++ b/tests/core/proc/asset/testasset.hpp @@ -26,23 +26,21 @@ #include "proc/asset.hpp" +#include "lib/format-string.hpp" -#include - -using std::tr1::shared_ptr; -using boost::format; -using std::string; namespace proc { namespace asset{ namespace test { + using util::_Fmt; + /** * Test(mock) asset subclass usable for hijacking a given * asset class (template parameter) and subsequently accessing - * internal facillities for writing unit tests. Prerequisite + * internal facilities for writing unit tests. Prerequisite * for using this template is that the used asset base class * has a (protected) ctor taking an Asset::Ident.... */ @@ -50,7 +48,7 @@ namespace test { class TestAsset : public A { TestAsset () ; - TestAsset (PAsset&); ///< declared dependant on the given Asset + TestAsset (PAsset&); ///< declared dependent on the given Asset static void deleter (TestAsset* aa) { delete aa; } diff --git a/tests/core/proc/asset/testclipasset.hpp b/tests/core/proc/asset/testclipasset.hpp index 31db981b4..05e971160 100644 --- a/tests/core/proc/asset/testclipasset.hpp +++ b/tests/core/proc/asset/testclipasset.hpp @@ -28,10 +28,8 @@ #include "lib/test/run.hpp" //#include "lib/util.hpp" -//#include #include -//using boost::format; using std::string; using std::cout; diff --git a/tests/core/proc/control/command-argument-test.cpp b/tests/core/proc/control/command-argument-test.cpp index 60315ad83..9d9efd0b7 100644 --- a/tests/core/proc/control/command-argument-test.cpp +++ b/tests/core/proc/control/command-argument-test.cpp @@ -27,22 +27,22 @@ #include "lib/scoped-ptrvect.hpp" #include "lib/time/diagnostics.hpp" #include "lib/meta/tuple.hpp" +#include "lib/format-string.hpp" #include "lib/util-foreach.hpp" #include "lib/util.hpp" -#include #include #include #include #include #include +using util::_Fmt; using util::isnil; using util::for_each; using lib::time::Time; using lib::time::TimeVar; using lib::time::TimeValue; -using boost::format; using std::string; using std::ostream; using std::ostringstream; @@ -128,7 +128,7 @@ namespace test { void doIt (Tracker time, Tracker str, int rand) { - static format fmt ("doIt( Time=%s \"%s\" rand=%2d )"); + static _Fmt fmt ("doIt( Time=%s \"%s\" rand=%2d )"); cout << "invoke operation..." << endl; protocol << fmt % *time % *str % rand; } diff --git a/tests/core/proc/control/command-use2-test.cpp b/tests/core/proc/control/command-use2-test.cpp index 3753359b1..32eb80edc 100644 --- a/tests/core/proc/control/command-use2-test.cpp +++ b/tests/core/proc/control/command-use2-test.cpp @@ -26,13 +26,13 @@ #include "proc/control/command.hpp" #include "proc/control/command-def.hpp" #include "proc/control/handling-pattern.hpp" +#include "lib/format-string.hpp" #include "lib/util.hpp" #include "proc/control/test-dummy-commands.hpp" #include #include -#include #include #include @@ -42,9 +42,8 @@ namespace control { namespace test { + using util::_Fmt; using std::string; - using boost::format; - using boost::str; using std::tr1::function; using std::tr1::bind; using std::tr1::ref; @@ -87,7 +86,7 @@ namespace test { string randomTxt() { - format fmt ("invoked( %2d )"); + _Fmt fmt ("invoked( %2d )"); randVal_ = rand() % 100; return str (fmt % randVal_); diff --git a/tests/library/meta/config-flags-test.cpp b/tests/library/meta/config-flags-test.cpp index 9319a4e39..6b97e0dd8 100644 --- a/tests/library/meta/config-flags-test.cpp +++ b/tests/library/meta/config-flags-test.cpp @@ -39,6 +39,7 @@ #include "lib/test/run.hpp" #include "lib/meta/util.hpp" +#include "lib/format-string.hpp" #include "lib/meta/generator.hpp" #include "lib/meta/typelist-manip.hpp" #include "lib/meta/configflags.hpp" @@ -46,10 +47,10 @@ #include "proc/engine/nodewiring-config.hpp" #include "lib/util.hpp" -#include #include using ::test::Test; +using util::_Fmt; using std::string; using std::cout; using std::endl; @@ -244,8 +245,8 @@ cout << "__________________________\n" \ void visit (ulong code) { - result += str (format ("visit(code=%u) -->%s\n") - % code % Printer::print() ); + result += string (_Fmt ("visit(code=%u) -->%s\n") + % code % Printer::print() ); } }; diff --git a/tests/library/meta/dummy-functions.hpp b/tests/library/meta/dummy-functions.hpp index 37cf23fd9..2114ee6a9 100644 --- a/tests/library/meta/dummy-functions.hpp +++ b/tests/library/meta/dummy-functions.hpp @@ -25,11 +25,6 @@ #define LIB_META_DUMMY_FUNCTIONS_H -//#include -//#include - -//using std::string; -//using boost::format; namespace lib { diff --git a/tests/library/meta/generator-combinations-test.cpp b/tests/library/meta/generator-combinations-test.cpp index 6a5bbba88..8adc063f5 100644 --- a/tests/library/meta/generator-combinations-test.cpp +++ b/tests/library/meta/generator-combinations-test.cpp @@ -25,8 +25,8 @@ #include "lib/meta/generator.hpp" #include "lib/meta/generator-combinations.hpp" #include "meta/typelist-diagnostics.hpp" +#include "lib/format-string.hpp" -#include #include using ::test::Test; @@ -52,9 +52,7 @@ namespace test { > Types2; - using boost::str; - using boost::format; - format formatted ("-<%u%u>%s"); + util::_Fmt formatted ("-<%u%u>%s"); /** * A Test-Template to be instantiated @@ -70,9 +68,9 @@ namespace test { { T1 param1; T2 param2; - return str(formatted % uint(param1) - % uint(param2) - % BASE::visitAll()); + return string(formatted % uint(param1) + % uint(param2) + % BASE::visitAll()); } }; diff --git a/tests/library/meta/generator-test.cpp b/tests/library/meta/generator-test.cpp index 9e1583ed2..96646c46e 100644 --- a/tests/library/meta/generator-test.cpp +++ b/tests/library/meta/generator-test.cpp @@ -38,10 +38,11 @@ #include "lib/test/run.hpp" +#include "lib/format-string.hpp" #include "lib/meta/generator.hpp" -#include #include +#include using std::string; using std::cout; @@ -60,10 +61,10 @@ namespace test { }; - boost::format fmt ("Block<%2i>"); + util::_Fmt fmt ("Block<%2i>"); template - string Block::name = str (fmt % I); + string Block::name = string (fmt % I); diff --git a/tests/library/meta/tuple-diagnostics.hpp b/tests/library/meta/tuple-diagnostics.hpp index d78eb1ae7..c541a96bf 100644 --- a/tests/library/meta/tuple-diagnostics.hpp +++ b/tests/library/meta/tuple-diagnostics.hpp @@ -37,6 +37,7 @@ #include "meta/typelist-diagnostics.hpp" +#include "lib/format-string.hpp" #include "lib/meta/tuple.hpp" #include @@ -45,8 +46,6 @@ #include using std::string; -using boost::str; -using boost::format; using boost::enable_if; using boost::lexical_cast; using util::unConst; @@ -65,10 +64,10 @@ namespace test { string showTupElement(Num o) { - static format constElm("(%i)"); - static format changedElm("{%i}"); + static util::_Fmt constElm("(%i)"); + static util::_Fmt changedElm("{%i}"); - return str ( (o.o_==i? constElm:changedElm) % int(o.o_)); + return string( (o.o_==i? constElm:changedElm) % int(o.o_)); } string diff --git a/tests/library/meta/typelist-diagnostics.hpp b/tests/library/meta/typelist-diagnostics.hpp index d55a84fe2..dbfe639b2 100644 --- a/tests/library/meta/typelist-diagnostics.hpp +++ b/tests/library/meta/typelist-diagnostics.hpp @@ -41,15 +41,14 @@ #include "lib/meta/typelist.hpp" #include "lib/meta/generator.hpp" +#include "lib/format-string.hpp" #include "lib/meta/util.hpp" #include -#include - +#include using std::string; -using boost::format; using boost::enable_if; @@ -101,9 +100,8 @@ namespace meta { namespace test { // unit tests covering typelist manipulating templates namespace { // hidden internals for diagnostics.... - using boost::format; - format fmt ("-<%u>%s"); + util::_Fmt fmt ("-<%u>%s"); struct NullP { @@ -120,28 +118,28 @@ namespace meta { struct Printer : BASE { - static string print () { return str( fmt % "·" % BASE::print()); } + static string print () { return string( fmt % "·" % BASE::print()); } }; template struct Printer, BASE> ///< display the presence of a Num instance in the typelist : BASE { - static string print () { return str( fmt % uint(Num::VAL) % BASE::print()); } + static string print () { return string( fmt % uint(Num::VAL) % BASE::print()); } }; template struct Printer, BASE> ///< display the presence of a Flag in the typelist : BASE { - static string print () { return str( fmt % uint(Fl) % BASE::print()); } + static string print () { return string( fmt % uint(Fl) % BASE::print()); } }; template struct Printer ///< display the presence of a plain int in the typelist : BASE { - static string print () { return str( fmt % 'i' % BASE::print()); } + static string print () { return string( fmt % 'i' % BASE::print()); } }; diff --git a/tests/library/singleton-subclass-test.cpp b/tests/library/singleton-subclass-test.cpp index 054883f71..5b7a10fae 100644 --- a/tests/library/singleton-subclass-test.cpp +++ b/tests/library/singleton-subclass-test.cpp @@ -23,17 +23,17 @@ #include "lib/test/run.hpp" #include "lib/test/test-helper.hpp" +#include "lib/format-string.hpp" #include "lib/util.hpp" #include "testtargetobj.hpp" #include "lib/singleton-subclass.hpp" #include -#include #include using boost::lexical_cast; -using boost::format; +using util::_Fmt; using util::isnil; using std::string; using std::cout; @@ -99,7 +99,7 @@ namespace test{ { uint num= isnil(arg)? 1 : lexical_cast(arg[1]); - cout << format("using the Singleton should create TargetObj(%d)...\n") % num; + cout << _Fmt("using the Singleton should create TargetObj(%d)...\n") % num; Interface::setCountParam(num); @@ -107,7 +107,7 @@ namespace test{ singleton::UseSubclass typeinfo; // define an instance of the Singleton factory, - // Specialised to create the concrete Type passed in + // specialised to create the concrete Type passed in SingletonSubclassFactory instance (typeinfo); // Now use the Singleton factory... diff --git a/tests/library/singleton-test.cpp b/tests/library/singleton-test.cpp index 028881865..f5073c13d 100644 --- a/tests/library/singleton-test.cpp +++ b/tests/library/singleton-test.cpp @@ -22,6 +22,7 @@ #include "lib/test/run.hpp" +#include "lib/format-string.hpp" #include "lib/util.hpp" #include "testtargetobj.hpp" @@ -29,12 +30,11 @@ #include #include -#include #include using std::tr1::function; using boost::lexical_cast; -using boost::format; +using util::_Fmt; using util::isnil; using std::string; using std::cout; @@ -115,7 +115,7 @@ namespace test{ void useInstance (uint num, string kind) { - cout << format("testing TargetObj(%d) as Singleton(%s)\n") % num % kind; + cout << _Fmt("testing TargetObj(%d) as Singleton(%s)\n") % num % kind; TargetObj::setCountParam(num); TargetObj& t1 = instance(); TargetObj& t2 = instance(); diff --git a/tests/library/time/digxel-test.cpp b/tests/library/time/digxel-test.cpp index 809558352..7f610ae6b 100644 --- a/tests/library/time/digxel-test.cpp +++ b/tests/library/time/digxel-test.cpp @@ -22,6 +22,7 @@ #include "lib/test/run.hpp" +#include "lib/format-string.hpp" #include "lib/test/test-helper.hpp" #include "lib/time/display.hpp" #include "lib/time/digxel.hpp" @@ -30,7 +31,6 @@ #include #include #include -#include using lumiera::error::LUMIERA_ERROR_ASSERTION; using util::isSameObject; @@ -347,7 +347,7 @@ namespace test{ digi = 1; clock_t start(0), stop(0); - boost::format resultDisplay("timings(%s)%|36T.|%4.0fns\n"); + util::_Fmt resultDisplay("timings(%s)%|36T.|%4.0fns\n"); #define START_TIMINGS start=clock(); #define DISPLAY_TIMINGS(ID)\ diff --git a/tests/plugin/test-cpp-plugin/example_plugin.cpp b/tests/plugin/test-cpp-plugin/example_plugin.cpp index 2a0f9be62..d55f5c960 100644 --- a/tests/plugin/test-cpp-plugin/example_plugin.cpp +++ b/tests/plugin/test-cpp-plugin/example_plugin.cpp @@ -22,11 +22,10 @@ * *****************************************************/ -#include -#include #include "common/interfacedescriptor.h" #include "common/config_interface.h" +#include "lib/format-string.hpp" extern "C" { #include "common/interface.h" @@ -35,7 +34,8 @@ extern "C" { #include "interface/say_hello.h" } -using boost::format; +#include + using std::cout; using std::endl; @@ -47,7 +47,7 @@ class ExamplePlugin static LumieraInterface myopen (LumieraInterface self, LumieraInterface interfaces) { - static format fmt("opened %x global interfaces %x"); + static util::_Fmt fmt("opened %x global interfaces %x"); cout << fmt % self % interfaces << endl; return self; }