本文整理汇总了C++中Show_Message函数的典型用法代码示例。如果您正苦于以下问题:C++ Show_Message函数的具体用法?C++ Show_Message怎么用?C++ Show_Message使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Show_Message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Show_Message
void PlanSum::Write_Times (void)
{
int i, start, mid, end;
Dtime low, high;
fstream &file = time_file.File ();
Show_Message ("Writing Trip Time File");
file << "Time1\tTime2\tStart\tMid-Trip\tEnd" << endl;
for (i=0; i < sum_periods.Num_Periods (); i++) {
sum_periods.Period_Range (i, low, high);
start = DTOI (start_time [i]);
mid = DTOI (mid_time [i]);
end = DTOI (end_time [i]);
if (start > 0 || mid > 0 || end > 0) {
file << low.Time_String () << "\t" << high.Time_String () << "\t" << start << "\t" << mid << "\t" << end << endl;
}
}
Show_Message (1);
time_file.Close ();
}
示例2: if
bool Converge_Service::Copy_Plans (int partition)
{
int last_hhold, hhold, max_hhold, part_number;
string process_type, process_name;
bool keep_flag, part_flag;
Trip_Map_Itr map_itr;
Plan_File *plan_file = 0;
Plan_Data plan_rec, *plan_ptr, *copy_ptr;
Plan_Ptr_Array *plan_ptr_array;
//---- start processing plans ----
max_hhold = MAX_INTEGER;
if (select_households) {
max_hhold = hhold_range.Max_Value ();
}
if (select_flag) {
hhold = select_map.Max_Household ();
if (hhold < max_hhold) max_hhold = hhold;
}
if (update_flag) {
process_type = "Updating";
} else if (reroute_flag) {
process_type = "Re-Routing";
} else if (new_plan_flag) {
process_type = "Copying";
} else {
process_type = "Processing";
}
if (plan_memory_flag) {
process_name = "Travel Plans";
part_flag = false;
part_number = partition;
} else {
if (new_set_flag) {
plan_file = plan_file_set [partition];
} else {
plan_file = Converge_Service::plan_file;
}
process_name = plan_file->File_Type ();
part_flag = plan_file->Part_Flag ();
part_number = plan_file->Part_Number ();
}
if (thread_flag) {
MAIN_LOCK
if (part_flag) {
Show_Message (String ("%s %s %d") % process_type % process_name % part_number);
} else {
Show_Message (String ("%s %s") % process_type % process_name);
}
END_LOCK
} else {
if (part_flag) {
示例3: 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 ();
}
示例4: 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 ();
}
示例5: 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 ());
}
示例6: 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");
}
示例7: 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 ();
}
示例8: 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 ();
}
示例9: 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 ());
}
示例10: 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 ();
}
}
示例11: System_Household_File
void Data_Service::Write_Households (void)
{
int part, num_part, count;
Household_File *file = System_Household_File (true);
Int_Map_Itr itr;
Household_Data *hhold_ptr;
Household_Itr hhold_itr;
Partition_Files <Household_File> new_file_set;
if (file->Part_Flag ()) {
for (num_part=0, hhold_itr = hhold_array.begin (); hhold_itr != hhold_array.end (); hhold_itr++) {
part = Partition_Index (hhold_itr->Partition ());
if (part > num_part) num_part = part;
}
new_file_set.Initialize (file, ++num_part);
Show_Message (String ("Writing %ss -- Record") % file->File_Type ());
} else {
num_part = 1;
Show_Message (String ("Writing %s -- Record") % file->File_Type ());
}
Set_Progress ();
for (count=0, itr = hhold_map.begin (); itr != hhold_map.end (); itr++) {
Show_Progress ();
hhold_ptr = &hhold_array [itr->second];
if (hhold_ptr->Partition () < 0) continue;
if (file->Part_Flag ()) {
part = Partition_Index (hhold_ptr->Partition ());
if (part < 0) continue;
file = new_file_set [part];
}
count += Put_Household_Data (*file, *hhold_ptr);
}
End_Progress ();
file->Close ();
Print (2, String ("%s Records = %d") % file->File_Type () % count);
if (num_part > 1) Print (0, String (" (%d files)") % num_part);
}
示例12: 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);
}
示例13: 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 ());
}
示例14: Show_Message
void PlanSum::Trip_Time (void)
{
int i, start_total, mid_total, end_total;
double start, mid, end;
Show_Message ("Trip Time Report");
//---- get the total number of trips ----
start_total = mid_total = end_total = 0;
for (i=1; i <= num_inc; i++) {
start_total += start_time [i];
mid_total += mid_time [i];
end_total += end_time [i];
}
if (start_total == 0 && mid_total == 0 && end_total == 0) {
Write (2, "Trip Time Data is Zero");
return;
}
if (start_total == 0) {
start = 1.0;
} else {
start = start_total;
}
if (mid_total == 0) {
mid = 1.0;
} else {
mid = mid_total;
}
if (end_total == 0) {
end = 1.0;
} else {
end = end_total;
}
//---- print the report ----
Header_Number (TRIP_TIME);
if (!Break_Check (num_inc + 7)) {
Print (1);
Trip_Time_Header ();
}
for (i=1; i <= num_inc; i++) {
Print (1, "%-12.12s %10d %6.2lf %10d %6.2lf %10d %6.2lf",
time_periods.Range_Format (i),
start_time [i], 100.0 * start_time [i] / start,
mid_time [i], 100.0 * mid_time [i] / mid_total,
end_time [i], 100.0 * end_time [i] / end_total);
}
Print (2, "Total %10d 100.00 %10d 100.00 %10d 100.00", start_total, mid_total, end_total);
Header_Number (0);
}
示例15: 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 ();
}