tng 2002/11/08 07:55:56 Modified: c/doc build-misc.xml faq-distrib.xml program-others.xml program.xml Log: Documentation update: move porting guideline to programming guide. Revision Changes Path 1.11 +2 -85 xml-xerces/c/doc/build-misc.xml Index: build-misc.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/build-misc.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- build-misc.xml 25 Jun 2002 21:03:16 -0000 1.10 +++ build-misc.xml 8 Nov 2002 15:55:56 -0000 1.11 @@ -201,91 +201,8 @@ <s2 title="I wish to port &XercesCProjectName; to my favourite platform. Do you have any suggestions?"> <p>All platform dependent code in &XercesCProjectName; has been isolated to a couple of files, which should ease the porting - effort. Here are the basic steps that should be followed to - port &XercesCProjectName;.</p> - - <ol> - - <li>The directory <code>src/xercesc/util/Platforms</code> contains the - platform sensitive files while <code>src/xercesc/util/Compilers</code> contains - all development environment sensitive files. Each operating - system has a file of its own and each development environment - has another one of its own too. - - <br/> - - As an example, the Win32 platform as a <code>Win32Defs.hpp</code> file - and the Visual C++ environment has a <code>VCPPDefs.hpp</code> file. - These files set up certain define tokens, typedefs, - constants, etc... that will drive the rest of the code to - do the right thing for that platform and development - environment. AIX/CSet have their own <code>AIXDefs.hpp</code> and - <code>CSetDefs.hpp</code> files, and so on. You should create new - versions of these files for your platform and environment - and follow the comments in them to set up your own. - Probably the comments in the Win32 and Visual C++ will be - the best to follow, since that is where the main - development is done.</li> - - <li>Next, edit the file <code>XercesDefs.hpp</code>, which is where all - of the fundamental stuff comes into the system. You will - see conditional sections in there where the above - per-platform and per-environment headers are brought in. - Add the new ones for your platform under the appropriate - conditionals.</li> - - <li>Now edit <code>AutoSense.hpp</code>. Here we set canonical &XercesCProjectName; - internal <code>#define</code> tokens which indicate the platform and - compiler. These definitions are based on known platform - and compiler defines. - <br/> - <code>AutoSense.hpp</code> is included in <code>XercesDefs.hpp</code> and the - canonical platform and compiler settings thus defined will - make the particular platform and compiler headers to be - the included at compilation. - <br/> - It might be a little tricky to decipher this file so be - careful. If you are using say another compiler on Win32, - probably it will use similar tokens so that the platform - will get picked up already using what is already there.</li> - - <li>Once this is done, you will then need to implement a - version of the <ref>platform utilities</ref> for your platform. - Each operating system has a file which implements some - methods of the XMLPlatformUtils class, specific to that - operating system. These are not terribly complex, so it - should not be a lot of work. The Win32 version is called - <code>Win32PlatformUtils.cpp</code>, the AIX version is - <code>AIXPlatformUtils.cpp</code> and so on. Create one for your - platform, with the correct name, and empty out all of the - implementation so that just the empty shells of the - methods are there (with dummy returns where needed to make - the compiler happy.) Once you've done that, you can start - to get it to build without any real implementation.</li> - - <li>Once you have the system building, then start - implementing your own platform utilities methods. Follow - the comments in the Win32 version as to what they do, the - comments will be improved in subsequent versions, but they - should be fairly obvious now. Once you have these - implementations done, you should be able to start - debugging the system using the demo programs.</li> - </ol> - - <p>Other concerns are:</p> - - <ul> - <li>Does ICU compile on your platform? If not, then you'll need to - create a transcoder implementation that uses your local transcoding - services. The Iconv transcoder should work for you, though perhaps - with some modifications.</li> - <li>What message loader will you use? To get started, you can use the - "in memory" one, which is very simple and easy. Then, once you get - going, you may want to adapt the message catalog message loader, or - write one of your own that uses local services.</li> - </ul> - - <p>That is the work required in a nutshell!</p> + effort. Please refer to <jump href="program-others.html#PortingGuidelines">Porting + Guidelines</jump> for further details.</p> </s2> 1.26 +1 -1 xml-xerces/c/doc/faq-distrib.xml Index: faq-distrib.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/faq-distrib.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- faq-distrib.xml 23 Aug 2002 14:09:37 -0000 1.25 +++ faq-distrib.xml 8 Nov 2002 15:55:56 -0000 1.26 @@ -211,7 +211,7 @@ many platforms as there are. Again, due to limited resources we cannot do all the ports. We will help you make this port happen. Here are some <jump - href="build-misc.html#faq-4">Porting + href="program-others.html#PortingGuidelines">Porting Guidelines</jump>.</p> <p>We strongly encourage you to submit the changes that 1.7 +95 -0 xml-xerces/c/doc/program-others.xml Index: program-others.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/program-others.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- program-others.xml 8 Nov 2002 15:28:02 -0000 1.6 +++ program-others.xml 8 Nov 2002 15:55:56 -0000 1.7 @@ -273,6 +273,101 @@ </s2> + <anchor name="PortingGuidelines"/> + <s2 title="Porting Guidelines"> + + <p>All platform dependent code in &XercesCProjectName; has been + isolated to a couple of files, which should ease the porting + effort. Here are the basic steps that should be followed to + port &XercesCProjectName;.</p> + + <ol> + + <li>The directory <code>src/xercesc/util/Platforms</code> contains the + platform sensitive files while <code>src/xercesc/util/Compilers</code> contains + all development environment sensitive files. Each operating + system has a file of its own and each development environment + has another one of its own too. + + <br/> + + As an example, the Win32 platform as a <code>Win32Defs.hpp</code> file + and the Visual C++ environment has a <code>VCPPDefs.hpp</code> file. + These files set up certain define tokens, typedefs, + constants, etc... that will drive the rest of the code to + do the right thing for that platform and development + environment. AIX/CSet have their own <code>AIXDefs.hpp</code> and + <code>CSetDefs.hpp</code> files, and so on. You should create new + versions of these files for your platform and environment + and follow the comments in them to set up your own. + Probably the comments in the Win32 and Visual C++ will be + the best to follow, since that is where the main + development is done.</li> + + <li>Next, edit the file <code>XercesDefs.hpp</code>, which is where all + of the fundamental stuff comes into the system. You will + see conditional sections in there where the above + per-platform and per-environment headers are brought in. + Add the new ones for your platform under the appropriate + conditionals.</li> + + <li>Now edit <code>AutoSense.hpp</code>. Here we set canonical &XercesCProjectName; + internal <code>#define</code> tokens which indicate the platform and + compiler. These definitions are based on known platform + and compiler defines. + <br/> + <code>AutoSense.hpp</code> is included in <code>XercesDefs.hpp</code> and the + canonical platform and compiler settings thus defined will + make the particular platform and compiler headers to be + the included at compilation. + <br/> + It might be a little tricky to decipher this file so be + careful. If you are using say another compiler on Win32, + probably it will use similar tokens so that the platform + will get picked up already using what is already there.</li> + + <li>Once this is done, you will then need to implement a + version of the <ref>platform utilities</ref> for your platform. + Each operating system has a file which implements some + methods of the XMLPlatformUtils class, specific to that + operating system. These are not terribly complex, so it + should not be a lot of work. The Win32 version is called + <code>Win32PlatformUtils.cpp</code>, the AIX version is + <code>AIXPlatformUtils.cpp</code> and so on. Create one for your + platform, with the correct name, and empty out all of the + implementation so that just the empty shells of the + methods are there (with dummy returns where needed to make + the compiler happy.) Once you've done that, you can start + to get it to build without any real implementation.</li> + + <li>Once you have the system building, then start + implementing your own platform utilities methods. Follow + the comments in the Win32 version as to what they do, the + comments will be improved in subsequent versions, but they + should be fairly obvious now. Once you have these + implementations done, you should be able to start + debugging the system using the demo programs.</li> + </ol> + + <p>Other concerns are:</p> + + <ul> + <li>Does ICU compile on your platform? If not, then you'll need to + create a transcoder implementation that uses your local transcoding + services. The Iconv transcoder should work for you, though perhaps + with some modifications.</li> + <li>What message loader will you use? To get started, you can use the + "in memory" one, which is very simple and easy. Then, once you get + going, you may want to adapt the message catalog message loader, or + write one of your own that uses local services.</li> + <li>What should I define XMLCh to be? Please refer to <jump + href="build-misc.html#XMLChInfo">What should I define XMLCh to be?</jump> for + further details.</li> + </ul> + + <p>That is the work required in a nutshell!</p> + </s2> + <anchor name="CPPNamespace"/> <s2 title="Using C++ Namespace"> 1.32 +1 -0 xml-xerces/c/doc/program.xml Index: program.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/program.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- program.xml 8 Nov 2002 15:28:02 -0000 1.31 +++ program.xml 8 Nov 2002 15:55:56 -0000 1.32 @@ -78,6 +78,7 @@ <li><jump href="program-others.html#GrammarCache">Preparsing Grammar and Grammar Caching</jump></li> <li><jump href="program-others.html#LoadableMessageText">Loadable Message Text</jump></li> <li><jump href="program-others.html#PluggableTranscoders">Pluggable Transcoders</jump></li> + <li><jump href="program-others.html#PortingGuidelines">Porting Guidelines</jump></li> <li><jump href="program-others.html#CPPNamespace">Using C++ Namespace</jump></li> </ul> </s2>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]