• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ End_Progress函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中End_Progress函数的典型用法代码示例。如果您正苦于以下问题:C++ End_Progress函数的具体用法?C++ End_Progress怎么用?C++ End_Progress使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了End_Progress函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Show_Message

void TripSum::Write_Zones (void)
{
	int i, nrec;

	Point_Time_Data *end_ptr;

	Show_Message ("Writing %s -- Record", zone_end_file.File_Type ());
	Set_Progress (1000);

	//---- write each zone ----

	nrec = 0;

	for (end_ptr = zone_end_data.First_Key (); end_ptr; end_ptr = zone_end_data.Next_Key ()) {
		Show_Progress ();

		if (end_ptr->Periods () > 0) {
			zone_end_file.ID (end_ptr->ID ());

			for (i=1; i <= num_inc; i++) {
				zone_end_file.Total_In (i, end_ptr->In (i));
				zone_end_file.Total_Out (i, end_ptr->Out (i));
			}
			if (!zone_end_file.Write ()) {
				Error ("Writing %s", zone_end_file.File_Type ());
			}
			nrec++;
		}
	}
	End_Progress ();

	Print (2, "Number of %s Records = %d", zone_end_file.File_Type (), nrec);

	zone_end_file.Close ();
}
开发者ID:kravitz,项目名称:transims4,代码行数:35,代码来源:Write_Zones.cpp


示例2: Show_Message

void LocationData::Read_Boundary (void)
{
	int zone;
	Points_Map_Stat map_stat;

	//---- read zone polygons----

	Show_Message (String ("Reading %s -- Record") % boundary_file.File_Type ());
	Set_Progress ();

	while (boundary_file.Read_Record ()) {
		Show_Progress ();

		//---- get the zone number ----

		zone = boundary_file.Get_Integer (zone_field);
		if (zone == 0) continue;

		if (zone_map.find (zone) == zone_map.end ()) continue;
		if (range_flag && !zone_range.In_Range (zone)) continue;

		map_stat = boundary_map.insert (Points_Map_Data (zone, boundary_file));
		if (!map_stat.second) {
			Warning ("Duplicate Zone Number = ") << zone;
		}
	}
	End_Progress ();

	boundary_file.Close ();

	Print (2, "Number of ") << boundary_file.File_Type () << " Records = " << boundary_map.size ();
}
开发者ID:kravitz,项目名称:transims5,代码行数:32,代码来源:Read_Boundary.cpp


示例3: Show_Message

void LineSum::Read_Service (void)
{
	String line;
	int peak, offpeak, service;

	//---- read the line service file ----

	Show_Message (String ("Reading %s -- Record") % service_file.File_Type ());
	Set_Progress ();

	//---- read each record ----

	while (service_file.Read ()) {
		Show_Progress ();

		line = service_file.Get_String (line_fld);
		line.To_Upper ();

		peak = service_file.Get_Integer (peak_fld);
		offpeak = service_file.Get_Integer (offpeak_fld);
		service = (peak << 16) + offpeak;

		service_map.insert (Str_ID_Data (line, service));
	}
	End_Progress ();

	Print (2, String ("Number of %s Records = %d") % service_file.File_Type () % service_map.size ());
	
	service_file.Close ();
}
开发者ID:kravitz,项目名称:transims5,代码行数:30,代码来源:Read_Service.cpp


示例4: Network_Db_File

void Network_Service::Read_Line (void)
{
	Line_File *file = (Line_File *) Network_Db_File (TRANSIT_ROUTE);

	//---- store the transit route data ----

	Show_Message ("Reading %s -- Record", file->File_Type ());
	Set_Progress ();

	if (Check_Data () || Renumber ()) {
		if (!Network_Data_Flag (TRANSIT_STOP) && 
			(Network_File_Flag (TRANSIT_STOP) || Network_Option_Flag (TRANSIT_STOP))) {
			Error (file_error, "Transit Stop", file->File_ID ());
		}
	}
	First_Record (true);
	int i, num;

	while (file->Read (false)) {
		Show_Progress ();

		if (Line_Processing (file)) {
			if (!line_data.Add ()) goto add_error;

		}
		First_Record (false);

		num = file->Stops ();

		for (i=1; i <= num; i++) {
			if (!file->Read (true)) {
				Error ("Number of Nested Records for Route %d", file->Route ());
			}
			Show_Progress ();

			if (Line_Processing (file)) {
				if (!line_data.Add ()) goto add_error;
			}			
		}	
	}
	End_Progress ();
	file->Close ();

	line_data.Route_Records (Progress_Count ());

	Print (2, "Number of %s Records = %d", file->File_Type (), Progress_Count ());

	num = line_data.Num_Records ();

	if (num && num != Progress_Count ()) {
		Print (1, "Number of Transit Route Data Records = %d", num);
	}
	line_data.Optimize ();

	if (num > 0) Network_Data_True (TRANSIT_ROUTE);
	return;

add_error:
	Error ("Adding Record to the Transit Route Data List");
}
开发者ID:kravitz,项目名称:transims4,代码行数:60,代码来源:Read_Line.cpp


