From: <sv...@ww...> - 2004-07-25 22:33:43
|
Author: mkrose Date: 2004-07-25 15:33:36 -0700 (Sun, 25 Jul 2004) New Revision: 1184 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/TaggedRecord.h trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h Log: Fix ambiguous use of Ref for MSVC. Use FactoryList typedef in TaggedRecordRegistry. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1184 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-07-25 20:34:10 UTC (rev 1183) +++ trunk/CSP/SimData/CHANGES.current 2004-07-25 22:33:36 UTC (rev 1184) @@ -9,6 +9,9 @@ * Fix parsing of options by the tagged record compiler to allow namespace prefixes on base classes. + * Fix ambiguous use of Ref for MSVC. Use FactoryList typedef in + TaggedRecordRegistry. + 2004-07-21: onsight * Add missing include. Modified: trunk/CSP/SimData/Include/SimData/TaggedRecord.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-07-25 20:34:10 UTC (rev 1183) +++ trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-07-25 22:33:36 UTC (rev 1184) @@ -445,7 +445,7 @@ virtual void dump(std::ostream &, int indent=0) const=0; virtual int getCustomId() const=0; template <class TR> - static inline Ref<TR> FastCast(Ref const &record) { + static inline simdata::Ref<TR> FastCast(Ref const &record) { return (record->getId() == TR::_getId() ? static_cast<TR*>(record.get()) : 0); } protected: Modified: trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-07-25 20:34:10 UTC (rev 1183) +++ trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-07-25 22:33:36 UTC (rev 1184) @@ -116,8 +116,8 @@ /** Get a list of all interfaces in the registry. */ - std::vector<TaggedRecordFactoryBase *> getFactories() const { - std::vector<TaggedRecordFactoryBase *> list; + FactoryList getFactories() const { + FactoryList list; FactoryIdMap::const_iterator it = _id_map.begin(); for (; it != _id_map.end(); ++it) { list.push_back(it->second); |