COVISE Core
coDoSet.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef CO_DO_SET_H
9#define CO_DO_SET_H
10
11/*
12 $Log: covise_geometry.h,v $
13 * Revision 1.1 1993/09/25 20:44:13 zrhk0125
14 * Initial revision
15 *
16*/
17
18#include "coDistributedObject.h"
19
20/***********************************************************************\
21 ** **
22 ** Geometry class Version: 1.0 **
23 ** **
24 ** **
25 ** Description : Container class handling multiple objects **
26 ** **
27 ** Classes : coDoSet **
28 ** **
29 ** Copyright (C) 1993 by University of Stuttgart **
30 ** Computer Center (RUS) **
31 ** Allmandring 30 **
32 ** 7000 Stuttgart 80 **
33 ** **
34 ** **
35 ** Author : A. Wierse (RUS) **
36 ** **
37 ** History : **
38 ** 12.08.93 Ver 1.0 **
39 ** **
40 ** **
41\***********************************************************************/
42
43#define SET_CHUNK 20
44
45// leads to duplicate symbols template class DOEXPORT ia<coDistributedObject *>;
46
47namespace covise
48{
49
51{
52 friend class coDoInitializer;
53 static coDistributedObject *virtualCtor(coShmArray *arr);
54
55private:
59
60protected:
61 int rebuildFromShm();
62 int getObjInfo(int, coDoInfo **) const;
63 coDoSet *cloneObject(const coObjInfo &newinfo) const;
64
65public:
66 coDoSet(const coObjInfo &info)
67 : coDistributedObject(info, "SETELE")
68 {
69 if (name)
70 {
71 if (getShmArray())
72 {
73 if (rebuildFromShm() == 0)
74 print_comment(__LINE__, __FILE__, "rebuildFromShm == 0");
75 }
76 else
77 {
78 print_comment(__LINE__, __FILE__, "object %s doesn't exist", name);
79 new_ok = 0;
80 }
81 }
82 };
83
85 coDoSet(const coObjInfo &info, const coDistributedObject *const *elem);
87 coDoSet(const coObjInfo &info, int numElem, const coDistributedObject *const *elem);
88 coDoSet(const coObjInfo &info, coShmArray *arr);
89 coDoSet(const coObjInfo &info, int flag);
90
91 const coDistributedObject *const *getAllElements(int *no = NULL) const;
92
93 const coDistributedObject *getElement(int no) const
94 {
95 return elements[no];
96 }
97
98 void addElement(const coDistributedObject *elem);
99
100 int getNumElements() const
101 {
102 return (int)no_of_elements;
103 }
104};
105}
106#endif
#define DOEXPORT
Definition: coExport.h:331
#define NULL
Definition: covise_list.h:22
GLuint const GLchar * name
Definition: khronos-glext.h:6722
list of all chemical elements
Definition: coConfig.h:27
static coShmArray * getShmArray(const char *name)
Definition: coDistributedObject.cpp:60
void print_comment(int line, const char *filename, const char *fmt,...)
Definition: coLog.cpp:25
Definition: coObjID.h:231
Definition: covise_shm.h:482
Definition: coDistributedObject.h:267
Definition: coDistributedObject.h:296
Definition: coDoSet.h:51
coShmPtrArray elements
Definition: coDoSet.h:58
coIntShm max_no_of_elements
Definition: coDoSet.h:57
coDoSet(const coObjInfo &info)
Definition: coDoSet.h:66
const coDistributedObject * getElement(int no) const
Definition: coDoSet.h:93
int getNumElements() const
Definition: coDoSet.h:100
coIntShm no_of_elements
Definition: coDoSet.h:56
Definition: coShmPtrArray.h:38
Definition: covise_statics.cpp:55