Consider the Map class. You can pass in a Camera by reference or as a pointer. It really wont matter. What matters is what happens with the Camera passed in. Are you going to assign it to a member that is a Camera*? Otherwise, setting the Camera in the constructor will not accomplish much. You will have to supply a Camera pointer/reference with every call to Map that requires a Camera.
For storing Tile objects, a single dimension std::vector<> will do just fine. By using some simple math, this tile grid can be traversed quite easily. Nesting another vector inside will only cause unnecessary overhead. Here is a sample algorithm for doing so:
std::vector<Tile> tiles = makeTiles();
for (int y=0; y<mapHeight; y++)
{
for (int x=0; x<mapWidth; x++)
{
Tile tile = tiles.at(x + y*mapWidth);
tile.doSomethingWithTile();
}
}
Deciding on how to get tile data from your Map to a PathFinder is really a matter of how well you want to protect your Map's data. By giving out a reference to to all the tile data, you are essentially making it public access. Since the PathFinder needs to edit individual tiles but not the entire tile array itself, a better approach would be to have a method like this:
Tile* Map::AccessTile(int tx, int ty);
This way, the entire vector of tile data is not exposed, but PathFinder will be able to get at what it needs. Additionally, Map::AccessTile() could be made private, and PathFinder declared as a friend to Map. The other approach is to provide methods like Map::SetTileF(int tx, int ty, float f). This can be tedious though.
For NPC and Player, a similar solution is available. They don't actually need to have direct write access to the tile they are on. Add a method like Map::SetTileOccupant(Entity *entity) and a corresponding Map::GetTileOccupant().
Now your concern about deleting objects. You should take a look at some of the emulated pointers provided by C++ (specifically std::shared_ptr<> and std::weak_ptr<>). A quick explanation of these is shared_ptr is a pointer that "owns" an object and a weak_ptr knows where to access the object, but doesn't actually "own" the object.
With these emulated pointers, you can do something like the following:
//prototype for setWorld
//note that shared_ptr<> casts to weak_ptr<> nicely
Camera::setWorld(std::weak_ptr<World> world);
//setup the camera and world
std::shared_ptr<World> world(new World);
Camera camera;
camera.setWorld(world);
With the above code, camera has a pointer to the world. If world is deleted for some reason, camera can figure this out by the following method:
bool Camera::worldIsValid()
{
return (this->mWorld.expired() == false);
}
Also, you are encapsulating the Camera inside of a World and that is probably something you don't need to do. Instead, Camera could be standalone and just refer to a World whenever it needs information about it or the Map contained in World.