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