2002-11-01 16:15:51 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|
*
|
2005-09-07 15:06:00 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2005-09-07 15:06:00 +00:00
|
|
|
* $RCSfile: i_attribute.hxx,v $
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2007-11-02 14:11:28 +00:00
|
|
|
* $Revision: 1.4 $
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2007-11-02 14:11:28 +00:00
|
|
|
* last change: $Author: hr $ $Date: 2007-11-02 15:05:11 $
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2005-09-07 15:06:00 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
|
|
|
|
*
|
2005-09-07 15:06:00 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
|
* =============================================
|
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2005-09-07 15:06:00 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2005-09-07 15:06:00 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2005-09-07 15:06:00 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
|
* MA 02111-1307 USA
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef ARY_IDL_I_ATTRIBUTE_HXX
|
|
|
|
|
#define ARY_IDL_I_ATTRIBUTE_HXX
|
|
|
|
|
|
2007-11-02 14:11:28 +00:00
|
|
|
// BASE CLASSES
|
2002-11-01 16:15:51 +00:00
|
|
|
#include <ary/idl/i_ce.hxx>
|
2007-11-02 14:11:28 +00:00
|
|
|
|
|
|
|
|
|
2002-11-01 16:15:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace ary
|
|
|
|
|
{
|
|
|
|
|
namespace idl
|
|
|
|
|
{
|
|
|
|
|
namespace ifc_attribute
|
|
|
|
|
{
|
|
|
|
|
struct attr;
|
|
|
|
|
}
|
|
|
|
|
|
2007-11-02 14:11:28 +00:00
|
|
|
|
|
|
|
|
|
2002-11-01 16:15:51 +00:00
|
|
|
|
|
|
|
|
/** @resp
|
|
|
|
|
Represents an IDL property.
|
|
|
|
|
*/
|
|
|
|
|
class Attribute : public CodeEntity
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum E_ClassId { class_id = 2014 };
|
|
|
|
|
|
|
|
|
|
// LIFECYCLE
|
|
|
|
|
Attribute(
|
|
|
|
|
const String & i_sName,
|
2004-07-12 14:06:32 +00:00
|
|
|
Ce_id i_nInterface,
|
2002-11-01 16:15:51 +00:00
|
|
|
Ce_id i_nModule,
|
|
|
|
|
Type_id i_nType,
|
2004-07-12 14:06:32 +00:00
|
|
|
bool i_bReadonly,
|
|
|
|
|
bool i_bBound );
|
2002-11-01 16:15:51 +00:00
|
|
|
~Attribute();
|
2004-07-12 14:06:32 +00:00
|
|
|
// OPERATIONS
|
|
|
|
|
void Add_GetException(
|
|
|
|
|
Type_id i_nException );
|
|
|
|
|
void Add_SetException(
|
|
|
|
|
Type_id i_nException );
|
|
|
|
|
|
2002-11-01 16:15:51 +00:00
|
|
|
// INQUIRY
|
|
|
|
|
Type_id Type() const;
|
|
|
|
|
bool IsReadonly() const;
|
2004-07-12 14:06:32 +00:00
|
|
|
bool IsBound() const;
|
2002-11-01 16:15:51 +00:00
|
|
|
|
|
|
|
|
private:
|
2007-11-02 14:11:28 +00:00
|
|
|
// Interface csv::ConstProcessorClient:
|
|
|
|
|
virtual void do_Accept(
|
|
|
|
|
csv::ProcessorIfc & io_processor ) const;
|
|
|
|
|
// Interface ary::Object
|
|
|
|
|
virtual ClassId get_AryClass() const;
|
2002-11-01 16:15:51 +00:00
|
|
|
|
|
|
|
|
// Interface CodeEntity
|
|
|
|
|
virtual const String & inq_LocalName() const;
|
|
|
|
|
virtual Ce_id inq_NameRoom() const;
|
|
|
|
|
virtual Ce_id inq_Owner() const;
|
|
|
|
|
virtual E_SightLevel inq_SightLevel() const;
|
|
|
|
|
|
2004-07-12 14:06:32 +00:00
|
|
|
// Local
|
|
|
|
|
typedef std::vector< Type_id > ExceptionList;
|
2002-11-01 16:15:51 +00:00
|
|
|
friend struct ifc_attribute::attr;
|
|
|
|
|
|
|
|
|
|
// DATA
|
|
|
|
|
String sName;
|
|
|
|
|
Ce_id nOwner;
|
|
|
|
|
Ce_id nNameRoom;
|
|
|
|
|
|
|
|
|
|
Type_id nType;
|
2004-07-12 14:06:32 +00:00
|
|
|
ExceptionList aGetExceptions;
|
|
|
|
|
ExceptionList aSetExceptions;
|
2002-11-01 16:15:51 +00:00
|
|
|
bool bReadonly;
|
2004-07-12 14:06:32 +00:00
|
|
|
bool bBound;
|
2002-11-01 16:15:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-02 14:11:28 +00:00
|
|
|
// IMPLEMENTATION
|
2004-07-12 14:06:32 +00:00
|
|
|
inline void
|
|
|
|
|
Attribute::Add_GetException( Type_id i_nException )
|
|
|
|
|
{ aGetExceptions.push_back(i_nException); }
|
|
|
|
|
|
|
|
|
|
inline void
|
|
|
|
|
Attribute::Add_SetException( Type_id i_nException )
|
|
|
|
|
{ aSetExceptions.push_back(i_nException); }
|
|
|
|
|
|
2002-11-01 16:15:51 +00:00
|
|
|
inline Type_id
|
|
|
|
|
Attribute::Type() const
|
|
|
|
|
{ return nType; }
|
|
|
|
|
|
|
|
|
|
inline bool
|
|
|
|
|
Attribute::IsReadonly() const
|
|
|
|
|
{ return bReadonly; }
|
|
|
|
|
|
2004-07-12 14:06:32 +00:00
|
|
|
inline bool
|
|
|
|
|
Attribute::IsBound() const
|
|
|
|
|
{ return bBound; }
|
|
|
|
|
|
2002-11-01 16:15:51 +00:00
|
|
|
|
|
|
|
|
|
2007-11-02 14:11:28 +00:00
|
|
|
|
|
|
|
|
} // namespace idl
|
|
|
|
|
} // namespace ary
|
2002-11-01 16:15:51 +00:00
|
|
|
#endif
|