本文整理汇总了C++中Put_Field函数的典型用法代码示例。如果您正苦于以下问题:C++ Put_Field函数的具体用法?C++ Put_Field怎么用?C++ Put_Field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Put_Field函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sqlite3_reset
bool Db_Base::Input_Record (void)
{
if (File_Format () == SQLITE3) {
int i, j, num, lvalue, result;
const unsigned char *text;
double dvalue;
Db_Field *fld;
//---- get the next record ----
if (Nested ()) {
if (new_nest_flag) {
new_nest_flag = false;
sqlite3_reset (read_nest);
sqlite3_bind_int (read_nest, 1, parent_id);
}
result = sqlite3_step (read_nest);
} else {
Record_Number (0);
parent_id = Record_Number ();
new_nest_flag = true;
sqlite3_reset (read_stmt);
sqlite3_bind_int (read_stmt, 1, parent_id);
result = sqlite3_step (read_stmt);
}
if (result == SQLITE_DONE) return (false);
if (result != SQLITE_ROW) {
exe->Warning ("SQLITE3 Read Problem: ") << sqlite3_errmsg (db_file);
}
num = Num_Fields ();
for (i=0, j=0; i < num; i++) {
fld = Field (i);
if (Nested () != fld->Nested ()) continue;
if (Nested ()) {
if (fld->Type () == DB_INTEGER) {
lvalue = sqlite3_column_int (read_nest, j+1);
Put_Field (i, lvalue);
} else if (fld->Type () == DB_DOUBLE) {
dvalue = sqlite3_column_double (read_nest, j+1);
Put_Field (i, dvalue);
} else {
text = sqlite3_column_text (read_nest, j+1);
Put_Field (i, (char *) text);
}
} else {
if (fld->Type () == DB_INTEGER) {
lvalue = sqlite3_column_int (read_stmt, j);
Put_Field (i, lvalue);
} else if (fld->Type () == DB_DOUBLE) {
dvalue = sqlite3_column_double (read_stmt, j);
Put_Field (i, dvalue);
} else {
text = sqlite3_column_text (read_stmt, j);
Put_Field (i, (char *) text);
}
}
j++;
}
} else if (File_Format () == CSV_DELIMITED) {
Strings fields;
Db_Field *fld;
int count = String (Record_String ()).Parse (fields, Delimiters ());
for (int i=0; i < Num_Fields (); i++) {
fld = Field (i);
if (Nested () == fld->Nested ()) {
if (fld->Offset () <= count) {
fld->Buffer (fields [fld->Offset () - 1]);
} else {
fld->Buffer ("");
}
}
}
}
return (true);
}
开发者ID:kravitz,项目名称:transims5,代码行数:80,代码来源:Db_Base.cpp
示例2: Work
void Work (int value) { Put_Field (work, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Person_File.hpp
示例3: Link
void Link (int value) { Put_Field (link, value); }
开发者ID:kravitz,项目名称:transims5,代码行数:1,代码来源:Sign_File.hpp
示例4: Person
void Person (int value) { Put_Field (person, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Person_File.hpp
示例5: Relate
void Relate (int value) { Put_Field (relate, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Person_File.hpp
示例6: Leg_Length
void Leg_Length (double value) { Put_Field (leg_length, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例7: Leg_Impedance
void Leg_Impedance (int value) { Put_Field (leg_imp, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例8: Walk
void Walk (Dtime value) { Put_Field (walk, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例9: Drive
void Drive (Dtime value) { Put_Field (drive, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例10: Arrive
void Arrive (Dtime value) { Put_Field (arrive, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例11: Activity
void Activity (Dtime value) { Put_Field (activity, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例12: Depart
void Depart (Dtime value) { Put_Field (depart, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例13: Diff
void Diff (int period, double value) {
Put_Field (Index3 (period), value);
}
开发者ID:kravitz,项目名称:transims5,代码行数:3,代码来源:Link_Dir_File.hpp
示例14: Data2
void Data2 (int period, double value) {
Put_Field (Index2 (period), value);
}
开发者ID:kravitz,项目名称:transims5,代码行数:3,代码来源:Link_Dir_File.hpp
示例15: Leg_ID
void Leg_ID (int value) { Put_Field (leg_id, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例16: Transit
void Transit (Dtime value) { Put_Field (transit, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例17: Leg_Time
void Leg_Time (Dtime value) { Put_Field (leg_time, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例18: Wait
void Wait (Dtime value) { Put_Field (wait, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例19: Leg_Cost
void Leg_Cost (double value) { Put_Field (leg_cost, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
示例20: Other
void Other (Dtime value) { Put_Field (other, value); }
开发者ID:qingswu,项目名称:Transim,代码行数:1,代码来源:Plan_File.hpp
注:本文中的Put_Field函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论