2 # fragments of source file
\r
4 # Copyright (c) 2007, Intel Corporation
\r
6 # All rights reserved. This program and the accompanying materials
\r
7 # are licensed and made available under the terms and conditions of the BSD License
\r
8 # which accompanies this distribution. The full text of the license may be found at
\r
9 # http://opensource.org/licenses/bsd-license.php
\r
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
\r
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
\r
16 ## The description of comment contents and start & end position
\r
22 # @param self The object pointer
\r
23 # @param Str The message to record
\r
24 # @param Begin The start position tuple.
\r
25 # @param End The end position tuple.
\r
26 # @param CommentType The type of comment (T_COMMENT_TWO_SLASH or T_COMMENT_SLASH_STAR).
\r
28 def __init__(self, Str, Begin, End, CommentType):
\r
30 self.StartPos = Begin
\r
32 self.Type = CommentType
\r
34 ## The description of preprocess directives and start & end position
\r
37 class PP_Directive :
\r
40 # @param self The object pointer
\r
41 # @param Str The message to record
\r
42 # @param Begin The start position tuple.
\r
43 # @param End The end position tuple.
\r
45 def __init__(self, Str, Begin, End):
\r
47 self.StartPos = Begin
\r
50 ## The description of predicate expression and start & end position
\r
53 class PredicateExpression :
\r
56 # @param self The object pointer
\r
57 # @param Str The message to record
\r
58 # @param Begin The start position tuple.
\r
59 # @param End The end position tuple.
\r
61 def __init__(self, Str, Begin, End):
\r
63 self.StartPos = Begin
\r
66 ## The description of function definition and start & end position
\r
69 class FunctionDefinition :
\r
72 # @param self The object pointer
\r
73 # @param Str The message to record
\r
74 # @param Begin The start position tuple.
\r
75 # @param End The end position tuple.
\r
77 def __init__(self, ModifierStr, DeclStr, Begin, End):
\r
78 self.Modifier = ModifierStr
\r
79 self.Declarator = DeclStr
\r
80 self.StartPos = Begin
\r
83 ## The description of variable declaration and start & end position
\r
86 class VariableDeclaration :
\r
89 # @param self The object pointer
\r
90 # @param Str The message to record
\r
91 # @param Begin The start position tuple.
\r
92 # @param End The end position tuple.
\r
94 def __init__(self, ModifierStr, DeclStr, Begin, End):
\r
95 self.Modifier = ModifierStr
\r
96 self.Declarator = DeclStr
\r
97 self.StartPos = Begin
\r
100 ## The description of enum definition and start & end position
\r
103 class EnumerationDefinition :
\r
106 # @param self The object pointer
\r
107 # @param Str The message to record
\r
108 # @param Begin The start position tuple.
\r
109 # @param End The end position tuple.
\r
111 def __init__(self, Str, Begin, End):
\r
113 self.StartPos = Begin
\r
116 ## The description of struct/union definition and start & end position
\r
119 class StructUnionDefinition :
\r
122 # @param self The object pointer
\r
123 # @param Str The message to record
\r
124 # @param Begin The start position tuple.
\r
125 # @param End The end position tuple.
\r
127 def __init__(self, Str, Begin, End):
\r
129 self.StartPos = Begin
\r
132 ## The description of 'Typedef' definition and start & end position
\r
135 class TypedefDefinition :
\r
138 # @param self The object pointer
\r
139 # @param Str The message to record
\r
140 # @param Begin The start position tuple.
\r
141 # @param End The end position tuple.
\r
143 def __init__(self, FromStr, ToStr, Begin, End):
\r
144 self.FromType = FromStr
\r
145 self.ToType = ToStr
\r
146 self.StartPos = Begin
\r