return true;
}
-Board* Board::getByURL( const QString& boardURL, const QString& boardName )
+Board* Board::getByURL( const QString& boardURL )
{
// FIXME: null¥ª¥Ö¥¸¥§¥¯¥È¤òÍ×µá¤Î¤¿¤Ó¤Ëºî¤Ã¤Æ¤¤¤ë¡£
if ( boardURL.isNull() ) {
return m_boardDict->find( boardURL );
}
- Board* newBoard = new Board( boardURL, boardName );
+ Board* newBoard = new Board( boardURL );
m_boardDict->insert( boardURL, newBoard );
return newBoard;
}
+void Board::setName( const QString& boardURL, const QString& boardName )
+{
+ if ( boardURL.isNull() ) {
+ return;
+ }
+
+ if ( m_boardDict == 0 ) {
+ // FIXME: setAutoDelete¤ò²Ã¤¨¤ÆÆ°¤¯¤³¤È¤ò³Î¤«¤á¤ë¤³¤È
+ m_boardDict = new QDict<Board>();
+ }
+
+ Board* newBoard = new Board( boardURL, boardName );
+ m_boardDict->replace( boardURL, newBoard );
+
+ return;
+}
+
NullBoard::NullBoard()
{
}
static bool test();
// Factory method
- static Board* getByURL( const QString& boardURL, const QString& boardName = QString::null );
+ static Board* getByURL( const QString& boardURL );
+ static void setName( const QString& boardURL, const QString& boardName );
};
class NullBoard : public Board