BALL  1.4.1
connectedComponentsProcessor.h
Go to the documentation of this file.
00001 #ifndef BALL_STRUCTURE_CONNECTEDCOMPONENTSPROCESSOR_H
00002 #define BALL_STRUCTURE_CONNECTEDCOMPONENTSPROCESSOR_H
00003 
00004 #ifndef BALL_CONCEPT_PROCESSOR_H
00005 # include <BALL/CONCEPT/processor.h>
00006 #endif
00007 
00008 #ifndef BALL_KERNEL_SYSTEM_H
00009 # include <BALL/KERNEL/system.h>
00010 #endif
00011 
00012 namespace BALL
00013 {
00020   class BALL_EXPORT ConnectedComponentsProcessor
00021     : public UnaryProcessor<AtomContainer>
00022   {
00023     public:
00027     typedef std::vector<Atom*>      Component;
00028     typedef std::vector<Component>  ComponentVector;
00030 
00031     BALL_CREATE(ConnectedComponentsProcessor);
00032 
00033 
00037 
00039     ConnectedComponentsProcessor();
00040 
00042     virtual ~ConnectedComponentsProcessor();
00044 
00048 
00050     virtual bool start();
00051 
00054     void clear();
00055 
00058     virtual Processor::Result operator ()(AtomContainer& ac);
00059 
00061     virtual bool finish();
00062 
00064 
00068 
00070     Size getNumberOfConnectedComponents();
00071 
00073     ComponentVector& getComponents();
00074 
00076     const ComponentVector& getComponents() const;
00077 
00091     Size splitIntoMolecules(System& to_split);
00092 
00094     
00095     protected:
00096       ComponentVector components_;
00097   };
00098 }
00099 
00100 #endif // BALL_STRUCTURE_CONNECTEDCOMPONENTSPROCESSOR_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines