bump product version to 4.1.6.2
[LibreOffice.git] / autodoc / inc / ary / idl / i_interface.hxx
blob1d3ca93a67e6311ccc88bf1dbec4c8d725d91ae3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef ARY_IDL_I_INTERFACE_HXX
21 #define ARY_IDL_I_INTERFACE_HXX
23 // BASE CLASSES
24 #include <ary/idl/i_ce.hxx>
26 // USED SERVICES
27 #include <ary/idl/i_comrela.hxx>
28 #include <ary/stdconstiter.hxx>
33 namespace ary
35 namespace idl
37 namespace ifc_interface
39 struct attr;
41 class Interface_2s;
44 /** Represents an IDL interface.
46 class Interface : public CodeEntity
48 public:
49 enum E_ClassId { class_id = 2001 };
51 // LIFECYCLE
52 Interface(
53 const String & i_sName,
54 Ce_id i_nOwner );
55 ~Interface();
56 // INQUIRY
57 bool HasBase() const;
59 // ACCESS
60 void Add_Function(
61 Ce_id i_nId );
62 void Add_Attribute(
63 Ce_id i_nId );
64 void Add_Base(
65 Type_id i_nInterface,
66 DYN doc::OldIdlDocu *
67 pass_dpDocu );
69 private:
70 // Interface csv::ConstProcessorClient:
71 virtual void do_Accept(
72 csv::ProcessorIfc & io_processor ) const;
73 // Interface ary::Object:
74 virtual ClassId get_AryClass() const;
76 // Interface CodeEntity:
77 virtual const String & inq_LocalName() const;
78 virtual Ce_id inq_NameRoom() const;
79 virtual Ce_id inq_Owner() const;
80 virtual E_SightLevel inq_SightLevel() const;
82 // Local
83 typedef std::vector< CommentedRelation > RelationList;
84 typedef std::vector<Ce_id> MemberList;
85 friend struct ifc_interface::attr;
87 // DATA
88 String sName;
89 Ce_id nOwner;
90 RelationList aBases;
91 MemberList aFunctions;
92 MemberList aAttributes;
93 Dyn<Interface_2s> p2s;
99 // IMPLEMENTATION
100 inline bool
101 Interface::HasBase() const
102 { return aBases.size() > 0; }
103 inline void
104 Interface::Add_Function( Ce_id i_nId )
105 { aFunctions.push_back(i_nId); }
106 inline void
107 Interface::Add_Attribute( Ce_id i_nId )
108 { aAttributes.push_back(i_nId); }
109 inline void
110 Interface::Add_Base( Type_id i_nInterface,
111 DYN doc::OldIdlDocu * pass_dpDocu )
112 { aBases.push_back( CommentedRelation(i_nInterface, pass_dpDocu) ); }
117 } // namespace idl
118 } // namespace ary
119 #endif
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */