1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: i_property.cxx,v $
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 ************************************************************************/
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>
46 Property::Property( const String
& i_sName
,
50 Stereotypes i_stereotypes
)
55 aStereotypes(i_stereotypes
)
65 Property::do_Accept( csv::ProcessorIfc
& io_processor
) const
67 csv::CheckedCall(io_processor
, *this);
71 Property::get_AryClass() const
77 Property::inq_LocalName() const
83 Property::inq_NameRoom() const
89 Property::inq_Owner() const
95 Property::inq_SightLevel() const
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
);
111 attr::HasAnyStereotype( const CodeEntity
& i_ce
)
113 return property_cast(i_ce
).aStereotypes
.HasAny();
117 attr::IsReadOnly( const CodeEntity
& i_ce
)
119 return property_cast(i_ce
).aStereotypes
.IsReadOnly();
123 attr::IsBound( const CodeEntity
& i_ce
)
125 return property_cast(i_ce
).aStereotypes
.IsBound();
129 attr::IsConstrained( const CodeEntity
& i_ce
)
131 return property_cast(i_ce
).aStereotypes
.IsConstrained();
135 attr::IsMayBeAmbiguous( const CodeEntity
& i_ce
)
137 return property_cast(i_ce
).aStereotypes
.IsMayBeAmbiguous();
141 attr::IsMayBeDefault( const CodeEntity
& i_ce
)
143 return property_cast(i_ce
).aStereotypes
.IsMayBeDefault();
147 attr::IsMayBeVoid( const CodeEntity
& i_ce
)
149 return property_cast(i_ce
).aStereotypes
.IsMayBeVoid();
153 attr::IsRemovable( const CodeEntity
& i_ce
)
155 return property_cast(i_ce
).aStereotypes
.IsRemovable();
159 attr::IsTransient( const CodeEntity
& i_ce
)
161 return property_cast(i_ce
).aStereotypes
.IsTransient();
165 attr::Type( const CodeEntity
& i_ce
)
167 return property_cast(i_ce
).nType
;
170 } // namespace ifc_property