コード例 #1
0
ファイル: element.cpp プロジェクト: aopui/gnash
/// \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);
}
コード例 #2
0
ファイル: element.cpp プロジェクト: aopui/gnash
/// \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);
}
コード例 #3
0
ファイル: element.cpp プロジェクト: aopui/gnash
/// \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);
}
コード例 #4
0
ファイル: element.cpp プロジェクト: aopui/gnash
/// \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);
}
コード例 #5
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isCompoundProcedure(Register result, Register procedure)
{
    makeBoolean(result, isTaggedList(procedure, "procedure"));
}
コード例 #6
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isLastOperand(Register result, Register ops)
{
    cdr(result, ops);
    makeBoolean(result, isNull(result));
}
コード例 #7
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isQuoted(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "quote"));
}
コード例 #8
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isNoOperands(Register result, Register ops)
{
    makeBoolean(result, isNull(ops));
}
コード例 #9
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isApplication(Register result, Register exp)
{
    makeBoolean(result, isPair(exp));
}
コード例 #10
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isLastExp(Register result, Register exp)
{
    cdr(result, exp);
    makeBoolean(result, isNull(result));
}
コード例 #11
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isVariable(Register result, Register exp)
{
    makeBoolean(result, isSymbol(exp));
}
コード例 #12
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isIf(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "if"));
}
コード例 #13
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isLambda(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "lambda"));
}
コード例 #14
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isSelfEvaluating(Register result, Register exp)
{
    makeBoolean(result, (isNumber(exp) || isString(exp)));
}
コード例 #15
0
ファイル: element.cpp プロジェクト: aopui/gnash
/// \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);
}
コード例 #16
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isAssignment(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "set!"));
}
コード例 #17
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isDefinition(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "define"));
}
コード例 #18
0
ファイル: syntax.c プロジェクト: jarvinet/scheme
void isBegin(Register result, Register exp)
{
    makeBoolean(result, isTaggedList(exp, "begin"));
}