00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_KERNEL_FRAGMENT_H 00006 #define BALL_KERNEL_FRAGMENT_H 00007 00008 #ifndef BALL_KERNEL_ATOMCONTAINER_H 00009 # include <BALL/KERNEL/atomContainer.h> 00010 #endif 00011 00012 namespace BALL 00013 { 00020 class BALL_EXPORT Fragment 00021 : public AtomContainer 00022 { 00023 public: 00024 00025 BALL_CREATE_DEEP(Fragment) 00026 00027 00030 00032 enum Property 00033 { 00035 NUMBER_OF_PROPERTIES = AtomContainer::NUMBER_OF_PROPERTIES 00036 }; 00037 00039 00042 00045 Fragment(); 00046 00049 Fragment(const Fragment& fragment, bool deep = true); 00050 00053 Fragment(const String& name); 00054 00057 virtual ~Fragment(); 00058 00060 00063 00067 void persistentWrite(PersistenceManager& pm, const char* name = 0) const; 00068 00072 void persistentRead(PersistenceManager& pm); 00073 00075 00078 00083 Fragment& operator = (const Fragment& fragment); 00084 00086 00091 bool operator == (const Fragment& fragment) const; 00092 00096 bool operator != (const Fragment& fragment) const; 00097 00101 00108 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const; 00109 00111 }; 00112 00113 // required for visual studio 00114 #ifdef BALL_COMPILER_MSVC 00115 template class BALL_EXPORT UnaryProcessor<Fragment>; 00116 #endif 00117 } // namespace BALL 00118 00119 #endif // BALL_KERNEL_FRAGMENT_H