1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/src/libutil
Eelco Dolstra 2040240e23
Add a Config class to simplify adding configuration settings
The typical use is to inherit Config and add Setting<T> members:

  class MyClass : private Config
  {
    Setting<int> foo{this, 123, "foo", "the number of foos to use"};
    Setting<std::string> bar{this, "blabla", "bar", "the name of the bar"};

    MyClass() : Config(readConfigFile("/etc/my-app.conf"))
    {
      std::cout << foo << "\n"; // will print 123 unless overriden
    }
  };

Currently, this is used by Store and its subclasses for store
parameters. You now get a warning if you specify a non-existant store
parameter in a store URI.
2017-04-13 16:03:31 +02:00
..
affinity.cc printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
affinity.hh Run the daemon worker on the same CPU as the client 2013-08-07 14:02:04 +02:00
archive.cc Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
archive.hh Revert fa125b9b28 2017-03-06 13:56:20 +01:00
args.cc Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
args.hh Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
compression.cc Fix xz decompression 2017-03-22 11:53:33 +01:00
compression.hh LocalFSStore::getBuildLog(): Handle corrupted logs 2017-03-21 19:23:35 +01:00
config.cc Add a Config class to simplify adding configuration settings 2017-04-13 16:03:31 +02:00
config.hh Add a Config class to simplify adding configuration settings 2017-04-13 16:03:31 +02:00
finally.hh Add missing #include 2016-11-07 14:35:47 +01:00
hash.cc Move istringstream_nocopy to a separate file 2017-03-21 14:43:03 +01:00
hash.hh Cache path info lookups in SQLite 2016-04-20 14:12:38 +02:00
istringstream_nocopy.hh Move istringstream_nocopy to a separate file 2017-03-21 14:43:03 +01:00
json.cc toJSON(): Support some more types 2016-10-06 17:00:52 +02:00
json.hh toJSON(): Support some more types 2016-10-06 17:00:52 +02:00
local.mk Add support for brotli compression 2017-03-15 16:49:06 +01:00
logging.cc Add warn function 2017-04-13 16:03:31 +02:00
logging.hh Add warn function 2017-04-13 16:03:31 +02:00
lru-cache.hh nix-daemon: Disable path info cache 2017-04-06 14:30:31 +02:00
monitor-fd.hh Fix interrupt handling 2017-01-26 20:40:33 +01:00
pool.hh Pool: Don't hang if creating a connection fails 2017-03-03 19:21:43 +01:00
ref.hh Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
serialise.cc readString(): Read directly into std::string 2017-03-01 14:54:11 +01:00
serialise.hh RemoteStore::addToStore(): Send NAR rather than string containing NAR 2017-03-01 16:07:15 +01:00
sync.hh nix-daemon: Disable path info cache 2017-04-06 14:30:31 +02:00
thread-pool.cc printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
thread-pool.hh Fix assertion failure in ThreadPool::enqueue() 2016-07-21 18:14:16 +02:00
types.hh Add a Config class to simplify adding configuration settings 2017-04-13 16:03:31 +02:00
util.cc canonPath(): Check against empty paths 2017-04-13 16:03:31 +02:00
util.hh Move istringstream_nocopy to a separate file 2017-03-21 14:43:03 +01:00
xml-writer.cc OCD: foreach -> C++11 ranged for 2015-07-17 20:13:56 +02:00
xml-writer.hh And another one 2014-02-26 18:55:18 +01:00