示例5: Show_Message

void ArcNet::Write_Subzone (void)
{
	XYZ_Point point;

	int z_field = subzone_file.Optional_Field ("Z_COORD", "ELEVATION", "Z");

	arcview_subzone.Num_Points (1);

	Show_Message ("Reading %s -- Record", subzone_file.File_Type ());
	Set_Progress (1000);

	while (subzone_file.Read ()) {
		Show_Progress ();

		arcview_subzone.Copy_Fields (&subzone_file);

		point.x = subzone_file.X ();
		point.y = subzone_file.Y ();
		subzone_file.Get_Field (z_field, &(point.z));

		arcview_subzone.points.Set (1, &point);

		if (!arcview_subzone.Write_Record ()) {
			Error ("Writing ArcView Subzone File");
		}
	}
	End_Progress ();
	
	subzone_file.Close ();
	arcview_subzone.Close ();

	Print (2, "Number of %s Records = %d", subzone_file.File_Type (), Progress_Count ());
}
开发者ID:kravitz,项目名称:transims4,代码行数:33,代码来源:Write_Subzone.cpp


示例6: Show_Message

void IntControl::Read_Deletes (void)
{
    int node;

    //---- store the delete data ----

    Show_Message ("Reading %s -- Record", delete_file.File_Type ());
    Set_Progress ();

    while (delete_file.Read ()) {
        Show_Progress ();

        Get_Integer (delete_file.Record (), &node);
        if (node == 0) continue;

        if (!delete_node.Add (node)) {
            Error ("Adding Delete Node Record");
        }
    }
    End_Progress ();

    delete_file.Close ();

    Print (2, "Number of %s Records = %d", delete_file.File_Type (), Progress_Count ());
}
开发者ID:kravitz,项目名称:transims4,代码行数:25,代码来源:Read_Deletes.cpp


示例7: Show_Message

void LineSum::Read_Shapes (void)
{
	int anode, bnode;

	//---- read the arcview shape file ----

	Show_Message (String ("Reading %s -- Record") % link_shape.File_Type ());
	Set_Progress ();

	//---- read each record ----

	while (link_shape.Read_Record ()) {
		Show_Progress ();

		anode = link_shape.Get_Integer (anode_field);
		bnode = link_shape.Get_Integer (bnode_field);

		points_map.insert (I2_Points_Map_Data (Int2_Key (anode, bnode), link_shape));
	}
	End_Progress ();

	Print (2, String ("Number of %s Records = %d") % link_shape.File_Type () % points_map.size ());
	
	link_shape.Close ();
}
开发者ID:kravitz,项目名称:transims5,代码行数:25,代码来源:Read_Shapes.cpp


示例8: Show_Message

