001    package org.bridj.cpp.std;
002    
003    import org.bridj.*;
004    
005    ///http://www.codesourcery.com/public/cxx-abi/cxx-vtable-ex.html
006    
007    /**
008     * Util methods for STL bindings in BridJ, <i>intended for internal use only</i>.
009     * @author ochafik
010     */
011    public final class STL extends StructIO.DefaultCustomizer {
012        /**
013         * Perform platform-dependent structure bindings adjustments
014         */
015        @Override
016            public void afterBuild(StructIO io) {
017            Class c = io.getStructClass();
018            if (c == vector.class) {
019                if (Platform.isWindows()) {
020                    // On Windows, vector begins by 3 pointers, before the start+finish+end pointers :
021                    io.prependBytes(3 * Pointer.SIZE);
022                }
023            }
024            }
025    }
026