merge the formfield patch from ooo-build
[ooovba.git] / autodoc / inc / ary / cpp / c_osigna.hxx
blobb43212d0b022e7be7457ee336b20232bf79872e3
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: c_osigna.hxx,v $
10 * $Revision: 1.4 $
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 #ifndef ARY_CPP_C_OSIGNA_HXX
32 #define ARY_CPP_C_OSIGNA_HXX
34 // USED SERVICES
35 // BASE CLASSES
36 // OTHER
37 #include <ary/cpp/c_types4cpp.hxx>
39 namespace ary
41 namespace cpp
43 class Gate;
49 namespace ary
51 namespace cpp
55 /** The signature of a C++ function. That is: parameter types and
56 const/volatile modifiers.
58 class OperationSignature
60 public:
61 typedef std::vector<Type_id> ParameterTypeList;
63 OperationSignature(
64 ParameterTypeList i_parameterTypes, // Non const, because it will be swapped with aParameterTypes.
65 E_ConVol i_conVol );
67 bool operator==(
68 const OperationSignature &
69 i_rSig ) const;
70 bool operator<(
71 const OperationSignature &
72 i_rSig ) const;
74 // INQUIRY
75 const ParameterTypeList &
76 Parameters() const;
77 E_ConVol ConVol() const;
79 /** Compares the signatures by length an then by ids of
80 parameter types. So the result is not always human
81 reconstructable.
82 @return like in strcmp().
84 int Compare(
85 const OperationSignature &
86 i_rSig ) const;
87 private:
88 // DATA
89 ParameterTypeList aParameterTypes;
90 E_ConVol eConVol;
96 // IMPLEMENTATION
97 inline bool
98 OperationSignature::operator==( const OperationSignature & i_rSign ) const
100 return Compare(i_rSign) == 0;
103 inline bool
104 OperationSignature::operator<( const OperationSignature & i_rSign ) const
106 return Compare(i_rSign) < 0;
109 inline const OperationSignature::ParameterTypeList &
110 OperationSignature::Parameters() const
112 return aParameterTypes;
115 inline E_ConVol
116 OperationSignature::ConVol() const
118 return eConVol;
123 } // namespace cpp
124 } // namespace ary
125 #endif