source: CMT/HEAD/source/cmt_language.h @ 663

Last change on this file since 663 was 663, checked in by rybkin, 10 years ago

See C.L. 522

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// Modified by Grigory Rybkin
5// See the complete license in cmt_license.txt "http://www.cecill.info".
6//-----------------------------------------------------------
7
8#ifndef __cmt_language_h__
9#define __cmt_language_h__
10
11#include "cmt_parser.h"
12#include "cmt_fragment.h"
13
14class Language
15{
16public:
17  typedef cmt_vector<Language> LanguageVector;
18  static void action (const CmtSystem::cmt_string_vector& words,
19                      Use* use);
20  static Language& find (const cmt_string& name);
21  static Language& find_with_suffix (const cmt_string& suffix);
22  static Language& add (const cmt_string& name);
23  static void show (const cmt_string& name);
24  static void show_all ();
25  static void show_names ();
26  static void setup_all_fragments ();
27  static void clear_all ();
28  static LanguageVector& languages ();
29  static Language& null ();
30
31public:
32  Language ();
33  ~Language ();
34  void clear ();
35  void show (PrintMode mode = Csh, ostream& out = cout); // Csh is default for ArgParser::mode
36  //  void show ();
37  void setup_fragments ();
38  bool operator == (const cmt_string& name) const;
39  bool operator == (const Language& other) const;
40  bool operator != (const Language& other) const;
41  bool native_dependencies ();
42  const cmt_string& dependencies_options () const;
43  const cmt_string& dependencies_options_expanded ();
44
45  cmt_string m_name;
46  cmt_string fragment_name;
47  cmt_string linker;
48  cmt_string output_suffix;
49  bool prototypes;
50  cmt_string preprocessor_command;
51  CmtSystem::cmt_string_vector suffixes;
52  CmtSystem::cmt_string_vector extra_output_suffixes;
53  UseRef m_use;
54
55  FragmentHandle application;
56  FragmentHandle library;
57
58private:
59  void setup_native_dependencies ();
60
61  bool m_native_dependencies;
62  cmt_string m_dependencies_options;
63  cmt_string m_dependencies_options_expanded;
64  bool m_native_dependencies_set;
65};
66
67#endif
Note: See TracBrowser for help on using the repository browser.