void WriteText(char *txt) { if (OutFile) { txt = CheckEntities(txt); fputs(txt, OutFile); } }
PyEntityFactory::PyEntityFactory( const char *pClassName, boost::python::object PyClass ) { m_pPyNext = NULL; m_ClassName[0] = 0; if( !pClassName ) { PyErr_SetString(PyExc_ValueError, "EntityFactory must have a valid name"); throw boost::python::error_already_set(); return; } V_strncpy( m_ClassName, pClassName, sizeof( m_ClassName ) ); m_PyClass = PyClass; // Remove old factory if any if( EntityFactoryDictionary()->FindFactory( m_ClassName ) ) EntityFactoryDictionary()->RemoveFactory( m_ClassName ); // Install new factory EntityFactoryDictionary()->InstallFactory( this, m_ClassName ); // Link m_pPyNext = g_pPyEntityFactoryHead; g_pPyEntityFactoryHead = this; // Init if( g_bDoNotInitPythonClasses == false) InitPyClass(); CheckEntities(); }