void LocationData::Read_Polygons (void)
{
	int i, index, num_pts;

	Arcview_File *poly_file;
	Boundary poly_rec;
	Index_Array *polygon;
	Db_Index_Array *data;

	//---- read the arcview boundary file ----

	for (i=0; i < num_polygons; i++) {
		poly_file = polygon_files [i];
		if (poly_file == NULL) continue;

		Show_Message ("Reading %s -- Record", poly_file->File_Type ());
		Set_Progress (1000);

		//---- read each record ----

		index = 0;
		polygon = polygons [i];
		data = polygon_db [i];

		while (poly_file->Read_Record ()) {
			Show_Progress ();

			poly_rec.zone = ++index;
			num_pts = poly_file->Num_Points ();

			poly_rec.points = new Point_Data ();

			if (poly_rec.points == NULL || !poly_rec.points->Num_Points (num_pts)) {
				Error ("Insufficient Memory for Boundary Polygons");
			}
			num_pts *= sizeof (XY_Point);

			memcpy (poly_rec.points->Get_XY_Data (1), poly_file->Get_XY_Data (1), num_pts);

			if (!polygon->Add (&poly_rec)) {
				Error ("Adding Boundary Polygon");
			}

			//----- add to the database ----

			data->Copy_Fields (poly_file);
			data->Put_Field (1, index);

			if (!data->Add_Record ()) {
				Error ("Writing Boundary Polygon Database");
			}
		}
		End_Progress ();

		Print (2, "Number of %s Records = %d", poly_file->File_Type (), Progress_Count ());
		
		poly_file->Close ();
	}
}
开发者ID:kravitz,项目名称:transims4,代码行数:59,代码来源:Read_Polygons.cpp


示例9: Show_Message

void RoutePrep::Read_Node_Map (void)
{
	String record;
	Strings fields;

	int node, index;
	Int_Map_Itr map_itr;
	Int_Map_Stat map_stat;
	Node_Data *node_ptr;

	Show_Message (String ("Reading %s -- Record") % node_map_file.File_Type ());
	Set_Progress ();

	while (node_map_file.Read ()) {
		Show_Progress ();

		record = node_map_file.Record_String ();

		record.Parse (fields);

		node = fields [0].Integer ();
		if (node <= 0) continue;

		index = fields [1].Integer ();

		if (index > 0) {
			map_itr = node_map.find (index);

			if (map_itr == node_map.end ()) {
				Warning (String ("Node Map %d to %d was Not Found in the Node File") % node % index);
				continue;
			}
			index = map_itr->second;
		}

		//---- insert the node;

		map_stat = input_map.insert (Int_Map_Data (node, index));

		if (!map_stat.second) {
			Warning (String ("Duplicate Node Map %d to %d and %d") % node % index % map_stat.first->second);
			continue;
		}
		if (index >= 0) {
			node_ptr = &node_array [index];

			node_ptr->Control (node);
		}

	}
	End_Progress ();

	node_map_file.Close ();

	Print (2, String ("Number of %s Records = %d") % node_map_file.File_Type () % Progress_Count ());
}
开发者ID:qingswu,项目名称:Transim,代码行数:56,代码来源:Read_Node_Map.cpp


示例10: Show_Message

void Emissions::Write_HPMS_VMT (void)
{
	int vt, vt_field, yr_field, fac_field, vmt_field, off_field, max_vt, num_vt, year;

	//---- create the data fields ----

	hpms_file.Add_Field ("HPMSVtypeID", Db_Code::INTEGER, 3);
	vt_field = 1;

	hpms_file.Add_Field ("yearID", Db_Code::INTEGER, 5);
	yr_field = 2;
	
	hpms_file.Add_Field ("VMTGrowthFactor", Db_Code::DOUBLE, 9, 6);
	fac_field = 3;
	
	hpms_file.Add_Field ("HPMSBaseYearVMT", Db_Code::DOUBLE, 20, 2);
	vmt_field = 4;
	
	hpms_file.Add_Field ("baseYearOffNetVMT", Db_Code::DOUBLE, 20, 2);
	off_field = 5;

	hpms_file.Write_Header ();

	//---- save the data to the file ----

	Show_Message ("Writing %s -- Record", hpms_file.File_Type ());
	Set_Progress ();

	year = years.First ();
	if (year == 0) year = 2007;

	max_vt = category_data.Get (HPMS)->Max_Value ();
	num_vt = 0;

	for (vt=1; vt <= max_vt; vt++) {
		Show_Progress ();

		if (hpms_vmt [vt] == 0.0) continue;

		hpms_file.Put_Field (vt_field, vt);
		hpms_file.Put_Field (yr_field, year);
		hpms_file.Put_Field (fac_field, 0);
		hpms_file.Put_Field (vmt_field, hpms_vmt [vt] / MILETOMETER);
		hpms_file.Put_Field (off_field, 0);

		if (!hpms_file.Write ()) {
			Error ("Writing %s", hpms_file.File_Type ());
		}
		num_vt++;
	}
	End_Progress ();

	hpms_file.Close ();

	Print (2, "Number of %s Records = %d", hpms_file.File_Type (), num_vt);
}
开发者ID:kravitz,项目名称:transims4,代码行数:56,代码来源:Write_HPMS_VMT.cpp


