32 template<
class XWriter >
39 void SetWriter(XWriter* writer);
46 template<
class XWriter >
53 template<
class XWriter >
58 template<
class XWriter >
71 KTWriter(
const std::string& name =
"default-writer-name");
76 template<
class XWriter,
class XTypist >
85 template<
class XTypeWriter >
86 XTypeWriter* GetTypeWriter();
94 template<
class XWriter,
class XTypist >
104 XTypist* newTypeWriter = twFactory->
Create(factoryIt);
105 newTypeWriter->SetWriter(static_cast< XWriter* >(
this));
106 newTypeWriter->RegisterSlots();
107 fTypeWriters.insert(
typename TypeWriterMap::value_type(factoryIt->first, newTypeWriter));
111 template<
class XWriter,
class XTypist >
121 template<
class XWriter,
class XTypist >
122 template<
class XTypeWriter >
125 typename TypeWriterMap::const_iterator it =
fTypeWriters.find(&
typeid(XTypeWriter));
130 return static_cast< XTypeWriter*
>(it->second);
134 #define KT_REGISTER_WRITER(writer_class, writer_name) \ 135 static ::scarab::registrar< ::Nymph::KTWriter, writer_class, const std::string& > s##writer_class##WriterRegistrar(writer_name); TypeWriterMap fTypeWriters
FactoryMap::const_iterator FactoryCIt
void SetWriter(XWriter *writer)
FactoryCIt GetFactoryMapEnd() const
KTWriterWithTypists(const std::string &name="default-writer-with-typists-name")
virtual ~KTDerivedTypeWriter()
std::map< const std::type_info *, XTypist *> TypeWriterMap
virtual ~KTWriterWithTypists()
FactoryCIt GetFactoryMapBegin() const
virtual void RegisterSlots()=0
XTypeWriter * GetTypeWriter()