18 #ifndef YCPCodeCompare_h
19 #define YCPCodeCompare_h
31 class YCPCodeCompare :
public std::binary_function <const YCPValue &, const YCPValue &, bool>
41 : se1 (asym1->asEntry ()->entry ())
42 , se2 (asym2->asEntry ()->entry ())
48 second_argument_type b)
56 ycp2error (
"Bad sort order %s", order->toString ().c_str ());
60 if (!ret->isBoolean ())
62 ycp2error (
"sort(): order %s evaluates to %s, which is not a boolean", order->toString ().c_str ()
63 , ret->toString ().c_str ());
67 return ret->asBoolean ()->value ();
SymbolEntryPtr se1
Definition: YCPCodeCompare.h:34
Definition: YCPCodeCompare.h:31
YCPCode order
Definition: YCPCodeCompare.h:36
#define ycp2error(format, args...)
Definition: libycp/src/include/ycp/y2log.h:41
SymbolEntryPtr se2
Definition: YCPCodeCompare.h:35
Wrapper for YCPCodeRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPCodeRep with the arrow operator. See YCPCodeRep.
Definition: YCPCode.h:96
bool isNull() const
Definition: YCPElement.h:347
Wrapper for YCPValueRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPValueRep with the arrow operator. See YCPValueRep.
Definition: YCPValue.h:275
result_type operator()(first_argument_type a, second_argument_type b)
Definition: YCPCodeCompare.h:47
YCPCodeCompare(const YCPValue &asym1, const YCPValue &asym2, const YCPCode &aorder)
Definition: YCPCodeCompare.h:39