Update ooo320-m1
[ooovba.git] / autodoc / source / parser_i / inc / s2_luidl / pe_evalu.hxx
blob552fbea3b210fd89d4443fbdcba0366b6dd294e8
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pe_evalu.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef LUIDL_PE_EVALU_HXX
32 #define LUIDL_PE_EVALU_HXX
36 // USED SERVICES
37 // BASE CLASSES
38 #include <s2_luidl/parsenv2.hxx>
39 #include <s2_luidl/pestate.hxx>
40 // COMPONENTS
41 // PARAMETERS
44 namespace udm {
45 class Agent_Struct;
46 } // namespace udm
49 namespace csi
51 namespace uidl
54 class PE_Value : public UnoIDL_PE,
55 public ParseEnvState
57 public:
58 PE_Value(
59 String & o_rName,
60 String & o_rAssignment,
61 bool i_bIsConst );
62 virtual void EstablishContacts(
63 UnoIDL_PE * io_pParentPE,
64 ary::Repository &
65 io_rRepository,
66 TokenProcessing_Result &
67 o_rResult );
68 ~PE_Value();
70 virtual void ProcessToken(
71 const Token & i_rToken );
73 virtual void Process_Identifier(
74 const TokIdentifier &
75 i_rToken );
76 virtual void Process_Punctuation(
77 const TokPunctuation &
78 i_rToken );
79 virtual void Process_Assignment(
80 const TokAssignment &
81 i_rToken );
82 private:
83 enum E_State
85 e_none = 0,
86 expect_name,
87 got_name,
88 e_STATES_MAX
90 enum E_TokenType /// @ATTENTION Do not change existing values (except of tt_MAX) !!! Else array-indices will break.
92 tt_identifier = 0,
93 tt_punctuation = 1,
94 tt_assignment = 2,
95 tt_MAX
97 typedef void (PE_Value::*F_TOK)(const char *);
100 void CallHandler(
101 const char * i_sTokenText,
102 E_TokenType i_eTokenType );
104 void On_expect_name_Identifier(const char * i_sText);
105 void On_got_name_Punctuation(const char * i_sText);
106 void On_got_name_Assignment(const char * i_sText);
107 void On_Default(const char * );
109 virtual void InitData();
110 virtual void TransferData();
111 virtual UnoIDL_PE & MyPE();
113 bool IsConst() const { return bIsConst; }
115 static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
117 E_State eState;
118 String * pName;
119 String * pAssignment;
120 bool bIsConst;
125 } // namespace uidl
126 } // namespace csi
129 #endif