[svn] / trunk / src / examples / eqPly / main.cpp Repository:
ViewVC logotype

View of /trunk/src/examples/eqPly/main.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1066 - (download) (as text) (annotate)
Mon Apr 30 09:04:54 2007 UTC (2 months, 1 week ago) by eile
File size: 1449 byte(s)
Fix disconnection of resident nodes, which prevented subsequent
reconnects to the node.
[ ] May break build
[ ] Breaks existing applications
[x] Bugfix
[ ] New Feature
[ ] Cleanup
[ ] Optimization
[ ] Documentation
/* Copyright (c) 2005-2007, Stefan Eilemann <[email protected]> 
   All rights reserved. */
#include "eqPly.h"
#include "channel.h"
#include "config.h"
#include "node.h"
#include "pipe.h"
#include "window.h"
#include <stdlib.h>
using namespace eqBase;
using namespace std;
class NodeFactory : public eq::NodeFactory
{
public:
    virtual eq::Config*  createConfig()   { return new eqPly::Config; }
    virtual eq::Node*    createNode()     { return new eqPly::Node; }
    virtual eq::Pipe*    createPipe()     { return new eqPly::Pipe; }
    virtual eq::Window*  createWindow()   { return new eqPly::Window; }
    virtual eq::Channel* createChannel()  { return new eqPly::Channel; }
};
int main( int argc, char** argv )
{
    // 1. parse arguments
    eqPly::LocalInitData initData;
    initData.parseArguments( argc, argv );
    // 2. initialisation of local client node
    NodeFactory nodeFactory;
    if( !eq::init( argc, argv, &nodeFactory ))
    {
        EQERROR << "Equalizer init failed" << endl;
        return EXIT_FAILURE;
    }
    RefPtr< eqPly::Application > client = new eqPly::Application( initData );
    if( !client->initLocal( argc, argv ))
    {
        EQERROR << "Can't init client" << endl;
        eq::exit();
        return EXIT_FAILURE;
    }
    // 3. run client
    const int ret = client->run();
    // 4. cleanup and exit
    client->exitLocal();
    client = 0;
    eq::exit();
    return ret;
}

Back to Equalizer website
ViewVC Help
Powered by ViewVC 1.0.3