1 /** 2 * Copyright: Copyright (c) 2010-2011 Jacob Carlborg. All rights reserved. 3 * Authors: Jacob Carlborg 4 * Version: Initial created: Aug 15, 2010 5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) 6 */ 7 module dvm.util.Util; 8 9 import mambo.core.io; 10 import mambo.util.Use; 11 12 import dvm.dvm.Options; 13 14 Use!(void delegate (), bool) unless (bool value) 15 { 16 Use!(void delegate (), bool) use; 17 18 use.args[0] = (void delegate () dg, bool value) { 19 if (value == false) 20 dg(); 21 }; 22 23 use.args[1] = value; 24 25 return use; 26 } 27 28 void verbose (ARGS...) (ARGS args) 29 { 30 if (Options.instance.verbose) 31 println(args); 32 } 33 34 void verboseRaw (ARGS...) (ARGS args) 35 { 36 if (Options.instance.verbose) 37 print(args); 38 }