Example #1
0
    /**
     * @brief VirtualDirectory::operator =
     * @param rhs
     * @return
     */
    VirtualDirectory &VirtualDirectory::operator =(VirtualDirectory rhs)
    {
        VirtualFileSystemAbstractItem::operator =(rhs);
        moveFrom(std::move(rhs));

        return *this;
    }
Example #2
0
	queue& operator =(queue&& other)
	{
		if (this != other) {
			moveFrom(other);
		}
		return *this;
	}
Example #3
0
void moveFrom(int x, int y, int step){
	int i,tempx,tempy;
	printf("%d %d--->\n", x, y);
	int tempboard[8][8];
	memset(tempboard, 0, sizeof(tempboard));
	for(i=0; i<8; i++){
		tempx = x+dx[i];
		tempy = y+dy[i];
		if(!inRange(tempx, tempy)) continue;
		if(board[tempx][tempy] == -1){
			printf("%d %d\n", tempx, tempy);
			board[tempx][tempy] = step;
			tempboard[tempx][tempy] = -1;
		}
	}
	printBoard();
	for(i=0; i<8; i++){
		tempx = x+dx[i];
		tempy = y+dy[i];
		if(!inRange(tempx, tempy)) continue;
		if(tempboard[tempx][tempy] == -1){
			moveFrom(tempx, tempy, step+1);
		}
	}
}
Example #4
0
    /**
     * @brief Database::operator =
     * @param rhs
     * @return
     */
    Database &Database::operator =(Database &&rhs)
    {
        if (this != &rhs)
            moveFrom(rhs);

        return *this;
    }
Example #5
0
    /**
     * @brief ProjectDatabase::operator =
     * @param rhs
     * @return
     */
    ProjectDatabase &ProjectDatabase::operator =(ProjectDatabase &&rhs)
    {
        if (this != &rhs)
            moveFrom(rhs);

        return *this;
    }
Example #6
0
    /**
     * @brief Class::operator =
     * @param rhs
     * @return
     */
    Class &Class::operator =(Class &&rhs)
    {
        if (this != &rhs)
            moveFrom(std::move(rhs));

        return *this;
    }
Example #7
0
    /**
     * @brief Type::operator =
     * @param rhs
     * @return
     */
    Type &Type::operator =(Type &&rhs)
    {
        if (this != &rhs)
            moveFrom(std::move(rhs));

        return *this;
    }
Example #8
0
void Game::getCoordinates(){
	moveFrom();
	moveTo();	
	moveFromX = repairCoordinatesX( moveFromX );
	moveToX = repairCoordinatesX( moveToX );
	moveFromY = repairCoordinatesY( moveFromY );
	moveToY = repairCoordinatesY( moveToY);	
}
Example #9
0
    /**
     * @brief VirtualDirectory::operator =
     * @param rhs
     * @return
     */
    VirtualDirectory &VirtualDirectory::operator =(VirtualDirectory &&rhs) noexcept
    {
        if (this != &rhs) {
            VirtualFileSystemAbstractItem::operator =(rhs);
            moveFrom(std::move(rhs));
        }

        return *this;
    }
Example #10
0
    /**
     * @brief ClassMethod::operator =
     * @param rhs
     * @return
     */
    ClassMethod &ClassMethod::operator =(ClassMethod &&rhs)
    {
        if (this != &rhs) {
            static_cast<BasicElement*>(this)->operator =(std::forward<ClassMethod>(rhs));
            moveFrom(std::forward<ClassMethod>(rhs));
        }

        return *this;
    }
Example #11
0
int main(){
	int x1, y1, x2, y2;
	s(x1), s(y1), s(x2), s(y2);
	x1--, y1--, x2--, y2--;
	memset(board, -1, sizeof(board));
	board[x1][y1]=0;
	moveFrom(x1,y1,1);
	//printf("No of steps : %d\n", board[x2][y2]);
	printBoard();
}
Example #12
0
//predator.cc
void Predator::process(void) {
  Coordinate toCoord;
  if (--timeToFeed <= 0) {
    assignCellAt(*offset, new Cell(*offset));
    Ocean1->setNumPredators(Ocean1->getNumPredators()-1);
    delete this;
  }
  else {
    toCoord = getPreyNeighborCoord();
    if (toCoord != *offset) {
      Ocean1->setNumPrey(Ocean1->getNumPrey()-1);
      timeToFeed = TimeToFeed;
      moveFrom(*offset, toCoord);
    }
    else
      Prey::process();
  }
}
Example #13
0
 /**
  * @brief VirtualDirectory::VirtualDirectory
  * @param src
  */
 VirtualDirectory::VirtualDirectory(VirtualDirectory &&src) noexcept
     : VirtualFileSystemAbstractItem(src)
 {
     moveFrom(std::move(src));
 }
Example #14
0
 void operator = (const GrowingAllocator &other)
 {
     moveFrom(const_cast<GrowingAllocator &>(other));
 }
Example #15
0
 /**
  * @brief ProjectDatabase::ProjectDatabase
  * @param src
  */
 ProjectDatabase::ProjectDatabase(ProjectDatabase &&src)
 {
     moveFrom(src);
 }
Example #16
0
 // coverity[pass_by_value]
 ProjectDatabase &ProjectDatabase::operator =(ProjectDatabase rhs)
 {
     moveFrom(rhs);
     return *this;
 }
Example #17
0
 /**
  * @brief Class::Class
  * @param src
  */
 Class::Class(Class &&src)
 {
     moveFrom(std::move(src));
 }
Example #18
0
 /**
  * @brief Database::operator =
  * @param rhs
  * @return
  */
 Database &Database::operator =(Database rhs)
 {
     moveFrom(rhs);
     return *this;
 }
Example #19
0
 /**
  * @brief Database::Database
  * @param src
  */
 Database::Database(Database &&src)
 {
     moveFrom(src);
 }
Example #20
0
 /**
  * @brief ClassMethod::ClassMethod
  * @param src
  */
 ClassMethod::ClassMethod(ClassMethod &&src)
     : BasicElement(std::move(src))
 {
     moveFrom(std::move(src));
 }
Example #21
0
	queue(queue&& other)
	{
		moveFrom(other);
	}
Example #22
0
 /**
  * @brief Type::Type
  * @param src
  */
 Type::Type(Type &&src)
 {
    moveFrom(std::move(src));
 }