示例11: Show_Message

void Data_Service::Read_Lines (Line_File &file)
{
	int i, num;
	bool keep_flag;
	Int_Map_Stat map_stat;
	Line_Data line_rec;

	//---- store the route data ----

	Show_Message (String ("Reading %s -- Record") % file.File_Type ());
	Set_Progress ();
	
	Initialize_Lines (file);

	while (file.Read (false)) {
		Show_Progress ();

		line_rec.Clear ();

		keep_flag = Get_Line_Data (file, line_rec);

		num = file.Num_Nest ();
		if (num > 0) line_rec.reserve (num);

		for (i=1; i <= num; i++) {
			if (!file.Read (true)) {
				Error (String ("Number of Stop Records for Route %d") % file.Route ());
			}
			Show_Progress ();

			Get_Line_Data (file, line_rec);
		}
		if (keep_flag) {
			map_stat = line_map.insert (Int_Map_Data (line_rec.Route (), (int) line_array.size ()));

			if (!map_stat.second) {
				Warning ("Duplicate Route Number = ") << line_rec.Route ();
			} else {
				line_array.push_back (line_rec);

				line_array.Add_Route_Stops ((int) line_rec.size ());
			}
		}
	}
	End_Progress ();
	file.Close ();

	Print (2, String ("Number of %s Records = %d") % file.File_Type () % Progress_Count ());

	num = (int) line_array.size ();

	if (num && num != Progress_Count ()) {
		Print (1, String ("Number of %s Data Records = %d") % file.File_ID () % num);
	}
	if (num > 0) System_Data_True (TRANSIT_ROUTE);
}
开发者ID:qingswu,项目名称:Transim,代码行数:56,代码来源:Read_Lines.cpp


示例12: Show_Message

void ArcRider::Write_Stops (void)
{
	int index, board, alight, stop_field, board_field, alight_field, total_field;
	bool stop_flag;

	Offset_Data *stop_ptr;
	XYZ_Point point;

	stop_field = arcview_stop.Field_Number ("STOP");
	board_field = arcview_stop.Field_Number ("BOARD");
	alight_field = arcview_stop.Field_Number ("ALIGHT");
	total_field = arcview_stop.Field_Number ("TOTAL");
	
	stop_flag = (transit_stops.Num_Ranges () > 0);

	arcview_stop.Num_Points (1);

	Show_Message ("Writing %s -- Record", arcview_stop.File_Type ());
	Set_Progress (1000);

	//---- process each stop ----

	for (stop_ptr = stop_offset.First (); stop_ptr; stop_ptr = stop_offset.Next ()) {
		Show_Progress ();

		if (stop_flag && !transit_stops.In_Range (stop_ptr->ID ())) continue;

		index = stop_offset.Record_Index ();

		board = board_data [index];
		alight = alight_data [index];

		if (board <= 0 && alight <= 0) continue;

		//---- write the stop record ----

		point.x = stop_ptr->X ();
		point.y = stop_ptr->Y ();
		point.z = stop_ptr->Z ();

		arcview_stop.Put_Field (stop_field, stop_ptr->ID ());
		arcview_stop.Put_Field (board_field, board);
		arcview_stop.Put_Field (alight_field, alight);
		arcview_stop.Put_Field (total_field, (board + alight));

		arcview_stop.points.Set (1, &point);

		if (!arcview_stop.Write_Record ()) {
			Error ("Writing ArcView Stop Demand File");
		}
		num_stop++;
	}
	End_Progress ();

	arcview_stop.Close ();
}
开发者ID:kravitz,项目名称:transims4,代码行数:56,代码来源:Write_Stops.cpp


示例13: Error

