slot_requirement.hh

00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 2008 Ciaran McCreesh
00005  *
00006  * This file is part of the Paludis package manager. Paludis is free software;
00007  * you can redistribute it and/or modify it under the terms of the GNU General
00008  * Public License version 2, as published by the Free Software Foundation.
00009  *
00010  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
00011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00012  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00013  * details.
00014  *
00015  * You should have received a copy of the GNU General Public License along with
00016  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00017  * Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00020 #ifndef PALUDIS_GUARD_PALUDIS_SLOT_REQUIREMENT_HH
00021 #define PALUDIS_GUARD_PALUDIS_SLOT_REQUIREMENT_HH 1
00022 
00023 #include <paludis/slot_requirement-fwd.hh>
00024 #include <paludis/name-fwd.hh>
00025 #include <paludis/util/simple_visitor.hh>
00026 #include <paludis/util/type_list.hh>
00027 
00028 namespace paludis
00029 {
00030     class PALUDIS_VISIBLE SlotRequirement :
00031         public virtual DeclareAbstractAcceptMethods<SlotRequirement, MakeTypeList<
00032             SlotExactRequirement, SlotAnyLockedRequirement, SlotAnyUnlockedRequirement>::Type>
00033     {
00034         public:
00035             virtual const std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
00036     };
00037 
00038     class PALUDIS_VISIBLE SlotExactRequirement :
00039         public SlotRequirement,
00040         public ImplementAcceptMethods<SlotRequirement, SlotExactRequirement>
00041     {
00042         public:
00043             virtual const SlotName slot() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
00044     };
00045 
00046     class PALUDIS_VISIBLE SlotAnyLockedRequirement :
00047         public SlotRequirement,
00048         public ImplementAcceptMethods<SlotRequirement, SlotAnyLockedRequirement>
00049     {
00050     };
00051 
00052     class PALUDIS_VISIBLE SlotAnyUnlockedRequirement :
00053         public SlotRequirement,
00054         public ImplementAcceptMethods<SlotRequirement, SlotAnyUnlockedRequirement>
00055     {
00056     };
00057 }
00058 
00059 #endif

Generated on Mon Sep 21 10:36:08 2009 for paludis by  doxygen 1.5.4