int main( int argc, char **argv ) { int defs_ok = _LANG_DEFS_OK(); if( argc < 5 || argc > 10 ) { fatal( "usage: msgencod [-w] [-i] [-ip] [-q] [-p] <gml> <msgc> <msgh> <levh>" ); } if( ! defs_ok ) { fatal( "language index mismatch" ); } processOptions( argv + 1 ); readGML(); if( flags.gen_gpick ) { writeMsgHGP(); writeMsgCGP(); writeLevHGP(); }else{ compressMsgs(); writeMsgH(); writeMsgC(); writeLevH(); } closeFiles(); if( flags.international ) { dumpInternational(); } if( ! flags.quiet ) { dumpStats(); } if( warnings != 0 && flags.warnings_always_rebuild ) { forceRebuild(); } return( errors ? EXIT_FAILURE : EXIT_SUCCESS ); }
void GeometryBuffer::addIndex(uint8* buf, uint32 size) { indexData.resize(indexData.size() + size); std::copy(buf, buf+size, indexData.end() - size); forceRebuild(); }
void GeometryBuffer::setIndex(uint8* buf, uint32 size) { indexData.clear(); addIndex(buf, size); forceRebuild(); }
void GeometryBuffer::add(uint8* buf, uint32 size) { data.resize(data.size() + size); std::copy(buf, buf+size, data.end() - size); forceRebuild(); }
void GeometryBuffer::clear() { data.clear(); forceRebuild(); }