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

Last change on this file since 561 was 561, checked in by rybkin, 13 years ago

See C.L. 444

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