Commit 2f4fe1af authored by hybrid's avatar hybrid

Move deprecated methods into non-virtual delegating methods.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3015 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 1e9b87e8
......@@ -92,31 +92,52 @@ namespace scene
//! Returns a mesh based on its name (often a filename).
/** \deprecated Use getMeshByName() instead. */
_IRR_DEPRECATED_ virtual IAnimatedMesh* getMeshByFilename(const io::path& filename) = 0;
_IRR_DEPRECATED_ IAnimatedMesh* getMeshByFilename(const io::path& filename)
{
return getMeshByName(filename);
}
//! Get the name of a loaded mesh, based on its index. (Name is often identical to the filename).
/** \deprecated Use getMeshName() instead. */
_IRR_DEPRECATED_ virtual const io::path& getMeshFilename(u32 index) const = 0;
_IRR_DEPRECATED_ const io::path& getMeshFilename(u32 index) const
{
return getMeshName(index).getName();
}
//! Get the name of a loaded mesh, if there is any. (Name is often identical to the filename).
/** \deprecated Use getMeshName() instead. */
_IRR_DEPRECATED_ virtual const io::path& getMeshFilename(const IAnimatedMesh* const mesh) const = 0;
_IRR_DEPRECATED_ const io::path& getMeshFilename(const IAnimatedMesh* const mesh) const
{
return getMeshName(mesh).getName();
}
//! Get the name of a loaded mesh, if there is any. (Name is often identical to the filename).
/** \deprecated Use getMeshName() instead. */
_IRR_DEPRECATED_ virtual const io::path& getMeshFilename(const IMesh* const mesh) const = 0;
_IRR_DEPRECATED_ const io::path& getMeshFilename(const IMesh* const mesh) const
{
return getMeshName(mesh).getName();
}
//! Renames a loaded mesh.
/** \deprecated Use renameMesh() instead. */
_IRR_DEPRECATED_ virtual bool setMeshFilename(u32 index, const io::path& filename) = 0;
_IRR_DEPRECATED_ bool setMeshFilename(u32 index, const io::path& filename)
{
return renameMesh(index, filename);
}
//! Renames a loaded mesh.
/** \deprecated Use renameMesh() instead. */
_IRR_DEPRECATED_ virtual bool setMeshFilename(const IAnimatedMesh* const mesh, const io::path& filename) = 0;
_IRR_DEPRECATED_ bool setMeshFilename(const IAnimatedMesh* const mesh, const io::path& filename)
{
return renameMesh(mesh, filename);
}
//! Renames a loaded mesh.
/** \deprecated Use renameMesh() instead. */
_IRR_DEPRECATED_ virtual bool setMeshFilename(const IMesh* const mesh, const io::path& filename) = 0;
_IRR_DEPRECATED_ bool setMeshFilename(const IMesh* const mesh, const io::path& filename)
{
return renameMesh(mesh, filename);
}
//! Returns a mesh based on its name.
/** \param name Name of the mesh. Usually a filename.
......
......@@ -108,56 +108,6 @@ IAnimatedMesh* CMeshCache::getMeshByIndex(u32 number)
}
//! Returns a mesh based on its file name.
IAnimatedMesh* CMeshCache::getMeshByFilename(const io::path& filename)
{
return getMeshByName(filename);
}
//! Returns name of a mesh based on its index number
const io::path& CMeshCache::getMeshFilename(u32 number) const
{
return getMeshName(number).getName();
}
//! Returns the filename of a loaded mesh, if there is any.
const io::path& CMeshCache::getMeshFilename(const IAnimatedMesh* const mesh) const
{
return getMeshName(mesh).getName();
}
//! Returns the filename of a loaded mesh, if there is any. Returns 0 if there is none.
const io::path& CMeshCache::getMeshFilename(const IMesh* const mesh) const
{
return getMeshName(mesh).getName();
}
//! Renames a loaded mesh, if possible.
bool CMeshCache::setMeshFilename(u32 index, const io::path& filename)
{
return renameMesh(index, filename);
}
//! Renames a loaded mesh, if possible.
bool CMeshCache::setMeshFilename(const IAnimatedMesh* const mesh, const io::path& filename)
{
return renameMesh(mesh, filename);
}
//! Renames a loaded mesh, if possible.
bool CMeshCache::setMeshFilename(const IMesh* const mesh, const io::path& filename)
{
return renameMesh(mesh, filename);
}
//! Returns a mesh based on its name.
IAnimatedMesh* CMeshCache::getMeshByName(const io::path& name)
{
......
......@@ -60,32 +60,6 @@ namespace scene
\return Returns pointer to the mesh or 0 if there is none with this number. */
virtual IAnimatedMesh* getMeshByIndex(u32 index);
//! Returns a mesh based on its file name.
/** \return Returns pointer to the mesh or 0 if there is none with this number. */
_IRR_DEPRECATED_ virtual IAnimatedMesh* getMeshByFilename(const io::path& filename);
//! Returns name of a mesh based on its index number.
/** \param index: Index of the mesh, number between 0 and getMeshCount()-1.
Note that this is only valid until a new mesh is loaded */
_IRR_DEPRECATED_ virtual const io::path& getMeshFilename(u32 index) const;
//! Returns the filename of a loaded mesh, if there is any.
/** Returns an empty path if there is none. */
_IRR_DEPRECATED_ virtual const io::path& getMeshFilename(const IAnimatedMesh* const mesh) const;
//! Returns the filename of a loaded mesh, if there is any.
/** Returns an empty path if there is none.*/
_IRR_DEPRECATED_ virtual const io::path& getMeshFilename(const IMesh* const mesh) const;
//! Renames a loaded mesh, if possible.
_IRR_DEPRECATED_ virtual bool setMeshFilename(u32 index, const io::path& filename);
//! Renames a loaded mesh, if possible.
_IRR_DEPRECATED_ virtual bool setMeshFilename(const IAnimatedMesh* const mesh, const io::path& filename);
//! Renames a loaded mesh, if possible.
_IRR_DEPRECATED_ virtual bool setMeshFilename(const IMesh* const mesh, const io::path& filename);
//! Returns a mesh based on its name.
/** \param name Name of the mesh. Usually a filename.
\return Pointer to the mesh or 0 if there is none with this number. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment