Update ooo320-m1
[ooovba.git] / autodoc / source / parser_i / inc / s2_luidl / pe_singl.hxx
blob8771f05414f7388d2e2915fb8d5535acb482ca3b
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_singl.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_SINGL_HXX
32 #define LUIDL_PE_SINGL_HXX
36 // USED SERVICES
37 // BASE CLASSES
38 #include <s2_luidl/parsenv2.hxx>
39 #include <s2_luidl/pestate.hxx>
40 // COMPONENTS
41 // PARAMETERS
43 namespace ary
45 namespace idl
47 class Singleton;
48 class SglIfcSingleton;
53 namespace csi
55 namespace uidl
58 class PE_Type;
61 class PE_Singleton : public UnoIDL_PE,
62 public ParseEnvState
64 public:
65 PE_Singleton();
66 virtual ~PE_Singleton();
68 virtual void EstablishContacts(
69 UnoIDL_PE * io_pParentPE,
70 ary::Repository & io_rRepository,
71 TokenProcessing_Result &
72 o_rResult );
73 virtual void ProcessToken(
74 const Token & i_rToken );
76 virtual void Process_MetaType(
77 const TokMetaType & i_rToken );
78 virtual void Process_Identifier(
79 const TokIdentifier &
80 i_rToken );
81 virtual void Process_Punctuation(
82 const TokPunctuation &
83 i_rToken );
84 virtual void Process_Default();
86 private:
87 enum E_State
89 e_none = 0,
90 need_name,
91 need_curlbr_open,
92 e_std,
93 in_service,
94 need_finish,
95 in_base_interface,
96 e_STATES_MAX
100 #if 0
101 enum E_TokenType /// @ATTENTION Do not change existing values (except of tt_MAX) !!! Else array-indices will break.
103 tt_metatype = 0,
104 tt_identifier = 1,
105 tt_punctuation = 2,
106 tt_startoftype = 3,
107 tt_MAX
109 typedef void (PE_Singleton::*F_TOK)(const char *);
112 void On_need_singleton_MetaType(const char * i_sText);
113 void On_need_name_Identifer(const char * i_sText);
114 void On_need_curlbr_open_Punctuation(const char * i_sText);
115 void On_std_GotoService(const char * i_sText);
116 void On_std_Punctuation(const char * i_sText);
117 void On_need_finish_Punctuation(const char * i_sText);
119 void CallHandler(
120 const char * i_sTokenText,
121 E_TokenType i_eTokenType );
122 #endif // 0
124 void On_Default();
126 virtual void InitData();
127 virtual void TransferData();
128 virtual void ReceiveData();
129 virtual UnoIDL_PE & MyPE();
131 // DATA
132 // static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
134 E_State eState;
135 String sData_Name;
136 bool bIsPreDeclaration;
137 ary::idl::Singleton *
138 pCurSingleton;
139 ary::idl::SglIfcSingleton *
140 pCurSiSingleton;
142 Dyn<PE_Type> pPE_Type;
143 ary::idl::Type_id nCurParsed_Type;
147 } // namespace uidl
148 } // namespace csi
152 #endif