Exemplo n.º 1
0
Tile& LandOverlay::getTile() const
{
  _OC3_DEBUG_BREAK_IF( !_master_tile && "master tile must be exists" );
  return *_master_tile;
}
Exemplo n.º 2
0
TilePos LandOverlay::getTilePos() const
{
  _OC3_DEBUG_BREAK_IF( !_d->masterTile && "master tile can't be null" );
  return _d->masterTile ? _d->masterTile->getIJ() : TilePos( -1, -1 );
}
Exemplo n.º 3
0
void FilePath::rename( const FilePath& pathNew )
{
  _OC3_DEBUG_BREAK_IF( !isExist() );
  *this = pathNew;
}
Exemplo n.º 4
0
 // force compile error, prevent Variant(QVariant::Type, int) to be called
 inline Variant(bool, int) { _OC3_DEBUG_BREAK_IF(true); }
Exemplo n.º 5
0
 // force compile error, prevent Variant(bool) to be called
 inline Variant(void *) { _OC3_DEBUG_BREAK_IF(true); }
Exemplo n.º 6
0
const Picture& Tile::getPicture() const
{
  _OC3_DEBUG_BREAK_IF( !_picture && "error: picture is null");

  return *_picture;
}
Exemplo n.º 7
0
/**
 * parseString
 */
Variant Json::parseString(const std::string &json, int &index, bool &success)
{
        std::string s;
        char c;

        Json::eatWhitespace(json, index);

        c = json[index++];

        bool complete = false;
        while(!complete)
        {
                if(index == (int)json.size())
                {
                        break;
                }

                c = json[index++];

                if(c == '\"')
                {
                        complete = true;
                        break;
                }
                else if(c == '\\')
                {
                        if(index == (int)json.size())
                        {
                                break;
                        }

                        c = json[index++];

                        if( c == '\"' || c == '\\' )
                        {
                           s += c;
                        }
                        else if(c == '/')
                        {
                                s.append("/");
                        }
                        else if(c == 'b')
                        {
                                s.append("\b");
                        }
                        else if(c == 'f')
                        {
                                s.append("\f");
                        }
                        else if(c == 'n')
                        {
                                s.append("\n");
                        }
                        else if(c == 'r')
                        {
                                s.append("\r");
                        }
                        else if(c == 't')
                        {
                                s.append("\t");
                        }
                        else if(c == 'u')
                        {
//                                 int remainingLength = json.size() - index;
// 
//                                 if(remainingLength >= 4)
//                                 {
//                                         std::string unicodeStr = json.substr(index, 4);
// 
//                                         int symbol = StringHelper::fromHex( unicodeStr.c_str() );
// 
//                                         s.append( symbol );
// 
//                                         index += 4;
//                                 }
//                                 else
//                                 {
//                                         break;
//                                 }
                          _OC3_DEBUG_BREAK_IF( true && "yet not work")
                        }
                }
                else
                {
                        s += c;
                }
        }
Exemplo n.º 8
0
void Widget::remove()
{
    _OC3_DEBUG_BREAK_IF( !getParent() && "parent must be exist for element" );
    if( getParent() )
        getParent()->removeChild( this );
}