#ifdef USE_PCH #include "pch.h" #else #include #include #include using namespace std; #include "sitecing/acomponent.h" #endif namespace sitecing { acomponent::acomponent() : __SCIF(NULL) { } acomponent::~acomponent() { } void acomponent::__set_interface(sitecing_interface* scif) { sitecing_interface *o = __SCIF; __SCIF = scif; if(o!=scif) { __on_change_interface(o); __do_imports(); __on_imports(); } } void acomponent::__on_change_interface(sitecing_interface *oscif) { } void acomponent::__do_imports() { } void acomponent::__on_imports() { } void acomponent::run(int _magic,...) { va_list va; va_start(va,_magic); main(_magic,va); va_end(va); } void acomponent::pass_file_through(const char *fn) { ifstream ifs(fn,ios::in|ios::binary); if(!ifs) throw konforka::exception(CODEPOINT,"failed to open file"); (*(__SCIF->out)) << ifs.rdbuf(); } }