| 1 |
# Copyright (C) 2008-2010 Modestas Vainius <[email protected]> |
| 2 |
# |
| 3 |
# This program is free software: you can redistribute it and/or modify |
| 4 |
# it under the terms of the GNU General Public License as published by |
| 5 |
# the Free Software Foundation, either version 3 of the License, or |
| 6 |
# (at your option) any later version. |
| 7 |
# |
| 8 |
# This program is distributed in the hope that it will be useful, |
| 9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
# GNU General Public License for more details. |
| 12 |
# |
| 13 |
# You should have received a copy of the GNU General Public License |
| 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/> |
| 15 |
|
| 16 |
package Debian::PkgKde::SymbolsHelper::Substs; |
| 17 |
|
| 18 |
use strict; |
| 19 |
use warnings; |
| 20 |
use Debian::PkgKde::SymbolsHelper::Substs::TypeSubst; |
| 21 |
use base 'Exporter'; |
| 22 |
|
| 23 |
our @EXPORT = qw(%SUBSTS @SUBSTS @STANDALONE_SUBSTS @TYPE_SUBSTS @CPP_TYPE_SUBSTS); |
| 24 |
|
| 25 |
my $NS = 'Debian::PkgKde::SymbolsHelper::Substs'; |
| 26 |
|
| 27 |
our @STANDALONE_SUBSTS = ( |
| 28 |
); |
| 29 |
|
| 30 |
our @TYPE_SUBSTS = ( |
| 31 |
"${NS}::TypeSubst::size_t"->new(), |
| 32 |
"${NS}::TypeSubst::ssize_t"->new(), |
| 33 |
"${NS}::TypeSubst::int64_t"->new(), |
| 34 |
"${NS}::TypeSubst::uint64_t"->new(), |
| 35 |
"${NS}::TypeSubst::qptrdiff"->new(), |
| 36 |
"${NS}::TypeSubst::quintptr"->new(), |
| 37 |
"${NS}::TypeSubst::intptr_t"->new(), |
| 38 |
"${NS}::TypeSubst::qreal"->new(), |
| 39 |
"${NS}::TypeSubst::long_double"->new(), |
| 40 |
"${NS}::TypeSubst::time_t"->new(), |
| 41 |
); |
| 42 |
|
| 43 |
our @CPP_TYPE_SUBSTS; |
| 44 |
foreach my $subst (@TYPE_SUBSTS) { |
| 45 |
push @CPP_TYPE_SUBSTS, "${NS}::TypeSubst::Cpp"->new($subst); |
| 46 |
} |
| 47 |
|
| 48 |
our @SUBSTS = ( |
| 49 |
@STANDALONE_SUBSTS, |
| 50 |
@TYPE_SUBSTS, |
| 51 |
); |
| 52 |
|
| 53 |
our %SUBSTS; |
| 54 |
foreach my $subst (@SUBSTS, @CPP_TYPE_SUBSTS) { |
| 55 |
$SUBSTS{$subst->get_name()} = $subst; |
| 56 |
} |
| 57 |
|
| 58 |
1; |