Changeset 298

Show
Ignore:
Timestamp:
03/23/05 08:06:58 (4 years ago)
Author:
athomas
Message:
  • Updated inline docs.
  • Added per-module help.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • todo2/trunk/autogen.sh

    r295 r298  
    11#!/bin/sh 
    22 
    3 echo libtoolize 
     3echo +aclocal 
     4aclocal 
     5echo +libtoolize 
    46libtoolize --force --ltdl --automake --copy 
    57#echo gettextize 
     
    79#echo intltoolize 
    810#intltoolize --force --copy 
    9 echo aclocal 
    10 aclocal 
    11 echo automake 
     11echo +automake 
    1212automake --add-missing --copy 
    13 echo autoconf 
     13echo +autoconf 
    1414autoconf 
    15 echo autoheader 
     15echo +autoheader 
    1616autoheader 
    1717 
    18 echo "Now you are ready to run ./configure" 
     18echo 
     19echo "Ready for ./configure to be run." 
  • todo2/trunk/doc

    • Property svn:ignore changed from
      Makefile.in
      to
      Makefile.in
      Makefile
      html
      man
  • todo2/trunk/src

    • Property svn:ignore changed from
      Makefile.in
      to
      Makefile.in
      config.h
      Makefile
      todo2
      stamp-h1
  • todo2/trunk/src/backend

    • Property svn:ignore changed from
      Makefile.in
      to
      Makefile.in
      Makefile
  • todo2/trunk/src/contactmethod

    • Property svn:ignore changed from
      Makefile.in
      to
      Makefile.in
      Makefile
  • todo2/trunk/src/filter

    • Property svn:ignore changed from
      Makefile.in
      to
      Makefile.in
      Makefile
  • todo2/trunk/src/filter/Expression.cc

    r297 r298  
    3737void Expression::args(crash::Args &args) { 
    3838        args.add('f', "filter", Args::REQUIRED, _("Pass the database through a C-like filter expression. Use ? for help. In addition, any non-option arguments are treated directly as filter rules."), "<filter>"); 
     39} 
     40 
     41std::string Expression::help() { 
     42        return _( 
     43        "Filter expressions are similar to C or Perl expressions.\n" 
     44        "\n" 
     45        "There are four types of valid values; strings, numbers (floating point), words\n" 
     46        "and environment variables. Words are merely bare words such as foo or bar and\n" 
     47        "environment variables are words prefixed with a $.\n" 
     48        "\n" 
     49        "  eg. $PATH || body\n" 
     50        "\n" 
     51        "Unary operators:\n" 
     52        "\n" 
     53        "  !,not     logical not\n" 
     54        "\n" 
     55        "Binary operators:\n" 
     56        "\n" 
     57        "  ||,or     logical or\n" 
     58        "  &&,and    logical and\n" 
     59        "  ==,=,eq   equal\n" 
     60        "  !=,ne     not equal\n" 
     61        "  <,lt      less than\n" 
     62        "  >,gt      greater than\n" 
     63        "  <=,le     less than or equal to\n" 
     64        "  >=,ge     greater than or equal to\n" 
     65        "  >=,ge     greater than or equal to\n" 
     66        "  =~        regular expression equal to\n" 
     67        "  !~        regular expression not equal to\n" 
     68        "  +         add the lhs and rhs\n" 
     69        "  -         subtract the rhs from the lhs\n" 
     70        "  *         multiply the lhs and rhs\n" 
     71        "  /         divide the lhs by the rhs\n" 
     72        "\n" 
     73        "Some standard values:\n" 
     74        "\n" 
     75        "  title     the title text (string)\n" 
     76        "  body      the body text (string)\n" 
     77        "  priority  the priority of the node (integer ranging from -2 to 3, with 0\n" 
     78        "            being the default/medium priority)\n" 
     79        "  completed whether this item is marked as complete\n" 
     80        "  active    whether this item is active (incomplete, and within its schedule\n" 
     81        "            window)\n" 
     82        "  children  the number of children of the current node (integer)\n" 
     83        "  index     the numeric index of the current node (integer)\n" 
     84        "  aindex    the absolute index for the current node (string in the form\n" 
     85        "            <n>.<m>.<o> ...)\n" 
     86        "  depth     the numeric depth of the current node (integer)\n" 
     87        "  true      boolean true\n" 
     88        "  false     boolean false\n" 
     89        "  active    is item active\n" 
     90        "  created   item creation time\n" 
     91        "  modified  item modification time\n" 
     92        "  owner     item owner\n" 
     93        "  type      item type\n" 
     94        "  now       current time\n" 
     95        "  lifetime  item lifetime\n" 
     96        "  username  current system username\n" 
     97        "  hostname  system hostname\n" 
     98        "\n" 
     99        "If a key is not present in the current node, it will be searched for under\n" 
     100        "the global configuration tree 'expression'.\n" 
     101        "\n" 
     102        "  eg. The value 'stuff' will be retrieved from the current item, but if not\n" 
     103        "      present, the global configuration key 'expression.stuff' will be tried.\n" 
     104        "\n" 
     105        "In addition, the expression filter also includes basic function support. Some\n" 
     106        "of these functions are:\n" 
     107        "\n" 
     108        "  assigned(userid)  true if the given userid is assigned to this item\n" 
     109        "  size(key)         the size of the specified key, in bytes\n" 
     110        "  categorised(catid) true if this item is in the specified category\n" 
     111        "  user(userid)      true if the given user exists\n" 
     112        "  category(catid)   true if the specified category exists\n" 
     113        "\n" 
     114        "Examples:\n" 
     115        "  priority > 2 && !completed\n" 
     116        "    Display nodes with a priority greater than 2 that are incomplete.\n" 
     117        "\n" 
     118        "  (priority > 1 && body =~ 'font.*large') || !completed\n" 
     119        "    Display nodes with either a priority greater than 2 and the word 'font'\n" 
     120        "    followed by 'large' in the body of the node, or nodes that are\n" 
     121        "    incomplete.\n" 
     122        "\n" 
     123        "Last but not least, any unhandled arguments passed to " PACKAGE " are treated\n" 
     124        "as a filter expression.\n" 
     125        "\n" 
     126        "  eg. $ " PACKAGE " not completed and now ge start and now le end\n" 
     127); 
    39128} 
    40129 
     
    51140        if (arg.option() == 'f') { 
    52141                if (arg.parameter() == "?") { 
    53                         // TODO: use frontend->message(...) to display help? 
    54                         manager.frontend()->message("filter:expression", _( 
    55 "Filter expressions are similar to C or Perl expressions.\n" 
    56 "\n" 
    57 "There are four types of valid values; strings, numbers (floating point), words\n" 
    58 "and environment variables. Words are merely bare words such as foo or bar and\n" 
    59 "environment variables are words prefixed with a $.\n" 
    60 "\n" 
    61 "  eg. $PATH || body\n" 
    62 "\n" 
    63 "Unary operators:\n" 
    64 "\n" 
    65 "  !,not     logical not\n" 
    66 "\n" 
    67 "Binary operators:\n" 
    68 "\n" 
    69 "  ||,or     logical or\n" 
    70 "  &&,and    logical and\n" 
    71 "  ==,=,eq   equal\n" 
    72 "  !=,ne     not equal\n" 
    73 "  <,lt      less than\n" 
    74 "  >,gt      greater than\n" 
    75 "  <=,le     less than or equal to\n" 
    76 "  >=,ge     greater than or equal to\n" 
    77 "  >=,ge     greater than or equal to\n" 
    78 "  =~        regular expression equal to\n" 
    79 "  !~        regular expression not equal to\n" 
    80 "  +         add the lhs and rhs\n" 
    81 "  -         subtract the rhs from the lhs\n" 
    82 "  *         multiply the lhs and rhs\n" 
    83 "  /         divide the lhs by the rhs\n" 
    84 "\n" 
    85 "Some standard values:\n" 
    86 "\n" 
    87 "  title     the title text (string)\n" 
    88 "  body      the body text (string)\n" 
    89 "  priority  the priority of the node (integer ranging from -2 to 3, with 0\n" 
    90 "            being the default/medium priority)\n" 
    91 "  completed whether this item is marked as complete\n" 
    92 "  active    whether this item is active (incomplete, and within its schedule\n" 
    93 "            window)\n" 
    94 "  children  the number of children of the current node (integer)\n" 
    95 "  index     the numeric index of the current node (integer)\n" 
    96 "  aindex    the absolute index for the current node (string in the form\n" 
    97 "            <n>.<m>.<o> ...)\n" 
    98 "  depth     the numeric depth of the current node (integer)\n" 
    99 "  true      boolean true\n" 
    100 "  false     boolean false\n" 
    101 "  active    is item active\n" 
    102 "  created   item creation time\n" 
    103 "  modified  item modification time\n" 
    104 "  owner     item owner\n" 
    105 "  type      item type\n" 
    106 "  now       current time\n" 
    107 "  lifetime  item lifetime\n" 
    108 "  username  current system username\n" 
    109 "  hostname  system hostname\n" 
    110 "\n" 
    111 "If a key is not present in the current node, it will be searched for under\n" 
    112 "the global configuration tree 'expression'.\n" 
    113 "\n" 
    114 "  eg. The value 'stuff' will be retrieved from the current item, but if not\n" 
    115 "      present, the global configuration key 'expression.stuff' will be tried.\n" 
    116 "\n" 
    117 "In addition, the expression filter also includes basic function support. Some\n" 
    118 "of these functions are:\n" 
    119 "\n" 
    120 "  assigned(userid)  true if the given userid is assigned to this item\n" 
    121 "  size(key)         the size of the specified key, in bytes\n" 
    122 "  categorised(catid) true if this item is in the specified category\n" 
    123 "  user(userid)      true if the given user exists\n" 
    124 "  category(catid)   true if the specified category exists\n" 
    125 "\n" 
    126 "Examples:\n" 
    127 "  priority > 2 && !completed\n" 
    128 "    Display nodes with a priority greater than 2 that are incomplete.\n" 
    129 "\n" 
    130 "  (priority > 1 && body =~ 'font.*large') || !completed\n" 
    131 "    Display nodes with either a priority greater than 2 and the word 'font'\n" 
    132 "    followed by 'large' in the body of the node, or nodes that are\n" 
    133 "    incomplete.\n" 
    134 "\n" 
    135 "Last but not least, any unhandled arguments passed to " PACKAGE " are treated\n" 
    136 "as a filter expression.\n" 
    137 "\n" 
    138 "  eg. $ " PACKAGE " not completed and now ge start and now le end\n" 
    139 )); 
     142                        manager.frontend()->message("filter:expression", help()); 
    140143                        exit(0); 
    141144                } else 
  • todo2/trunk/src/filter/Expression.h

    r295 r298  
    2929                bool arg(crash::Args::iterator arg); 
    3030 
     31                std::string help(); 
     32 
    3133        private : 
    3234                void applyFilter(Item *item, const crash::Expression::Node *expression) const; 
  • todo2/trunk/src/Filter.h

    r295 r298  
    1212 
    1313/** 
    14         A Filter transforms the 
     14        A Filter transforms the Database as it is loaded and saved. 
     15         
     16        For example, the Expression Filter matches each item against a C-like 
     17        expression and marks those that do not match as hidden. 
     18 
     19        Another filter might alter the contents on load and save, eg. encrypt and 
     20        decrypt. 
    1521*/ 
    1622 
  • todo2/trunk/src/frontend

    • Property svn:ignore changed from
      Makefile.in
      to
      Makefile.in
      Makefile
  • todo2/trunk/src/FrontEnd.cc

    r295 r298  
    1616} 
    1717 
    18 void FrontEnd::remove(Item *item) { 
     18void FrontEnd::removed(Item *item) { 
    1919} 
    2020 
    21 bool FrontEnd::insert(Item *item, Item::Index parent) { 
    22 
    23  
    24 Item *FrontEnd::edit(Item::Index index) { 
     21bool FrontEnd::inserted(Item *item, Item::Index parent) { 
     22        return true; 
    2523} 
    2624 
  • todo2/trunk/src/frontend/Console.cc

    r295 r298  
    4646 
    4747void Console::args(crash::Args &args) { 
    48         ARG_COLOUR = args.add(Args::ALLOCATE, "colour", Args::OPTIONAL, _("When to use colour, defaults to always if not specified."), _("never|always|auto")); 
     48        ARG_COLOUR = args.add(Args::ALLOCATE, "colour", Args::OPTIONAL, _("When to use colour, defaults to always if not specified."), "never|always|auto"); 
    4949        ARG_COLOR = args.add(Args::ALLOCATE, "color", Args::OPTIONAL); 
    5050        args.add('e', "edit", Args::REQUIRED, _("Edit the specified index."), _("<index>")); 
     
    123123} 
    124124 
     125Item *Console::edit(Item::Index item) { 
     126        return mdatabase->checkout(item); 
     127} 
     128 
     129void Console::commit(Item *item) { 
     130        mdatabase->commit(item); 
     131} 
     132 
     133void Console::discard(Item *item) { 
     134        mdatabase->discard(item); 
     135} 
     136 
    125137void Console::present(Database *database) { 
     138        mdatabase = database; 
    126139        throw Exception(this, "present() not implemented"); 
    127140} 
  • todo2/trunk/src/frontend/Console.h

    r295 r298  
    2222                void present(Database *database); 
    2323 
     24                Item *edit(Item::Index item); 
     25                void commit(Item *item); 
     26                void discard(Item *item); 
     27 
    2428                void message(std::string scope, std::string message); 
    2529                void error(std::string scope, std::string message); 
     
    3741                bool mtty, mcolour; 
    3842                crash::Terminal mterm; 
     43                Database *mdatabase; 
    3944}; 
    4045 
  • todo2/trunk/src/FrontEnd.h

    r295 r298  
    99/** 
    1010        The FrontEnd class abstracts the user interface to devtodo2. 
     11 
     12        All *user* access to the database should be performed through this 
     13        interface. 
    1114*/ 
    1215 
     
    2730 
    2831                ///     Inform the FrontEnd that the specified Item has been removed. 
    29                 virtual void remove(Item *item); 
     32                virtual void removed(Item *item); 
    3033                ///     Inform the FrontEnd that the specified Item has been inserted. 
    31                 virtual bool insert(Item *item, Item::Index parent = ""); 
     34                virtual bool inserted(Item *item, Item::Index parent = ""); 
    3235 
    33                 ///     Inform the FrontEnd that the specified Item is being edited. 
    34                 virtual Item *edit(Item::Index index); 
     36                /**     Inform the FrontEnd that the specified Item is being edited. Use 
     37                        commit() and discard() to indicate completion. */ 
     38                virtual Item *edit(Item::Index index) = 0; 
    3539                ///     Commit changes done by a previous edit. 
    3640                virtual void commit(Item *item); 
  • todo2/trunk/src/main.cc

    r297 r298  
    4242        Terminal terminal; 
    4343        Args args; 
    44         enum { BACKENDS = -1000, FILTERS, FRONTENDS, HELP, SET, UNSET, DUMPCONFIG, 
     44        enum { BACKENDS = -1000, FILTERS, FRONTENDS, SET, UNSET, DUMPCONFIG, 
    4545                ARG_VERSION, LIST_MODULES, DATABASE, INFORM, DIE_ON_ERRORS, ADDRESS_BOOK, 
    4646                PATH, CONTACTMETHODS }; 
    4747 
    4848                // specify default arguments 
    49                 args.add(HELP, "help", Args::NONE, "Display this help."); 
    50                 args.add(BACKENDS, "backends", Args::REQUIRED, "Use specified backends.", "<backend>[,...]"); 
    51                 args.add(FILTERS, "filters", Args::REQUIRED, "Use specified filters.", "<filter>[,...]"); 
    52                 args.add(FRONTENDS, "frontends", Args::REQUIRED, "Use specified frontends.", "<frontend>[,...]"); 
    53                 args.add(CONTACTMETHODS, "contact-methods", Args::REQUIRED, "Use specified contact methods.", "<method>[,...]"); 
     49                args.add('h', "help", Args::OPTIONAL, _("Display this help and optionally help on a specific module."), _("<module>")); 
     50                args.add(BACKENDS, "backends", Args::REQUIRED, _("Use specified backends."), _("<backend>[,...]")); 
     51                args.add(FILTERS, "filters", Args::REQUIRED, _("Use specified filters."), _("<filter>[,...]")); 
     52                args.add(FRONTENDS, "frontends", Args::REQUIRED, _("Use specified frontends."), _("<frontend>[,...]")); 
     53                args.add(CONTACTMETHODS, "contact-methods", Args::REQUIRED, _("Use specified contact methods."), _("<method>[,...]")); 
    5454                args.add(SET, "set", Args::REQUIRED); 
    5555                args.add(UNSET, "unset", Args::REQUIRED); 
    5656                args.add(DUMPCONFIG, "dump-config", Args::NONE); 
    57                 args.add(ARG_VERSION, "version", Args::NONE, "Display the version of devtodo2."); 
    58                 args.add(LIST_MODULES, "list-modules", Args::NONE, "Display list of active modules."); 
    59                 args.add(INFORM, "inform", Args::OPTIONAL, "Inform either the owners of modified items, or the comma seperated recipients listed, of any changes.", "<user>[,...]"); 
    60                 args.add(DIE_ON_ERRORS, "die-on-errors", Args::NONE, "Abort on any error."); 
    61                 args.add(ADDRESS_BOOK, "address-book", Args::NONE, "Show entries in address book."); 
    62                 args.add('D', "debug", Args::REQUIRED, "Set debugging level.", "<level>"); 
    63                 args.add(PATH, "path", Args::REQUIRED, "Specify database path to load (defaults to .todo2).", "<path>"); 
     57                args.add(ARG_VERSION, "version", Args::NONE, _("Display the version of devtodo2.")); 
     58                args.add(LIST_MODULES, "list-modules", Args::NONE, _("Display list of active modules.")); 
     59                args.add(INFORM, "inform", Args::OPTIONAL, _("Inform either the owners of modified items, or the comma seperated recipients listed, of any changes."), _("<user>[,...]")); 
     60                args.add(DIE_ON_ERRORS, "die-on-errors", Args::NONE, _("Abort on any error.")); 
     61                args.add(ADDRESS_BOOK, "address-book", Args::NONE, _("Show entries in address book.")); 
     62                args.add('D', "debug", Args::REQUIRED, _("Set debugging level."), _("<level>")); 
     63                args.add(PATH, "path", Args::REQUIRED, _("Specify database path to load (defaults to .todo2)."), _("<path>")); 
    6464 
    6565                /*      Quick pass over arguments to check for debug settings */ 
     
    7171                                                manager.set<int>("debug", debug_level); 
    7272                                        } catch (BadCast) { 
    73                                                 throw Exception("'" + i.parameter() + "' is an invalid debug level"); 
     73                                                throw Exception("'" + i.parameter() + _("' is an invalid debug level")); 
    7474                                        } 
    7575                                break; 
    7676                                case SET : { 
    7777                                        if (i.parameter().find('=') == string::npos) 
    78                                                 throw Exception("invalid config key/pair value '" + i.parameter() + "'"); 
     78                                                throw Exception(_("invalid config key/pair value '") + i.parameter() + "'"); 
    7979                                const string  
    8080                                        key = trim(i.parameter().substr(0, i.parameter().find('='))), 
     
    107107                                                manager.set<int>("debug", debug_level); 
    108108                                        } catch (BadCast) { 
    109                                                 throw Exception("'" + i.parameter() + "' is an invalid debug level"); 
     109                                                throw Exception("'" + i.parameter() + _("' is an invalid debug level")); 
    110110                                        } 
    111111                                break; 
     
    146146                                case SET : { 
    147147                                        if (i.parameter().find('=') == string::npos) 
    148                                                 throw Exception("invalid config key/pair value '" + i.parameter() + "'"); 
     148                                                throw Exception(_("invalid config key/pair value '") + i.parameter() + "'"); 
    149149                                const string  
    150150                                        key = trim(i.parameter().substr(0, i.parameter().find('='))), 
     
    169169                                case SET : { 
    170170                                        if (i.parameter().find('=') == string::npos) 
    171                                                 throw Exception("invalid config key/pair value '" + i.parameter() + "'"); 
     171                                                throw Exception(_("invalid config key/pair value '") + i.parameter() + "'"); 
    172172                                const string  
    173173                                        key = trim(i.parameter().substr(0, i.parameter().find('='))), 
     
    195195                                        } 
    196196 
    197                                         cout << "front-ends: " << join(", ", fe) << endl; 
    198                                         cout << "back-ends: " << join(", ", be) << endl; 
    199                                         cout << "filters: " << join(", ", f) << endl; 
    200                                         cout << "contactmethods: " << join(", ", cc) << endl; 
     197                                        cout << _("front-ends: ") << join(", ", fe) << endl; 
     198                                        cout << _("back-ends: ") << join(", ", be) << endl; 
     199                                        cout << _("filters: ") << join(", ", f) << endl; 
     200                                        cout << _("contactmethods: ") << join(", ", cc) << endl; 
    201201 
    202202                                        return 0; 
     
    209209                                        return 0; 
    210210                                } break; 
    211                                 case HELP : 
    212                                         usage(terminal.columns(), args, argv[0]); 
     211                                case 'h' : 
     212                                        if (i.hasParameter()) { 
     213                                        vector<Module*> modules = manager.moduleList(); 
     214 
     215                                                for (vector<Module*>::const_iterator j = modules.begin(); j != modules.end(); ++j) 
     216                                                        if ((*j)->name() == i.parameter()) { 
     217                                                                cout << (*j)->help() << endl; 
     218                                                                return 0; 
     219                                                        } 
     220                                                throw Exception(string(_("no such module ")) + "'" + i.parameter() + "'"); 
     221                                        } else 
     222                                                usage(terminal.columns(), args, argv[0]); 
    213223                                        return 0; 
    214224                                break; 
     
    225235                return manager.manage(args.begin(argc, argv), args.end()); 
    226236        } catch (BadCast &e) { 
    227                 cerr << manager.programName() << ": bad cast (typically caused by a call to crash::from_string<T>(s))" << endl; 
     237                cerr << manager.programName() << _(": bad cast (typically caused by a call to crash::from_string<T>(s))") << endl; 
    228238                return 1; 
    229239        } catch (BackEnd::Exception &e) { 
     
    243253                return 2; 
    244254        } catch (...) { 
    245                 cerr << manager.programName() << ": fatal, unhandled exception" << endl; 
     255                cerr << manager.programName() << _(": fatal, unhandled exception") << endl; 
    246256                return 3; 
    247257        } 
     
    252262  
    253263void usage(int width, Args &args, const char *self) { 
    254         cout << "usage: " << manager.programName() << " [<args>]" << endl 
    255                 << "Where <args> can be any of the following:" << endl; 
     264        cout << _("usage: ") << manager.programName() << _(" [<args>]") << endl 
     265                << _("Where <args> can be any of the following:") << endl; 
    256266        args.displayHelp(cout, width); 
    257267} 
  • todo2/trunk/src/Makefile.am

    r297 r298  
    2222        config.h 
    2323 
    24 todo2_LDFLAGS=-export-dynamic @LIBLTDL@ 
     24todo2_LDFLAGS=-export-dynamic $(QT_LIBS) 
  • todo2/trunk/src/Manager.cc

    r297 r298  
    128128        try { 
    129129        BackEnd *backend = 0; 
    130                 /* We need to attempt to make todo.database into an canonical path */ 
     130 
     131                /* We need to attempt to make todo.database into a canonical path */ 
    131132                DEBUG(9, "canonicalising path '" << get("database")); 
    132133                set("database", crash::realpath(get("database"))); 
     
    136137                for (vector<BackEnd*>::iterator i = mbackends.begin(); i != mbackends.end(); ++i) { 
    137138                        DEBUG(4, "attempting load of " << get("database") << " with backend " << (*i)->name()); 
    138                         if ((*i)->loadable(get("database"))) { 
     139                        if ((*i)->usable() && (*i)->loadable(get("database"))) { 
    139140                                backend = *i; 
    140141                                DEBUG(1, "chose backend '" << backend->name() << "'"); 
  • todo2/trunk/src/Module.cc

    r295 r298  
    1919        return false; 
    2020} 
     21 
     22std::string Module::help() { 
     23        return "No help available."; 
     24} 
  • todo2/trunk/src/Module.h

    r295 r298  
    4545                /**     Return true if the specified argument was handled by this object. */ 
    4646                virtual bool arg(crash::Args::iterator argument); 
     47                /**     Display help on this module. This is displayed if the user asks for 
     48                        explicit help on a module. */ 
     49                std::string help(); 
    4750 
    4851                void name(std::string name) { mname = name; } 
  • todo2/trunk/src/PropertyMap.h

    r297 r298  
    7979                } 
    8080 
    81                 ///     Return the value of a key, as a specific type. 
     81                /**     Return the value of a key as a specific type. If the key does not 
     82                        exist throw an Exception. */ 
    8283                template <typename T> 
    8384                const T get(std::string key) const { 
     
    9293                } 
    9394 
    94                 /**     Return the value of a key, as a specific type. If the key does not 
    95                         exist, return a default value. */ 
     95                /**     Return the value of a key as a specific type. If the key does not 
     96                        exist return a default value. */ 
    9697                template <typename T> 
    9798                const T get(std::string key, const T &def) const {