|
Last change
on this file since 3383 was 3383, checked in by Eric.Larour, 16 years ago |
|
New Hook and Element Properties, to simplify element framework. This is a massive commit
|
|
File size:
1.6 KB
|
| Rev | Line | |
|---|
| [3383] | 1 | /*!\file Hook.h
|
|---|
| 2 | * \brief: header file for hook object.
|
|---|
| 3 | * A hook is a class that can store the id, offset, and object corresponding to this id and offset into a dataset.
|
|---|
| 4 | * For example, an element has a hook to its nodes. A node has a hook to its vertex. The hook abstracts the need for having
|
|---|
| 5 | * ids and offsets (necesarry for proper configuration of an object) in our objects.
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef _HOOK_H_
|
|---|
| 9 | #define _HOOK_H_
|
|---|
| 10 |
|
|---|
| 11 | #include "./Object.h"
|
|---|
| 12 | #include "./../DataSet/DataSet.h"
|
|---|
| 13 | #include "../toolkits/toolkits.h"
|
|---|
| 14 |
|
|---|
| 15 | class DataSet;
|
|---|
| 16 | class Object;
|
|---|
| 17 |
|
|---|
| 18 | class Hook{
|
|---|
| 19 |
|
|---|
| 20 | private:
|
|---|
| 21 |
|
|---|
| 22 | int num; //number of objects being hooked onto
|
|---|
| 23 | Object** objects; //list of object pointers. we do not allocate objects, just a list a pointers, that will get to point to the real objects from a dataset.
|
|---|
| 24 | int* ids; //list of object ids, to go look for them in datasets.
|
|---|
| 25 | int* offsets; //list of object offsets into datasets, to speed up lookup.
|
|---|
| 26 |
|
|---|
| 27 | public:
|
|---|
| 28 |
|
|---|
| 29 | Hook();
|
|---|
| 30 | Hook(int* ids, int num);
|
|---|
| 31 | Hook(Object** objects, int* ids, int* offsets,int num);
|
|---|
| 32 | Hook(Hook* hook);
|
|---|
| 33 | ~Hook();
|
|---|
| 34 | void Marshall(char** pmarshalled_dataset);
|
|---|
| 35 | int MarshallSize();
|
|---|
| 36 | void Demarshall(char** pmarshalled_dataset);
|
|---|
| 37 | Object* delivers(void); //single object deliver
|
|---|
| 38 | Object** deliverp(void); //deliver all objects
|
|---|
| 39 | void configure(DataSet* dataset);
|
|---|
| 40 | void Echo(void);
|
|---|
| 41 | void DeepEcho(void);
|
|---|
| 42 | Hook* Spawn(int* indices, int numindices);
|
|---|
| 43 | Object** GetObjects(void);
|
|---|
| 44 | int* GetIds(void);
|
|---|
| 45 | int* GetOffsets(void);
|
|---|
| 46 | int GetNum(void);
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | };
|
|---|
| 50 |
|
|---|
| 51 | #endif /* _HOOK_H_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.