void ZoneData::Read_Data (int num)
{
	int id, field, count;

	Db_Index_Array *data;
	Db_Header *file;

	//---- set the file pointers ----

	file = data_files [num];
	if (file == NULL) return;

	data = data_db [num];
	field = data_field [num];

	if (!data->Max_Records (file->Num_Records ())) {
		Error ("Insufficient Memory for Data File Database");
	}

	//---- read the data file ----

	Show_Message ("Reading %s -- Record", file->File_Type ());
	Set_Progress (1000);

	count = 0;

	while (file->Read ()) {
		Show_Progress ();

		//---- get the join field id ----

		file->Get_Field (field, &id);
		if (id == 0) continue;

		//---- copy the data fields ----

		data->Copy_Fields (file);

		//---- set the record index and location count ----

		data->Put_Field (1, id);
		data->Put_Field (2, 0);

		//---- save the database record ----

		if (!data->Add_Record ()) {
			Error ("Writing Data File Database");
		}
		count++;
	}
	End_Progress ();

	Print (2, "Number of %s Records = %d", file->File_Type (), count);
	
	file->Close ();
}
开发者ID:kravitz,项目名称:transims4,代码行数:56,代码来源:Read_Data.cpp


示例14: Show_Message

void Data_Service::Read_Shapes (Shape_File &file)
{
	int i, num;	
	bool keep_flag;
	Shape_Data shape_rec;
	Int_Map_Stat map_stat;

	//---- store the shape point data ----

	Show_Message (String ("Reading %s -- Record") % file.File_Type ());
	Set_Progress ();

	Initialize_Shapes (file);

	while (file.Read (false)) {
		Show_Progress ();

		shape_rec.Clear ();

		keep_flag = Get_Shape_Data (file, shape_rec);

		num = file.Num_Nest ();
		if (num > 0) shape_rec.reserve (num);

		for (i=1; i <= num; i++) {
			if (!file.Read (true)) {
				Error (String ("Number of Nested Records for Link %d") % file.Link ());
			}
			Show_Progress ();

			Get_Shape_Data (file, shape_rec);
		}
		if (keep_flag) {
			map_stat = shape_map.insert (Int_Map_Data (shape_rec.Link (), (int) shape_array.size ()));

			if (!map_stat.second) {
				Warning ("Duplicate Link Number = ") << shape_rec.Link ();
			} else {
				shape_array.push_back (shape_rec);
			}
		}
	}
	End_Progress ();
	file.Close ();

	Print (2, String ("Number of %s Records = %d") % file.File_Type () % Progress_Count ());

	num = (int) shape_array.size ();

	if (num && num != Progress_Count ()) {
		Print (1, String ("Number of Link %s Records = %d") % file.File_ID () % num);
	}
	if (num > 0) System_Data_True (SHAPE);
}
开发者ID:qingswu,项目名称:Transim,代码行数:54,代码来源:Read_Shapes.cpp


示例15: Show_Message

void TransitAccess::Read_Link (void)
{
	int anode, bnode, dist, zone, type;
	double len;
	String text;
	Zone_Map_Itr zone_itr;
	Node_Map_Itr node_itr;

	//---- walk link data ----

	Show_Message (String ("Reading %s -- Record") % link_data_file.File_Type ());
	Set_Progress ();

	while (link_data_file.Read ()) {
		Show_Progress ();

		anode = link_data_file.Get_Integer (link_anode_fld);
		bnode = link_data_file.Get_Integer (link_bnode_fld);

		if (skip_links.find (Int2_Key (anode, bnode)) != skip_links.end ()) continue;
		if (skip_links.find (Int2_Key (bnode, anode)) != skip_links.end ()) continue;

		len = link_data_file.Get_Double (link_len_fld);
		zone = link_data_file.Get_Integer (link_zone_fld);
		type = link_data_file.Get_Integer (link_type_fld);

		if (!type_range.In_Range (type)) continue;

		zone_itr = zone_map.find (zone);
		if (zone_itr == zone_map.end ()) continue;
		if (zone_itr->second.walk == 0) continue;

		dist = DTOI (len * 100.0 * zone_itr->second.weight);

		node_itr = node_map.find (anode);
		if (node_itr != node_map.end ()) {
			node_itr->second.use = 1;
		}
		node_itr = node_map.find (bnode);
		if (node_itr != node_map.end ()) {
			node_itr->second.use = 1;
		}
	
		text (" N=%d-%d MODE=13 SPEED=3 ONEWAY=T DIST=%d") % anode % bnode % dist;

		sidewalk_file.File () << "SUPPORT" << text << endl;

		walk_link_file.File () << "SUPPLINK" << text << endl;
	}
	End_Progress ();
	link_data_file.Close ();

	Print (2, "Number of Link Data Records = ") << Progress_Count ();
}
开发者ID:kravitz,项目名称:transims5,代码行数:54,代码来源:Read_Link.cpp


