本文整理汇总了C++中End_Progress函数的典型用法代码示例。如果您正苦于以下问题:C++ End_Progress函数的具体用法?C++ End_Progress怎么用?C++ End_Progress使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了End_Progress函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 ();
}
示例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 ();
}
示例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 ();
}
示例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");
}
示例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 ());
}
示例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 ());
}
示例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 ();
}
示例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 ();
}
}
示例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 ());
}
示例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);
}
示例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);
}
示例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 ();
}
示例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 ();
}
示例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);
}
示例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 ();
}