Exemplo n.º 1
0
 // - LuaFunction::operator> -------------------------------------------------
 bool LuaFunction::operator> (const LuaFunction& rhs) const
 {
    if (functionType_ > rhs.functionType_)
       return true;
    else if (getSize() > rhs.getSize())
       return true;
    else if (getSize() < rhs.getSize())
       return false;
    else // getSize() == rhs.getSize()
       return memcmp (getData(), rhs.getData(), getSize()) > 0;
 }
Exemplo n.º 2
0
 // - LuaFunction::operator!= ------------------------------------------------
 bool LuaFunction::operator!= (const LuaFunction& rhs) const
 {
    return functionType_ != rhs.functionType_
       || getSize() != rhs.getSize()
       || memcmp (getData(), rhs.getData(), getSize()) != 0;
 }
Exemplo n.º 3
0
 LuaFunction::LuaFunction (const LuaFunction& other)
    : functionType_(other.functionType_),
      size_(other.getSize()), data_(new char[size_])
 {
    memcpy (data_.get(), other.getData(), getSize());
 }
Exemplo n.º 4
0
 // - LuaFunction::operator== ------------------------------------------------
 bool LuaFunction::operator== (const LuaFunction& rhs) const
 {
    return functionType_ == rhs.functionType_
       && getSize() == rhs.getSize()
       && memcmp (getData(), rhs.getData(), getSize()) == 0;
 }