Example #1
0
/// \brief Contruct a Property from a Boolean
///
/// @param name The name of the Property
///
/// @param data The boolean to use as the value of the property.
Element::Element(const string &name, bool indata)
    : _name(nullptr),
      _type(NOTYPE)
{
//    GNASH_REPORT_FUNCTION;
    makeBoolean(name, indata);
}
Example #2
0
/// \brief Contruct an AMF Element from a Boolean
///
/// @param data The boolean to use as the value for this Element.
Element::Element(bool data)
    : _name(nullptr),
      _type(NOTYPE)
{
//    GNASH_REPORT_FUNCTION;
    makeBoolean(data);
}
Example #3
0
/// \brief Make this Element with a boolean value.
///	The size isn't needed as a boolean is always the same size.
///
/// @param data A real pointer to the boolean use as the value.
///
/// @return A reference to this Element.
Element &
Element::makeBoolean(std::uint8_t *data)
{
//    GNASH_REPORT_FUNCTION;
    bool flag = *reinterpret_cast<const bool*>(data);
    
    return makeBoolean(flag);
}
Example #4
0
/// \brief Make this Element a Property with a boolean value
///
/// @param name The name of the Property
///
/// @param data The boolean to use as the value of the property.
///
/// @return A reference to this Element.
Element &
Element::makeBoolean(const string &name, bool flag)
{
//    GNASH_REPORT_FUNCTION;
    if (name.size()) {
        setName(name);
    }
    return makeBoolean(flag);
}
Example #5
0
void isCompoundProcedure(Register result, Register procedure)
{
    makeBoolean(result, isTaggedList(procedure, "procedure"));
}
Example #6
0
void isLastOperand(Register result, Register ops)
{
    cdr(result, ops);
    makeBoolean(result, isNull(result));
}
Example #7
0
void isQuoted(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "quote"));
}
Example #8
0
void isNoOperands(Register result, Register ops)
{
    makeBoolean(result, isNull(ops));
}
Example #9
0
void isApplication(Register result, Register exp)
{
    makeBoolean(result, isPair(exp));
}
Example #10
0
void isLastExp(Register result, Register exp)
{
    cdr(result, exp);
    makeBoolean(result, isNull(result));
}
Example #11
0
void isVariable(Register result, Register exp)
{
    makeBoolean(result, isSymbol(exp));
}
Example #12
0
void isIf(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "if"));
}
Example #13
0
void isLambda(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "lambda"));
}
Example #14
0
void isSelfEvaluating(Register result, Register exp)
{
    makeBoolean(result, (isNumber(exp) || isString(exp)));
}
Example #15
0
/// \brief Make this Element be the same as a boolean value.
///		This sets both the data type and the value.
///
/// @param el A boolean value.
///
/// @return A reference to this Element.
Element &
Element::operator=(bool flag)
{
    return makeBoolean(flag);
}
Example #16
0
void isAssignment(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "set!"));
}
Example #17
0
void isDefinition(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "define"));
}
Example #18
0
void isBegin(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "begin"));
}