Ejemplo n.º 1
0
/*  The main function - starts the shell */
int main() {
    /*char *s = "ls -al . < in.txt > out.txt | grep . | cd work";
    Process *p = readCommand(s, strlen(s));
    printf("%s\n", p->prog);*/
    doExecution();
    return 0;
}
void RenderPartition::execute(void)
{
    if(_bDone == false)
    {
        setupExecution();
        doExecution   ();
    }

    GroupStore::iterator gIt  = _vGroupStore.begin();
    GroupStore::iterator gEnd = _vGroupStore.end  ();

    while(gIt != gEnd)
    {
        (*gIt)->execute();
//        (*gIt)->exit   ();

        ++gIt;
    }
}
void RenderPartition::execute(HardwareContext *pContext, DrawEnv *pEnv)
{
#ifdef OSG_RENPART_DUMP_PAR
    fprintf(stderr, "execute %p %d\n", this, UInt32(_ubState));
    fflush(stderr);
#endif

    switch(_ubState)
    {
        case Setup:
        {
            this->setupExecution(true);
            ++_ubState;
        }
        break;

        case Execute:
        {
            this->doExecution();
            ++_ubState;
        }
        break;

        case Full:
        {
            if(_bDone == false)
            {
                setupExecution();
                doExecution   ();
            }
        }
        break;
    }

#ifdef OSG_RENPART_DUMP_PAR
    fprintf(stderr, "execute done %p %d\n", this, UInt32(_ubState));
    fflush(stderr);
#endif
}
Ejemplo n.º 4
0
// this just wraps ALL the code in total catch block
int Kernel::run(int argc, char const * argv[], const std::string& appName)
{
    m_appName = appName;

    ProgramArgs args;

    try
    {
        doSwitches(argc, argv, args);
    }
    catch (const pdal_error& e)
    {
        Utils::printError(e.what());
        return 1;
    }

    if (m_showHelp)
    {
        outputHelp(args);
        return 0;
    }

    int startup_status = doStartup();
    if (startup_status)
        return startup_status;

    int execution_status = doExecution(args);

    // note we will try to shutdown cleanly even if we got an error condition
    // in the execution phase

    int shutdown_status = doShutdown();

    if (execution_status)
        return execution_status;

    return shutdown_status;
}