Update ooo320-m1
[ooovba.git] / autodoc / source / parser_i / inc / s2_luidl / pe_const.hxx
blobcec98dc36858bc0457a9e1b1db51da1f969f44e8
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_const.hxx,v $
10 * $Revision: 1.6 $
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_CONST_HXX
32 #define LUIDL_PE_CONST_HXX
35 // USED SERVICES
36 // BASE CLASSES
37 #include <s2_luidl/parsenv2.hxx>
38 #include <s2_luidl/pestate.hxx>
39 // COMPONENTS
40 // PARAMETERS
43 namespace udm {
44 class Agent_Struct;
45 } // namespace udm
48 namespace csi
50 namespace uidl
53 class ConstantsGroup;
55 class PE_Type;
56 class PE_Value;
58 class PE_Constant : public UnoIDL_PE,
59 public ParseEnvState
61 public:
62 PE_Constant();
63 virtual void EstablishContacts(
64 UnoIDL_PE * io_pParentPE,
65 ary::Repository &
66 io_rRepository,
67 TokenProcessing_Result &
68 o_rResult );
69 ~PE_Constant();
71 virtual void ProcessToken(
72 const Token & i_rToken );
74 virtual void Process_Identifier(
75 const TokIdentifier &
76 i_rToken );
77 virtual void Process_Punctuation(
78 const TokPunctuation &
79 i_rToken );
80 virtual void Process_Stereotype(
81 const TokStereotype &
82 i_rToken );
84 private:
85 enum E_State
87 e_none,
88 expect_name,
89 expect_curl_bracket_open,
90 expect_const,
91 expect_value,
92 expect_finish,
93 e_STATES_MAX
95 enum E_TokenType
97 tt_stereotype,
98 tt_identifier,
99 tt_punctuation,
100 tt_MAX
102 typedef void (PE_Constant::*F_TOK)(const char *);
105 void CallHandler(
106 const char * i_sTokenText,
107 E_TokenType i_eTokenType );
109 void On_expect_name_Identifier(const char * i_sText);
110 void On_expect_curl_bracket_open_Punctuation(const char * i_sText);
111 void On_expect_const_Stereotype(const char * i_sText);
112 void On_expect_const_Punctuation(const char * i_sText);
113 void On_expect_value_Identifier(const char * i_sText);
114 void On_expect_finish_Punctuation(const char * i_sText);
115 void On_Default(const char * );
117 void EmptySingleConstData();
118 void CreateSingleConstant();
120 virtual void InitData();
121 virtual void ReceiveData();
122 virtual void TransferData();
123 virtual UnoIDL_PE & MyPE();
125 // DATA
126 static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
128 E_State eState;
130 String sData_Name;
131 ary::idl::Ce_id nDataId;
133 Dyn<PE_Type> pPE_Type;
134 ary::idl::Type_id nType;
136 Dyn<PE_Value> pPE_Value;
137 String sName;
138 String sAssignment;
143 } // namespace uidl
144 } // namespace csi
147 #endif