我在Rails应用程序中集成了一些非Rails模型表。一切工作也很完美,我建立模型的方法是: class Change < ActiveRecord::Base
establish_connection(ActiveRecord::Base.configurations["otherdb_#{RAILS_ENV}"])
set_table_name "change"
end
我正在忙于向传统C++应用程序添加通用观察器机制(使用Visual Studio 2010,但不使用.Net,因此.Net代表无法提供)。 在设计中,我想尽可能地从通用观察器机制中分离特定于应用程序的部分。 实施观察员的最合理的方式似乎是这样的: class IDoThisObserver
{
public:
void handlDoThis(int arg1, i