Create dgnhelp.cpp

/******************************************************************************
 * $Id: dgnhelp.cpp,v 1.34 2006/03/02 12:21:56 dron Exp $
 *
 * Project:  Microstation DGN Access Library
 * Purpose:  Application visible helper functions for parsing DGN information.
 * Author:   Frank Warmerdam, warmerdam@pobox.com
 *
 ******************************************************************************
 * Copyright (c) 2002, Avenza Systems Inc, http://www.avenza.com/
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 ******************************************************************************
 *
 * $Log: dgnhelp.cpp,v $
 * Revision 1.34  2006/03/02 12:21:56  dron
 * Two format strings fixed.
 *
 * Revision 1.33  2006/01/26 20:38:18  kintel
 * bugfix: DGNDumpElement(): Print DGNElemKnotWeight correctly
 *
 * Revision 1.32  2006/01/26 15:59:29  kintel
 * Cosmetic: Missing newline in DGNDumpElement() when properties was 0 for B-Splines
 *
 * Revision 1.31  2006/01/25 18:43:19  kintel
 * B-Spline curve and surface support
 *
 * Revision 1.26  2005/12/15 14:10:39  fwarmerdam
 * Fixed for QuaternionToMatrix from Marius Kintel.
 *
 * Revision 1.25  2005/11/18 17:16:35  fwarmerdam
 * added TextNode implementation from Ilya Beylin
 *
 * Revision 1.24  2004/09/15 16:06:19  fwarmerdam
 * Report 3D Cell header better.
 *
 * Revision 1.23  2004/09/15 16:00:47  fwarmerdam
 * Report 3D values for Cell Header range and origin.
 *
 * Revision 1.22  2004/09/15 14:06:25  fwarmerdam
 * added dumping of cone in DGNDumpElement()
 * A bunch of changes related to quaternion handling... not sure if it all
 * is working or not.  Contributed by user.
 *
 * Revision 1.21  2003/12/01 16:58:13  warmerda
 * Replaced DGNRad50ToAscii() with new implementation from Armin Berg.
 * This one correctly decodes values with embedded spaces, though I am
 * not certain it always trims spaces (assuming that is desirable).
 *
 * Revision 1.20  2003/09/11 20:00:28  warmerda
 * avoid casting warning in Quat to Matrix func
 *
 * Revision 1.19  2003/08/19 20:16:14  warmerda
 * Added support for CONE and 3D solid/surface header.
 * Implemented DGNQuaternionToMatrix function.
 * Marius Kintel
 *
 * Revision 1.18  2003/06/27 14:38:26  warmerda
 * avoid warnings
 *
 * Revision 1.17  2003/05/21 03:42:01  warmerda
 * Expanded tabs
 *
 * Revision 1.16  2003/05/15 14:47:23  warmerda
 * implement quaternion support on write
 *
 * Revision 1.15  2003/05/12 18:48:57  warmerda
 * added preliminary 3D write support
 *
 * Revision 1.14  2003/01/20 20:05:01  warmerda
 * added DGNAsciiToRad50()
 *
 * Revision 1.13  2003/01/09 14:59:47  warmerda
 * fixed DGNGetLinkage() test for DMRS linkages as provided by Henk Jan Priester
 *
 * Revision 1.12  2002/11/13 21:26:32  warmerda
 * added more documentation
 *
 * Revision 1.11  2002/11/12 19:44:17  warmerda
 * added view display
 *
 * Revision 1.10  2002/10/07 13:14:18  warmerda
 * added association id support
 *
 * Revision 1.9  2002/05/31 03:40:22  warmerda
 * added improved support for parsing attribute linkages
 *
 * Revision 1.8  2002/05/30 19:24:38  warmerda
 * add partial support for tag type 5
 *
 * Revision 1.7  2002/04/22 20:44:41  warmerda
 * added (partial) cell library support
 *
 * Revision 1.6  2002/04/16 17:56:07  warmerda
 * Initialize ch.
 *
 * Revision 1.5  2002/03/14 21:38:05  warmerda
 * removed DGN_DEBUG macro
 *
 * Revision 1.4  2002/03/12 17:07:26  warmerda
 * added tagset and tag value element support
 *
 * Revision 1.3  2002/02/22 22:18:10  warmerda
 * ensure that multi-part attributes supported for fill info
 *
 * Revision 1.2  2002/01/15 06:42:30  warmerda
 * remove stub statement
 *
 * Revision 1.1  2002/01/15 06:38:02  warmerda
 * New
 *
 */