ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_cppheader.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3 if (!isset ($BEAUT_PATH)) return;
4 require_once("$BEAUT_PATH/Beautifier/HFile.php");
5  class HFile_cppheader extends HFile{
6  function HFile_cppheader(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // C++ Header
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "0";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "gray", "brown", "blue", "purple");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array("{");
28 $this->unindent = array("}");
29 
30 // String characters and delimiters
31 
32 $this->stringchars = array("\"", "'");
33 $this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "{", "}", "[", "]", "<", ">", ":", ";", "\"", "'", " ", ",", " ", ".", "?");
34 $this->escchar = "";
35 
36 // Comment settings
37 
38 $this->linecommenton = array("//");
39 $this->blockcommenton = array("/*");
40 $this->blockcommentoff = array("*/");
41 
42 // Keywords (keyword mapping to colour number)
43 
44 $this->keywords = array(
45  "bool" => "1",
46  "char" => "1",
47  "class" => "1",
48  "const" => "1",
49  "double" => "1",
50  "enum" => "1",
51  "explicit" => "1",
52  "export" => "1",
53  "extern" => "1",
54  "false" => "1",
55  "float" => "1",
56  "friend" => "1",
57  "inline" => "1",
58  "int" => "1",
59  "long" => "1",
60  "mutable" => "1",
61  "namespace" => "1",
62  "operator" => "1",
63  "protected" => "1",
64  "private" => "1",
65  "public" => "1",
66  "short" => "1",
67  "signed" => "1",
68  "sizeof" => "1",
69  "static" => "1",
70  "struct" => "1",
71  "template" => "1",
72  "throw" => "1",
73  "true" => "1",
74  "typedef" => "1",
75  "typename" => "1",
76  "union" => "1",
77  "unsigned" => "1",
78  "using" => "1",
79  "virtual" => "1",
80  "void" => "1",
81  "volatile" => "1",
82  "wchar_t" => "1",
83  "asm" => "2",
84  "auto" => "2",
85  "break" => "2",
86  "case" => "2",
87  "catch" => "2",
88  "const_cast" => "2",
89  "continue" => "2",
90  "default" => "2",
91  "do" => "2",
92  "delete" => "2",
93  "dynamic_cast" => "2",
94  "else" => "2",
95  "for" => "2",
96  "goto" => "2",
97  "if" => "2",
98  "new" => "2",
99  "register" => "2",
100  "reinterpret_cast" => "2",
101  "return" => "2",
102  "static_cast" => "2",
103  "switch" => "2",
104  "this" => "2",
105  "try" => "2",
106  "typeid" => "2",
107  "while" => "2",
108  "#define" => "3",
109  "#error" => "3",
110  "#elif" => "3",
111  "#if" => "3",
112  "#line" => "3",
113  "#else" => "3",
114  "#ifdef" => "3",
115  "#pragma" => "3",
116  "#endif" => "3",
117  "#ifndef" => "3",
118  "#undef" => "3",
119  "#include" => "4",
120  "+" => "5",
121  "-" => "5",
122  "=" => "5",
123  "//" => "5",
124  "/" => "5",
125  "%" => "5",
126  "&" => "5",
127  ">" => "5",
128  "<" => "5",
129  "^" => "5",
130  "!" => "5",
131  "|" => "5",
132  "*" => "5",
133  "{" => "6",
134  "}" => "6",
135  ";" => "6",
136  "(" => "6",
137  ")" => "6",
138  "," => "6");
139 
140 // Special extensions
141 
142 // Each category can specify a PHP function that returns an altered
143 // version of the keyword.
144 
145 
146 
147 $this->linkscripts = array(
148  "1" => "donothing",
149  "2" => "donothing",
150  "3" => "donothing",
151  "4" => "donothing",
152  "5" => "donothing",
153  "6" => "donothing");
154 }
155 
156 
157 function donothing($keywordin)
158 {
159  return $keywordin;
160 }
161 
162 }?>