CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mode.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module:
4
5Author: Daniel Kroening, kroening@cs.cmu.edu
6
7\*******************************************************************/
8
9
10#ifndef CPROVER_LANGAPI_MODE_H
11#define CPROVER_LANGAPI_MODE_H
12
13#include <util/irep.h>
14
15#include <memory> // unique_ptr
16
17class languaget;
18class namespacet;
19
20std::unique_ptr<languaget> get_language_from_mode(const irep_idt &mode);
21const irep_idt &
22get_mode_from_identifier(const namespacet &ns, const irep_idt &identifier);
23std::unique_ptr<languaget>
24get_language_from_identifier(const namespacet &ns, const irep_idt &identifier);
25std::unique_ptr<languaget> get_language_from_filename(
26 const std::string &filename);
27std::unique_ptr<languaget> get_default_language();
28
29typedef std::unique_ptr<languaget> (*language_factoryt)();
31
32#endif // CPROVER_LANGAPI_MODE_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition namespace.h:91
std::unique_ptr< languaget > get_language_from_mode(const irep_idt &mode)
Get the language corresponding to the given mode.
Definition mode.cpp:51
std::unique_ptr< languaget >(* language_factoryt)()
Definition mode.h:29
std::unique_ptr< languaget > get_default_language()
Returns the default language.
Definition mode.cpp:139
std::unique_ptr< languaget > get_language_from_filename(const std::string &filename)
Get the language corresponding to the registered file name extensions.
Definition mode.cpp:102
void register_language(language_factoryt factory)
Register a language Note: registering a language is required for using the functions in language_util...
Definition mode.cpp:39
const irep_idt & get_mode_from_identifier(const namespacet &ns, const irep_idt &identifier)
Get the mode of the given identifier's symbol.
Definition mode.cpp:66
std::unique_ptr< languaget > get_language_from_identifier(const namespacet &ns, const irep_idt &identifier)
Get the language corresponding to the mode of the given identifier's symbol.
Definition mode.cpp:84