merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / ary / idl / i_property.cxx
blob40b855a7b1f776706c751dc2c488ccf45ca9b8c8
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: i_property.cxx,v $
10 * $Revision: 1.8 $
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 #include <precomp.h>
32 #include <ary/idl/i_property.hxx>
33 #include <ary/idl/ik_property.hxx>
36 // NOT FULLY DECLARED SERVICES
37 #include <cosv/tpl/processor.hxx>
40 namespace ary
42 namespace idl
46 Property::Property( const String & i_sName,
47 Ce_id i_nService,
48 Ce_id i_nModule,
49 Type_id i_nType,
50 Stereotypes i_stereotypes )
51 : sName(i_sName),
52 nOwner(i_nService),
53 nNameRoom(i_nModule),
54 nType(i_nType),
55 aStereotypes(i_stereotypes)
59 Property::~Property()
64 void
65 Property::do_Accept( csv::ProcessorIfc & io_processor ) const
67 csv::CheckedCall(io_processor, *this);
70 ClassId
71 Property::get_AryClass() const
73 return class_id;
76 const String &
77 Property::inq_LocalName() const
79 return sName;
82 Ce_id
83 Property::inq_NameRoom() const
85 return nNameRoom;
88 Ce_id
89 Property::inq_Owner() const
91 return nOwner;
94 E_SightLevel
95 Property::inq_SightLevel() const
97 return sl_Member;
100 namespace ifc_property
103 inline const Property &
104 property_cast( const CodeEntity & i_ce )
106 csv_assert( i_ce.AryClass() == Property::class_id );
107 return static_cast< const Property& >(i_ce);
110 bool
111 attr::HasAnyStereotype( const CodeEntity & i_ce )
113 return property_cast(i_ce).aStereotypes.HasAny();
116 bool
117 attr::IsReadOnly( const CodeEntity & i_ce )
119 return property_cast(i_ce).aStereotypes.IsReadOnly();
122 bool
123 attr::IsBound( const CodeEntity & i_ce )
125 return property_cast(i_ce).aStereotypes.IsBound();
128 bool
129 attr::IsConstrained( const CodeEntity & i_ce )
131 return property_cast(i_ce).aStereotypes.IsConstrained();
134 bool
135 attr::IsMayBeAmbiguous( const CodeEntity & i_ce )
137 return property_cast(i_ce).aStereotypes.IsMayBeAmbiguous();
140 bool
141 attr::IsMayBeDefault( const CodeEntity & i_ce )
143 return property_cast(i_ce).aStereotypes.IsMayBeDefault();
146 bool
147 attr::IsMayBeVoid( const CodeEntity & i_ce )
149 return property_cast(i_ce).aStereotypes.IsMayBeVoid();
152 bool
153 attr::IsRemovable( const CodeEntity & i_ce )
155 return property_cast(i_ce).aStereotypes.IsRemovable();
158 bool
159 attr::IsTransient( const CodeEntity & i_ce )
161 return property_cast(i_ce).aStereotypes.IsTransient();
164 Type_id
165 attr::Type( const CodeEntity & i_ce )
167 return property_cast(i_ce).nType;
170 } // namespace ifc_property
173 } // namespace idl
174 } // namespace ary