Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef ADC_UIDL_PE_PROPERTY_HXX
21 : #define ADC_UIDL_PE_PROPERTY_HXX
22 :
23 :
24 :
25 : // USED SERVICES
26 : // BASE CLASSES
27 :
28 : #include <s2_luidl/parsenv2.hxx>
29 : #include <s2_luidl/pestate.hxx>
30 : // COMPONENTS
31 : #include <ary/idl/i_property.hxx>
32 : // PARAMETERS
33 : #include <ary/idl/i_gate.hxx>
34 :
35 :
36 : namespace csi
37 : {
38 : namespace uidl
39 : {
40 :
41 :
42 : class PE_Variable;
43 :
44 : class PE_Property : public UnoIDL_PE,
45 : public ParseEnvState
46 : {
47 : public:
48 : typedef ary::idl::Ce_id Ce_id;
49 : typedef ary::idl::Type_id Type_id;
50 : typedef ary::idl::Property::Stereotypes Stereotypes;
51 :
52 :
53 : PE_Property(
54 : const Ce_id & i_rCurOwner );
55 :
56 : virtual void EstablishContacts(
57 : UnoIDL_PE * io_pParentPE,
58 : ary::Repository &
59 : io_rRepository,
60 : TokenProcessing_Result &
61 : o_rResult );
62 : virtual ~PE_Property();
63 :
64 : virtual void ProcessToken(
65 : const Token & i_rToken );
66 :
67 : virtual void Process_Stereotype(
68 : const TokStereotype &
69 : i_rToken );
70 : virtual void Process_MetaType(
71 : const TokMetaType & i_rToken );
72 : virtual void Process_Punctuation(
73 : const TokPunctuation &
74 : i_rToken );
75 : virtual void Process_Default();
76 :
77 994 : void PresetOptional() { bIsOptional = true; }
78 : void PresetStereotypes(
79 : Stereotypes::E_Flags
80 : i_eFlag )
81 : { aStereotypes.Set_Flag(i_eFlag); }
82 : private:
83 : enum E_State
84 : {
85 : e_none,
86 : e_start,
87 : expect_variable,
88 : in_variable
89 : };
90 :
91 : virtual void InitData();
92 : virtual void ReceiveData();
93 : virtual void TransferData();
94 : virtual UnoIDL_PE & MyPE();
95 :
96 : // DATA
97 : E_State eState;
98 : const Ce_id * pCurOwner;
99 :
100 : Dyn<PE_Variable> pPE_Variable;
101 :
102 : // object-data
103 : Type_id nCurParsedType;
104 : String sCurParsedName;
105 : bool bIsOptional;
106 : Stereotypes aStereotypes;
107 : };
108 :
109 :
110 : } // namespace uidl
111 : } // namespace csi
112 :
113 :
114 : #endif
115 :
116 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|