source: trunk/examples/extended/parallel/ParN02/AnnotatedFiles/G4THitsCollection.msh @ 1292

Last change on this file since 1292 was 807, checked in by garnier, 16 years ago

update

File size: 2.1 KB
Line 
1%{
2#include <G4THitsCollection.hh>
3
4%}
5
6// This file is generated automatically from G4THitsCollection.hh .  It is an
7//   intermediate file useful for debugging, but otherwise may be deleted.
8
9 marshaling class MarshaledG4HitsCollection (G4HitsCollection* param) {
10
11      void* theCollection;
12    //FIELDMARSHAL:
13    {
14        int copy_off = 0;
15        int $ELE_COUNT;
16         $ELE_COUNT = ((G4THitsCollection<ExN02TrackerHit>*)$THIS)->entries();
17        memcpy( $$+copy_off, &$ELE_COUNT,sizeof(int));
18        copy_off += sizeof(int);
19        for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){
20                        ExN02TrackerHit*   $ELEMENT;
21                         $ELEMENT = (*((G4THitsCollection<ExN02TrackerHit>*)$THIS))[$ELE_INDEX];
22                        MarshaledExN02TrackerHit   marEle($ELEMENT);
23                        EXTEND_BUFFER(marEle.getBufferSize());
24                        memcpy($$+copy_off, marEle.getBuffer(), marEle.getBufferSize());
25                        copy_off += marEle.getBufferSize();
26                }
27        $SIZE = copy_off;
28
29    }
30    //FIELDUNMARSHAL:
31    {
32                int copy_off = 0;
33                int $ELE_COUNT;
34                memcpy(&$ELE_COUNT, $$+copy_off, sizeof(int));
35                copy_off += sizeof(int);
36                for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){
37                        MarshaledExN02TrackerHit   marEle($$+copy_off);
38                        ExN02TrackerHit*   $ELEMENT = (ExN02TrackerHit*  )marEle.unmarshal();
39                        copy_off += marEle.getBufferSize();
40                         ((G4THitsCollection<ExN02TrackerHit>*)$THIS)->insert((ExN02TrackerHit*)$ELEMENT);
41                }
42
43    }
44    //FIELDSIZE:
45    {
46
47    }
48        unmarshaling constructor {
49        $THIS = new G4HitsCollection();
50        }
51}
52
53template <class T> marshaling class MarshaledG4THitsCollection<T> (G4THitsCollection<T>* param)  : public G4HitsCollection {
54    int __dummy569; // marshaling code for MSH_superclass
55    //FIELDMARSHAL:
56    {
57                MarshaledG4HitsCollection marParent($THIS);
58                EXTEND_BUFFER(marParent.getBufferSize());
59                memcpy($$,marParent.getBuffer(), marParent.getBufferSize());
60                $SIZE = marParent.getBufferSize();
61
62    }
63    //FIELD UNMARSHAL:
64    {
65                MarshaledG4HitsCollection marObj($$);
66                marObj.unmarshalTo($THIS);
67
68    }
69    //FIELD SIZE :
70    {
71                //code for size, just dummy code because the size will be set correctly at the end of marshaling code
72
73    }
74        unmarshaling constructor {
75        $THIS = new G4THitsCollection<T>();
76        }
77}
78
Note: See TracBrowser for help on using the repository browser.