示例16: Show_Message

void ActivityPattern::Survey_Population (void)
{
	int hhold;

	Survey_HHold *household_ptr;
	Survey_Person *population_ptr;

	if (!survey_pop_data.Max_Records (survey_pop_file.Num_Records ())) goto mem_error;

	//---- read the survey population file ----

	Show_Message ("Reading %s -- Record", survey_pop_file.File_Type ());
	Set_Progress (50000);
	
	while (survey_pop_file.Read ()) {
		Show_Progress ();

		//---- check the household id ----

		hhold = survey_pop_file.Household ();
		if (hhold <= 0) continue;

		household_ptr = survey_hh_data.Get (hhold);
		if (household_ptr == NULL) {
			Error ("Survey Person Household %d was Not Found", hhold);
		}

		population_ptr = survey_pop_data.New_Record (true);
		if (population_ptr == NULL) goto mem_error;

		population_ptr->Household (hhold);
		population_ptr->Person (survey_pop_file.Person ());
		population_ptr->Age (survey_pop_file.Age ());
		population_ptr->Gender (survey_pop_file.Gender ());
		population_ptr->Work (survey_pop_file.Work ());
		population_ptr->Drive (survey_pop_file.Drive ());
		population_ptr->Count (0);

		if (!survey_pop_data.Add ()) {
			Error ("Adding Record to the Population Data Array");
		}
	}
	End_Progress ();
	survey_pop_file.Close ();

	Print (2, "Number of %s Records = %d", survey_pop_file.File_Type (), Progress_Count ());

	survey_pop_data.Optimize ();
	return;

mem_error:
	Error ("Insufficient Memory for Survey Population Data");
}
开发者ID:kravitz,项目名称:transims4,代码行数:53,代码来源:Survey_Population.cpp


示例17: System_File_Handle

void Data_Service::Read_Locations (void)
{
	Location_File *file = (Location_File *) System_File_Handle (LOCATION);

	int num;
	bool zone_flag = System_Data_Flag (ZONE);

	Int_Map_Stat map_stat;
	Location_Data location_rec;

	//---- store the location data ----

	Show_Message (String ("Reading %s -- Record") % file->File_Type ());
	Set_Progress ();

	Initialize_Locations (*file);

	while (file->Read ()) {
		Show_Progress ();

		location_rec.Clear ();

		if (Get_Location_Data (*file, location_rec)) {
			map_stat = location_map.insert (Int_Map_Data (location_rec.Location (), (int) location_array.size ()));

			if (!map_stat.second) {
				Warning ("Duplicate Location Number = ") << location_rec.Location ();
				continue;
			} else {
				if (!file->Setback_Flag () && location_rec.Setback () == 0) {
					location_rec.Setback (Internal_Units (100.0, FEET));
				}
				location_array.push_back (location_rec);

				if (!zone_flag && location_rec.Zone () > Max_Zone_Number ()) {
					Max_Zone_Number (location_rec.Zone ());
				}
			}
		}
	}
	End_Progress ();
	file->Close ();

	Print (2, String ("Number of %s Records = %d") % file->File_Type () % Progress_Count ());

	num = (int) location_array.size ();

	if (num && num != Progress_Count ()) {
		Print (1, String ("Number of %s Data Records = %d") % file->File_ID () % num);
	}
	if (num > 0) System_Data_True (LOCATION);
}
开发者ID:kravitz,项目名称:transims5,代码行数:52,代码来源:Read_Locations.cpp


示例18: Show_Message

