2002-11-01 16:15:51 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-07 15:11:33 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2005-09-07 15:11:33 +00:00
|
|
|
* $RCSfile: i_singleton.hxx,v $
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2007-11-02 14:10:19 +00:00
|
|
|
* $Revision: 1.3 $
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2007-11-02 14:10:19 +00:00
|
|
|
* last change: $Author: hr $ $Date: 2007-11-02 15:10:19 $
|
2002-11-01 16:15:51 +00:00
|
|
|
*
|
2005-09-07 15:11:33 +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:11:33 +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:11:33 +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:11:33 +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:11:33 +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_SINGLETON_HXX
|
|
|
|
#define ARY_IDL_I_SINGLETON_HXX
|
|
|
|
|
2007-11-02 14:10:19 +00:00
|
|
|
// BASE CLASSES
|
|
|
|
#include <ary/idl/i_ce.hxx>
|
|
|
|
|
2002-11-01 16:15:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace ary
|
|
|
|
{
|
|
|
|
namespace idl
|
|
|
|
{
|
|
|
|
namespace ifc_singleton
|
|
|
|
{
|
|
|
|
struct attr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-11-02 14:10:19 +00:00
|
|
|
/** Represents an IDL singleton.
|
2002-11-01 16:15:51 +00:00
|
|
|
*/
|
|
|
|
class Singleton : public CodeEntity
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum E_ClassId { class_id = 2013 };
|
|
|
|
|
|
|
|
// LIFECYCLE
|
|
|
|
Singleton(
|
|
|
|
const String & i_sName,
|
|
|
|
Ce_id i_nOwner );
|
|
|
|
~Singleton();
|
|
|
|
// INQUIRY
|
|
|
|
Type_id AssociatedService() const
|
|
|
|
{ return nService; }
|
|
|
|
|
|
|
|
// ACCESS
|
|
|
|
void Set_Service(
|
|
|
|
Type_id i_nService );
|
|
|
|
private:
|
2007-11-02 14:10:19 +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;
|
|
|
|
|
|
|
|
// Locals
|
|
|
|
friend struct ifc_singleton::attr;
|
|
|
|
|
|
|
|
// DATA
|
|
|
|
String sName;
|
|
|
|
Ce_id nOwner;
|
|
|
|
|
|
|
|
Type_id nService;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-02 14:10:19 +00:00
|
|
|
// IMPLEMENTATION
|
2002-11-01 16:15:51 +00:00
|
|
|
inline void
|
|
|
|
Singleton::Set_Service( Type_id i_nService )
|
2007-11-02 14:10:19 +00:00
|
|
|
{
|
|
|
|
nService = i_nService;
|
|
|
|
}
|
2002-11-01 16:15:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-02 14:10:19 +00:00
|
|
|
|
|
|
|
} // namespace idl
|
|
|
|
} // namespace ary
|
2002-11-01 16:15:51 +00:00
|
|
|
#endif
|