001    /*
002     * To change this template, choose Tools | Templates
003     * and open the template in the editor.
004     */
005    
006    package org.bridj.cpp;
007    
008    import java.util.Stack;
009    
010    import org.bridj.NativeObject;
011    import org.bridj.Pointer;
012    import org.bridj.StructObject;
013    import org.bridj.ann.Runtime;
014    import org.bridj.cpp.mfc.MFCRuntime;
015    import org.bridj.BridJ;
016    
017    import java.util.Map;
018    
019    /**
020     * Base class for C++ structs and classes.
021     * @author Olivier
022     */
023    @Runtime(CPPRuntime.class)
024    public abstract class CPPObject extends StructObject {
025            Map<Class<?>, Object[]> templateParameters;
026            
027            protected CPPObject() {}
028        protected CPPObject(Pointer<? extends CPPObject> peer) {
029            super(peer);
030        }
031        protected CPPObject(Void voidArg, int constructorId, Object... args) {
032            super(voidArg, constructorId, args);
033        }
034        /*
035        @Override
036        protected void finalize() throws Throwable {
037                    BridJ.deallocate(this);
038        }*/
039    }