|
[yoda-svn] yoda: 2 new changesetsYODA Mercurial yoda at projects.hepforge.orgWed Jul 29 16:00:01 BST 2015
details: https://yoda.hepforge.org/hg/yoda/rev/2eda55e200cc branches: changeset: 1078:2eda55e200cc user: Andy Buckley <andy at insectnation.org> date: Wed Jul 29 12:33:44 2015 +0100 description: Add configuration of output streams to throw exceptions on bad/fail state (based on patch from Lukas Heinrich). details: https://yoda.hepforge.org/hg/yoda/rev/4447f892926b branches: changeset: 1079:4447f892926b user: Andy Buckley <andy at insectnation.org> date: Wed Jul 29 15:59:09 2015 +0100 description: Add SFINAE trait magic to restrict write(RANGE) functions to accepting iterables. Also generalising to allow either container-of-objects or container-of-pointers args by providing a writeBody(AO*) function to complement writeBody(AO&). Based on a patch from Lukas Heinrich. diffs (truncated from 175 to 50 lines): --- a/ChangeLog Wed Jul 08 12:03:39 2015 +0100 +++ b/ChangeLog Wed Jul 29 15:59:09 2015 +0100 @@ -1,3 +1,14 @@ +2015-07-29 Andy Buckley <andy.buckley at cern.ch> + + * Add SFINAE trait magic to restrict write(RANGE) functions to + accepting iterables. Also generalising to allow either + container-of-objects or container-of-pointers args by providing a + writeBody(AO*) function to complement writeBody(AO&). Based on a + patch from Lukas Heinrich. + + * Add configuration of output streams to throw exceptions on + bad/fail state (based on patch from Lukas Heinrich). + 2015-07-01 Andy Buckley <andy.buckley at cern.ch> * 1.4.0 release. --- a/include/YODA/Exceptions.h Wed Jul 08 12:03:39 2015 +0100 +++ b/include/YODA/Exceptions.h Wed Jul 29 15:59:09 2015 +0100 @@ -89,6 +89,13 @@ }; + /// Error for file writing errors + class WriteError : public Exception { + public: + WriteError(const std::string& what) : Exception(what) {} + }; + + /// Error for problems introduced outside YODA, to put it nicely. class UserError : public Exception { public: --- a/include/YODA/Makefile.am Wed Jul 08 12:03:39 2015 +0100 +++ b/include/YODA/Makefile.am Wed Jul 29 15:59:09 2015 +0100 @@ -25,6 +25,7 @@ Utils/Formatting.h \ Utils/Predicates.h \ Utils/BinSearcher.h \ + Utils/Traits.h \ Utils/sortedvector.h \ Utils/cachedvector.h \ Utils/indexedset.h \ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/YODA/Utils/Traits.h Wed Jul 29 15:59:09 2015 +0100 @@ -0,0 +1,19 @@ +// -*- C++ -*- +// +// This file is part of YODA -- Yet more Objects for Data Analysis +// Copyright (C) 2008-2015 The YODA collaboration (see AUTHORS for details)
More information about the yoda-svn mailing list |