示例#1
0
SPART *
spar_make_qm_value (sparp_t *sparp, caddr_t format_name, SPART **cols)
{
  dk_set_t map_aliases = NULL;
  dk_set_t map_atables = NULL;
  dk_set_t cond_tmpls = NULL;
  dk_set_t col_descs = NULL;
  SPART **col_descs_array;
  SPART *ft_generator = NULL;
  int colctr;
  DO_BOX_FAST (SPART *, col, colctr, cols)
    {
      caddr_t a = col->_.qm_sqlcol.alias;
      caddr_t tbl = col->_.qm_sqlcol.qtable;
      if (NULL == tbl)
        tbl = sparp->sparp_env->spare_qm_default_table;
      t_set_push (&col_descs, spar_make_qm_col_desc (sparp, col));
      if (NULL == a)
        a = t_box_dv_short_string ("");
      if (0 > dk_set_position_of_string (map_aliases, a))
        {
          t_set_push (&map_aliases, a);
          t_set_push (&map_atables,
            spar_make_vector_qm_sql (sparp,
              (SPART **)t_list (2, a, col->_.qm_sqlcol.qtable) ) );
        }
    }
示例#2
0
SPART *
spar_make_qm_col_desc (sparp_t *sparp, SPART *col)
{
  return spar_make_vector_qm_sql (sparp,
    (SPART **)t_list (3,
      col->_.qm_sqlcol.qtable,
      col->_.qm_sqlcol.alias,
      col->_.qm_sqlcol.col ) );
}
示例#3
0
//------------------------------------------------------------------------------
QStringList getReadingPlanForDayFromFile(const int f_day, const QString f_path)
{
    QStringList r_list;
    QStringList t_list(getTextFromHtmlFile(f_path).split("\n"));

    for (int i = 0; i < t_list.size(); i++)
    {
        if (t_list.at(i).indexOf(QString("day=\'%1\'").arg(f_day)) >= 0)
        {
            int pos1 = t_list.at(i).indexOf(">") + 1;
            int pos2 = t_list.at(i).indexOf("<", pos1);

            r_list << t_list.at(i).mid(pos1, pos2 - pos1);
        }
    }
    return r_list;
}
示例#4
0
//------------------------------------------------------------------------------
bool isExistBook(const QString f_path, const QString f_book, QString* r_bookName)
{
    bool r_bool = false;
    QString t_str = getParamModule(f_path, "BookList");
    QStringList t_list(t_str.split(GL_SYMBOL_SPLIT_BOOK));
    int t_number = getNumberOfBook(f_book);
    int i = 0;
    do
    {
        if (!t_list.at(i).isEmpty()
                and getNumberOfBook(t_list.at(i)) == t_number)
        {
            r_bool = true;
            *r_bookName = t_list.at(i);
        }
        i++;
    } while (!r_bool and i < t_list.size());

    return r_bool;
}