X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPipeline%2FPort.h;fp=lib%2FcpPlugins%2FPipeline%2FPort.h;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=98d81e784abb3283ffa99dfd69429d7b7ecafd18;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpPlugins/Pipeline/Port.h b/lib/cpPlugins/Pipeline/Port.h deleted file mode 100644 index 98d81e7..0000000 --- a/lib/cpPlugins/Pipeline/Port.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef __cpPlugins__Pipeline__Port__h__ -#define __cpPlugins__Pipeline__Port__h__ - -#include -#include - -namespace cpPlugins -{ - namespace Pipeline - { - /** - */ - class cpPlugins_EXPORT Port - { - public: - typedef Port Self; - - public: - Port( bool required = true ); - virtual ~Port( ); - - virtual void Add( DataObject* o ) = 0; - virtual DataObject* Get( unsigned int i = 0 ) = 0; - virtual const DataObject* Get( unsigned int i = 0 ) const = 0; - virtual unsigned int Size( ) const = 0; - virtual bool IsValid( ) const = 0; - - virtual bool IsRequired( ) const; - virtual void Clear( ); - - template< class _TType > - inline void Configure( ) { this->m_Sample = _TType::New( ); } - - protected: - bool m_Required; - DataObject::Pointer m_Sample; - }; - - /** - */ - class cpPlugins_EXPORT SingleDataPort - : public Port - { - public: - typedef SingleDataPort Self; - typedef Port Superclass; - - public: - SingleDataPort( bool required = true ); - virtual ~SingleDataPort( ); - - virtual void Add( DataObject* o ) override; - virtual DataObject* Get( unsigned int i = 0 ) override; - virtual const DataObject* Get( unsigned int i = 0 ) const override; - virtual unsigned int Size( ) const override; - virtual bool IsValid( ) const override; - virtual void Clear( ) override; - - protected: - DataObject::Pointer m_Data; - }; - - /** - */ - class cpPlugins_EXPORT OutputPort - : public SingleDataPort - { - public: - typedef OutputPort Self; - typedef SingleDataPort Superclass; - typedef Port BaseClass; - - public: - OutputPort( bool required = true ); - virtual ~OutputPort( ); - - void Set( DataObject* o ); - }; - - /** - */ - class cpPlugins_EXPORT InputPort - : public SingleDataPort - { - public: - typedef InputPort Self; - typedef SingleDataPort Superclass; - typedef Port BaseClass; - - public: - InputPort( bool required = true ); - virtual ~InputPort( ); - }; - - /** - */ - class cpPlugins_EXPORT MultipleInputsPort - : public Port - { - public: - typedef MultipleInputsPort Self; - typedef Port Superclass; - - public: - MultipleInputsPort( bool required = true ); - virtual ~MultipleInputsPort( ); - - virtual void Add( DataObject* o ) override; - virtual DataObject* Get( unsigned int i = 0 ) override; - virtual const DataObject* Get( unsigned int i = 0 ) const override; - virtual unsigned int Size( ) const override; - virtual bool IsValid( ) const override; - virtual void Clear( ) override; - - void Delete( unsigned int id ); - - protected: - std::vector< DataObject::Pointer > m_Data; - }; - - } // ecapseman - -} // ecapseman - -#endif // __cpPlugins__Pipeline__Port__h__ - -// eof - $RCSfile$