00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __OP_GroupList_h__
00022 #define __OP_GroupList_h__
00023
00024 #include "OP_API.h"
00025 #include "OP_Error.h"
00026 #include <UT/UT_PtrArray.h>
00027 #include <SYS/SYS_Types.h>
00028
00029 class OP_Node;
00030 class OP_Network;
00031 class OP_Group;
00032
00033 class OP_API OP_GroupList : public UT_PtrArray<OP_Group *>
00034 {
00035 public:
00036 OP_GroupList(OP_Network *owner);
00037 virtual ~OP_GroupList();
00038
00039 void clearAndDestroy();
00040
00041 OP_Group *createGroup(const char *name, fpreal x = .0F, fpreal y = .0F);
00042 OP_Group *findGroup(const char *name) const;
00043 int deleteGroup(const char *name);
00044 int deleteGroup(OP_Group *group);
00045
00046
00047
00048
00049 int getMembers(UT_PtrArray<OP_Group *> &list, int internal=0) const;
00050
00051
00052
00053
00054
00055
00056 int getMemberships(const OP_Node *node,
00057 UT_PtrArray<OP_Group *> &list,
00058 int internal=0) const;
00059
00060
00061
00062
00063
00064 int saveCount() const;
00065 void saveToClipboard(ostream &os, int all=0, int list=0) const;
00066 bool loadFromClipboard(UT_IStream &is, const char *path) const;
00067 OP_ERROR save(ostream &os, int binary = 0);
00068 bool load(UT_IStream &is, int merge = 0);
00069
00070 void clearUndoFlags();
00071
00072 private:
00073 OP_Network *myNetwork;
00074 };
00075
00076 #endif