Collage  0.6.1
bufferConnection.h
00001 
00002 /* Copyright (c) 2007-2012, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef CO_BUFFER_CONNECTION_H
00019 #define CO_BUFFER_CONNECTION_H
00020 
00021 #include <co/connection.h>  // base class
00022 #include <lunchbox/types.h>
00023 
00024 namespace co
00025 {
00026 namespace detail { class BufferConnection; }
00027 
00029     class BufferConnection : public Connection
00030     {
00031     public:
00032         CO_API BufferConnection();
00033         CO_API virtual ~BufferConnection();
00034 
00035         CO_API void sendBuffer( ConnectionPtr connection );
00036         CO_API uint64_t getSize() const;
00037 
00038     protected:
00039         virtual void readNB( void*, const uint64_t ) { LBDONTCALL; }
00040         virtual int64_t readSync( void*, const uint64_t, const bool )
00041             { LBDONTCALL; return -1; }
00042         CO_API virtual int64_t write( const void* buffer, const uint64_t bytes);
00043 
00044         virtual Notifier getNotifier() const { LBDONTCALL; return 0; }
00045 
00046     private:
00047         detail::BufferConnection* const _impl;
00048     };
00049 }
00050 
00051 #endif //CO_BUFFER_CONNECTION_H
Generated on Mon Nov 26 2012 14:41:44 for Collage 0.6.1 by  doxygen 1.7.6.1