Update ooo320-m1
[ooovba.git] / autodoc / source / parser_i / inc / s2_luidl / pe_enum2.hxx
blob0978249b50f83d53df79ea66a0f1071b264f9403
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_enum2.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 ADC_UIDL_PE_ENUM2_HXX
32 #define ADC_UIDL_PE_ENUM2_HXX
36 // USED SERVICES
37 // BASE CLASSES
38 #include <s2_luidl/parsenv2.hxx>
39 #include <s2_luidl/pestate.hxx>
40 // COMPONENTS
41 // PARAMETERS
45 namespace csi
47 namespace uidl
50 // class Enum;
52 class PE_Value;
54 class PE_Enum : public UnoIDL_PE,
55 public ParseEnvState
57 public:
58 PE_Enum();
59 virtual void EstablishContacts(
60 UnoIDL_PE * io_pParentPE,
61 ary::Repository & io_rRepository,
62 TokenProcessing_Result &
63 o_rResult );
64 ~PE_Enum();
66 virtual void ProcessToken(
67 const Token & i_rToken );
69 virtual void Process_Identifier(
70 const TokIdentifier &
71 i_rToken );
72 virtual void Process_Punctuation(
73 const TokPunctuation &
74 i_rToken );
76 private:
77 enum E_State
79 e_none,
80 expect_name,
81 expect_curl_bracket_open,
82 expect_value,
83 expect_finish,
84 e_STATES_MAX
86 enum E_TokenType
88 tt_identifier,
89 tt_punctuation,
90 tt_MAX
92 typedef void (PE_Enum::*F_TOK)(const char *);
95 void CallHandler(
96 const char * i_sTokenText,
97 E_TokenType i_eTokenType );
99 void On_expect_name_Identifier(const char * i_sText);
100 void On_expect_curl_bracket_open_Punctuation(const char * i_sText);
101 void On_expect_value_Punctuation(const char * i_sText);
102 void On_expect_value_Identifier(const char * i_sText);
103 void On_expect_finish_Punctuation(const char * i_sText);
104 void On_Default(const char * );
106 void EmptySingleValueData();
107 void CreateSingleValue();
109 virtual void InitData();
110 virtual void ReceiveData();
111 virtual void TransferData();
112 virtual UnoIDL_PE & MyPE();
114 // DATA
115 static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
117 E_State eState;
119 String sData_Name;
120 ary::idl::Ce_id nDataId;
122 Dyn<PE_Value> pPE_Value;
123 String sName;
124 String sAssignment;
129 } // namespace uidl
130 } // namespace csi
133 #endif