Changed: #1440 Constness

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 3184ce4edc
commit 6ee389a1cf

@ -85,8 +85,13 @@ void CAnimatable::init()
CSceneClass::init();
}
// inherited
const ISceneClassDesc *CAnimatable::classDesc()
bool CAnimatable::inherits(const NLMISC::CClassId classId) const
{
if (classId == classDesc()->classId()) return true;
return CSceneClass::inherits(classId);
}
const ISceneClassDesc *CAnimatable::classDesc() const
{
return &AnimatableClassDesc;
}

@ -66,7 +66,8 @@ public:
virtual void build(uint16 version);
virtual void disown();
virtual void init();
virtual const ISceneClassDesc *classDesc();
virtual bool inherits(const NLMISC::CClassId classId) const;
virtual const ISceneClassDesc *classDesc() const;
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
}; /* class CAnimatable */

@ -181,7 +181,7 @@ IStorageObject *CSceneClass::createChunkById(uint16 id, bool container)
return CStorageContainer::createChunkById(id, container);
}
const ucchar *CSceneClass::DisplayName = ucstring("Scene Class").c_str();
const ucchar *CSceneClass::DisplayName = ucstring("Invalid Scene Class").c_str();
const char *CSceneClass::InternalName = "SceneClass";
const NLMISC::CClassId CSceneClass::ClassId = NLMISC::CClassId::Null; // This class is invalid
const TSClassId CSceneClass::SuperClassId = 0x0000; // This class is invalid
@ -190,7 +190,12 @@ namespace {
static const CSceneClassDesc<CSceneClass> SceneClassDesc(static_cast<const IDllPluginDescInternal *>(&DllPluginDescBuiltin));
} /* anonymous namespace */
const ISceneClassDesc *CSceneClass::classDesc()
bool CSceneClass::inherits(const NLMISC::CClassId classId) const
{
return false;
}
const ISceneClassDesc *CSceneClass::classDesc() const
{
return static_cast<const ISceneClassDesc *>(&SceneClassDesc);
}

@ -91,8 +91,10 @@ public:
//! \name More virtual functionality for inheriting classes to implement
//@{
/// Returns whether the class inherits from a class with given class id
virtual bool inherits(const NLMISC::CClassId classId) const;
/// Return the class description of the inheriting class
virtual const ISceneClassDesc *classDesc();
virtual const ISceneClassDesc *classDesc() const;
/// Create a readable representation of this class
virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const;
//@}

@ -100,7 +100,7 @@ public:
virtual ~CSceneClassUnknown() { }
// inherited
virtual const ISceneClassDesc *classDesc() { return &m_Desc; }
virtual const ISceneClassDesc *classDesc() const { return &m_Desc; }
private:
CSceneClassUnknownDesc m_Desc;

Loading…
Cancel
Save