Ejemplo n.º 1
0
CController::CController()
{
    load_documents(ORDER);

    for (int type = ORDER; type < QUANTITY_TYPES; type++)
    {
        saved[type] = true;
    }
}
Ejemplo n.º 2
0
//возврвщаем список документов выбранного типа
QList<CDocument*> CController::get_documents(DocumentType type)
{
    if (type < QUANTITY_TYPES)
    {
        if (documents[type].isEmpty())//если документы не загружены, то загружаем их
        {
            load_documents(type);
        }

        return documents[type];
    }

    QList<CDocument*> empty_list;
    return empty_list;
}
Ejemplo n.º 3
0
int main(int argc, char *argv[]) {
  int rv = OK;

  if (argc != 2) {
    printf("ERROR: incorrect number of arguments\n");
    return ERR_ARG_NUM;
  }

  // yaml_version();

  rv = load_documents(argv[1]);
  if (rv) {
    printf("ERROR: %d", rv);
  }
  return rv;
}