libdballe  7.7
core/var.h
Go to the documentation of this file.
1 /*
2  * dballe/var - DB-All.e specialisation of wreport variable
3  *
4  * Copyright (C) 2005--2011 ARPA-SIM <urpsim@smr.arpa.emr.it>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * Author: Enrico Zini <enrico@enricozini.com>
20  */
21 
22 #ifndef DBALLE_CORE_VAR_H
23 #define DBALLE_CORE_VAR_H
24 
30 #include <dballe/var.h>
31 #include <set>
32 
33 namespace dballe {
34 
39 void resolve_varlist(const std::string& varlist, std::set<wreport::Varcode>& out);
41 
43 void resolve_varlist(const std::string& varlist, std::function<void(wreport::Varcode)> out);
44 
46 std::unique_ptr<wreport::Var> var_copy_without_unset_attrs(const wreport::Var& var);
47 
52 std::unique_ptr<wreport::Var> var_copy_without_unset_attrs(const wreport::Var& var, wreport::Varcode code);
53 
59 void format_code(wreport::Varcode code, char* buf);
60 
62 wreport::Varcode map_code_to_dballe(wreport::Varcode code);
63 
64 }
65 
66 #endif
67 /* vim:set ts=4 sw=4: */
Create wreport variables from the DB-All.e B table.
void format_code(wreport::Varcode code, char *buf)
Format the code to its string representation.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
std::unique_ptr< wreport::Var > var_copy_without_unset_attrs(const wreport::Var &var)
Create a new Var, copying var and all its attributes except the unset ones.
wreport::Varcode map_code_to_dballe(wreport::Varcode code)
Return code, or its DB-All.e equivalent.
void resolve_varlist(const std::string &varlist, std::set< wreport::Varcode > &out)
Convenience functions to quickly create variables from the local B table.