int Geostat_grid::row() const{
	if(parent_interface_ == 0) return 0;
	Manager* parent  = dynamic_cast<Manager*>(parent_interface_);
	if(parent==0) return 0;
	Manager::interface_iterator begin = parent->begin_interfaces();
	Manager::interface_iterator end = parent->end_interfaces();

	for(int i=0 ; begin != end; ++begin, ++i) {
		if( begin->raw_ptr() == this) {
			return i;
		}
	}
	return 0;
}
示例#2
-1
void end_update_item(std::string type_hierarchy, std::string type_name){
	SmartPtr<Named_interface> ni_dir =
	Root::instance()->interface( qitem_model_manager );
	Manager* mng = dynamic_cast<Manager*>( ni_dir.raw_ptr() );
	appli_assert( mng );

	Manager::interface_iterator it = mng->begin_interfaces();
	for( ; it != mng->end_interfaces(); ++it) {
		GsTL_ItemModel* model = dynamic_cast<GsTL_ItemModel*>(it->raw_ptr());
		if(model == 0) continue;
		model->end_update_item(type_hierarchy,type_name);
	}
}