Example #1
0
bool ProjectBase::load(QString loadPath)
{
    if(_saveLoadMutex.tryLock())
    {
        bool configOk = checkConfiguration();
        bool loaded = false;

        if(configOk)
            loaded = Load::loadProject(loadPath,this);

        if (loaded)
        {
            emit InfoSender::instance()->send( Info(ListInfo::PROJECTLOADSUCCESSFULL,filePath()));
            emit projectChanged();
        }
        else
        {
            emit InfoSender::instance()->send( Info(ListInfo::PROJECTLOADFAILED,filePath()));
            clear();
            emit projectChanged();
        }
        setSaved(true);
        emit projectChanged();
        _saveLoadMutex.unlock();
        return loaded;
    }
}
Example #2
0
/*******************************************************************************
@purpose: START POINT
*******************************************************************************/
int main(int argc, char *argv[])
{
    switch(getStartupParams(argc, argv))
    {
    case SHOW_INTERFACES:
            printInterfaces();
            break;
    case SERVER_START:
            InitServer();
            break;
   /*case SERVER_STOP:      //TODO
            break;
    case SERVER_RESTART:
            break;*/
    case CHECK_CONFIG:
            checkConfiguration();
            break;
        case SHOW_HELP:
        case SHOW_HELP_LONG:
    default:
            printf("\tUsage:\n"
                   "\t--i    get available interfaces\n"
                   "\t--t    check configuration\n"
                   "\t--k    to start webserver\n"
                   "\t--h    print this text\n");
            return 0;
    }
}
Example #3
0
int main(int argc, char **argv) {
  	glutInit(&argc, argv);
	
	if (argc > 1) {
		readConfiguration(argv[1]);
	}
	
	if (!checkConfiguration()) {
		return 0;
	}
     
	glutInitWindowSize(window_width, window_height);
	glutInitWindowPosition(0, 0);
	glutCreateWindow("Game of Life");
	glClearColor(1, 1, 1, 1);
	
	glutReshapeFunc(reshape);
	glutDisplayFunc(display);
	
	game = new GameOfLife(game_width, game_height);
	game->randomInit();
		
	update(0);
	glutMainLoop();
		
  	return 0;
}
Example #4
0
/*! Default main. The idea of separating this from the rest of doxygen,
 *  is to make it possible to write your own main, with a different 
 *  generateOutput() function for instance.
 */
int main(int argc,char **argv)
{
  initDoxygen();
  readConfiguration(argc,argv);
  checkConfiguration();
  adjustConfiguration();
  parseInput();
  generateOutput();
  return 0;
}
void configure(int arg_num, char *arg_vet[]) {

    bool config_found = false;

    for (int i = 1; i < arg_num; i++) {
	    if (!strcmp(arg_vet[i], "-help")) {
            showHelp(arg_vet[0]);
            exit(0);
        }
    }

    for (int i = 1; i < arg_num; i++) {
	    if (!strcmp(arg_vet[i], "-config")) {
            GlobalParams::config_filename = arg_vet[++i];
            config_found = true;
            break;
        }
    }

    if (!config_found)
    {
        std::ifstream infile(CONFIG_FILENAME);
        if (infile.good())
            GlobalParams::config_filename = CONFIG_FILENAME;
        else
        {
            cerr << "No YAML configuration file found!\n Use -config to load examples from config_examples folder" << endl;
            exit(0);
        }
    }

    loadConfiguration();
    parseCmdLine(arg_num, arg_vet);

    checkConfiguration();

    // Show configuration
    if (GlobalParams::verbose_mode > VERBOSE_OFF)
        showConfig();
}
Example #6
0
int main(int argc,char **argv)
{
  char cmd[256];

  if (argc<2)
  {
    printf("Usage: %s [source_file | source_dir]\n",argv[0]);
    exit(1);
  }

  // initialize data structures 
  initDoxygen();

  // setup the non-default configuration options

  // we need a place to put intermediate files
  Config_getString("OUTPUT_DIRECTORY")="/tmp/doxygen"; 
  // disable html output
  Config_getBool("GENERATE_HTML")=FALSE;
  // disable latex output
  Config_getBool("GENERATE_LATEX")=FALSE;
  // be quiet
  Config_getBool("QUIET")=TRUE;
  // turn off warnings
  Config_getBool("WARNINGS")=FALSE;
  Config_getBool("WARN_IF_UNDOCUMENTED")=FALSE;
  Config_getBool("WARN_IF_DOC_ERROR")=FALSE;
  // Extract as much as possible
  Config_getBool("EXTRACT_ALL")=TRUE;
  Config_getBool("EXTRACT_STATIC")=TRUE;
  Config_getBool("EXTRACT_PRIVATE")=TRUE;
  Config_getBool("EXTRACT_LOCAL_METHODS")=TRUE;
  // Extract source browse information, needed 
  // to make doxygen gather the cross reference info
  Config_getBool("SOURCE_BROWSER")=TRUE;

  // set the input
  Config_getList("INPUT").append(argv[1]);

  // check and finialize the configuration
  checkConfiguration();
  adjustConfiguration();

  // parse the files
  parseInput();

  // iterate over the input files
  FileNameListIterator fnli(*Doxygen::inputNameList); 
  FileName *fn;
  // foreach file with a certain name
  for (fnli.toFirst();(fn=fnli.current());++fnli)
  {
    FileNameIterator fni(*fn);
    FileDef *fd;
    // for each file definition
    for (;(fd=fni.current());++fni)
    {
      // get the references (linked and unlinked) found in this file
      findXRefSymbols(fd);
    }
  }

  // remove temporary files
  if (!Doxygen::objDBFileName.isEmpty()) unlink(Doxygen::objDBFileName);
  if (!Doxygen::entryDBFileName.isEmpty()) unlink(Doxygen::entryDBFileName);
  // clean up after us
  rmdir("/tmp/doxygen");

  while (1)
  {
    printf("> Type a symbol name or\n> .list for a list of symbols or\n> .quit to exit\n> ");
    fgets(cmd,256,stdin);
    QCString s(cmd);
    if (s.at(s.length()-1)=='\n') s=s.left(s.length()-1); // strip trailing \n
    if (s==".list") 
      listSymbols();
    else if (s==".quit") 
      exit(0);
    else 
      lookupSymbols(s);
  }
}