void PlanSum::Write_Turns (void)
{
    int i;
    char *time1_ptr, *time2_ptr;

    Movement_Data *move_ptr;
    Movement_Array *array_ptr;
    Dir_Data *dir_ptr;

    Show_Message ("Writing %s -- Record", turn_file.File_Type ());
    Set_Progress (10000);

    //---- write each turn movement ----

    for (i=1; i <= num_inc; i++) {
        array_ptr = movement_data [i];

        time1_ptr = time_periods.Range_Format (i);

        time2_ptr = strstr (time1_ptr, "..");
        *time2_ptr = '\0';
        time2_ptr += 2;

        for (move_ptr = array_ptr->First_Key (); move_ptr; move_ptr = array_ptr->Next_Key ()) {
            Show_Progress ();

            turn_file.Node (move_ptr->node);

            dir_ptr = dir_data [move_ptr->in_link];
            turn_file.In_Link (dir_ptr->Link ());

            dir_ptr = dir_data [move_ptr->out_link];
            turn_file.Out_Link (dir_ptr->Link ());

            turn_file.Start (time1_ptr);
            turn_file.End (time2_ptr);
            turn_file.Volume (move_ptr->volume);

            //---- save the record ----

            if (!turn_file.Write ()) {
                Error ("Writing Turn Movement File");
            }
        }
    }
    End_Progress ();

    Print (2, "Number of %s Records = %d", turn_file.File_Type (), Progress_Count ());

    turn_file.Close ();
}
开发者ID:kravitz,项目名称:transims4,代码行数:51,代码来源:Write_Turns.cpp


示例19: Show_Message

void ZoneData::Read_Data (void)
{
	int id, field, count;

	Db_Sort_Array *data;
	Db_Header *file;
	Data_Itr data_itr;

	for (data_itr = data_group.begin (); data_itr != data_group.end (); data_itr++) {
		file = data_itr->file;
		data = data_itr->data_db;
		field = data_itr->join_field;

		//---- read the data file ----

		Show_Message (String ("Reading %s -- Record") % file->File_Type ());
		Set_Progress ();

		count = 0;

		while (file->Read ()) {
			Show_Progress ();

			//---- get the join field id ----

			id = file->Get_Integer (field);
			if (id == 0) continue;

			//---- copy the data fields ----

			data->Copy_Fields (*file);

			//---- set the record index and zone count ----

			data->Put_Field (0, id);
			data->Put_Field (1, 0);

			//---- save the database record ----

			if (!data->Write_Record (id)) {
				Error ("Writing Data File Database");
			}
			count++;
		}
		End_Progress ();

		Print (2, String ("Number of Data #%d Records = %d") % data_itr->group % count);
		
		file->Close ();
	}
}
开发者ID:kravitz,项目名称:transims5,代码行数:51,代码来源:Read_Data.cpp


示例20: Show_Message

void ArcPlan::Write_Parking (void)
{
	int index, in, out, park_field, out_field, in_field, tot_field;

	Offset_Data *parking_ptr;
	XYZ_Point point;

	park_field = arcview_parking.Field_Number ("PARKING");
	out_field = arcview_parking.Field_Number ("DEPART");
	in_field = arcview_parking.Field_Number ("ARRIVE");
	tot_field = arcview_parking.Field_Number ("TOTAL");

	arcview_parking.Num_Points (1);

	Show_Message ("Writing %s -- Record", arcview_parking.File_Type ());
	Set_Progress (1000);

	//---- process each parking lot ----

	for (parking_ptr = parking_offset.First (); parking_ptr; parking_ptr = parking_offset.Next ()) {
		Show_Progress ();

		index = parking_offset.Record_Index ();

		out = parking_out [index];
		in = parking_in [index];

		if (in <= 0 && out <= 0) continue;

		//---- write the parking record ----

		point.x = parking_ptr->X ();
		point.y = parking_ptr->Y ();

		arcview_parking.Put_Field (park_field, parking_ptr->ID ());
		arcview_parking.Put_Field (out_field, out);
		arcview_parking.Put_Field (in_field, in);
		arcview_parking.Put_Field (tot_field, (out + in));

		arcview_parking.points.Set (1, &point);

		if (!arcview_parking.Write_Record ()) {
			Error ("Writing ArcView Parking Demand File");
		}
		num_parking++;
	}
	End_Progress ();

	arcview_parking.Close ();
}
开发者ID:kravitz,项目名称:transims4,代码行数:50,代码来源:Write_Parking.cpp



注:本文中的End_Progress函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ EndianConvert函数代码示例发布时间:2022-05-30
下一篇:
C++ EndWaitCursor函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap