xref: /trunk/main/idl/source/objects/module.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_idl.hxx"
30 
31 #include <ctype.h>
32 #include <stdio.h>
33 
34 #include <attrib.hxx>
35 #include <module.hxx>
36 #include <globals.hxx>
37 #include <database.hxx>
38 #include <tools/fsys.hxx>
39 #include <tools/debug.hxx>
40 
41 /****************** SvMetaModule ******************************************/
42 SV_IMPL_META_FACTORY1( SvMetaModule, SvMetaExtern );
43 
44 /*************************************************************************
45 |*
46 |*    SvMetaModule::SvMetaModule()
47 |*
48 |*    Beschreibung
49 |*    Ersterstellung    MM 12.12.94
50 |*    Letzte Aenderung  MM 12.12.94
51 |*
52 *************************************************************************/
53 SvMetaModule::SvMetaModule()
54 #ifdef IDL_COMPILER
55     : bImported( sal_False )
56     , bIsModified( sal_False )
57 #endif
58 {
59 }
60 
61 #ifdef IDL_COMPILER
62 SvMetaModule::SvMetaModule( const String & rIdlFileName, sal_Bool bImp )
63     : aIdlFileName( rIdlFileName )
64     , bImported( bImp ), bIsModified( sal_False )
65 {
66 }
67 #endif
68 
69 /*************************************************************************
70 |*
71 |*    SvMetaModule::Load()
72 |*
73 |*    Beschreibung
74 |*    Ersterstellung    MM 12.12.94
75 |*    Letzte Aenderung  MM 12.12.94
76 |*
77 *************************************************************************/
78 #define MODULE_VER      0x0001
79 void SvMetaModule::Load( SvPersistStream & rStm )
80 {
81     bImported = sal_True; // immer importiert
82     SvMetaExtern::Load( rStm );
83 
84     sal_uInt16 nVer;
85 
86     rStm >> nVer; // Version
87     DBG_ASSERT( (nVer & ~IDL_WRITE_MASK) == MODULE_VER, "false version" );
88 
89     rStm >> aClassList;
90     rStm >> aTypeList;
91     rStm >> aAttrList;
92     // Browser
93     rStm.ReadByteString( aIdlFileName );
94     rStm.ReadByteString( aHelpFileName );
95     rStm.ReadByteString( aSlotIdFile );
96     rStm.ReadByteString( aModulePrefix );
97 
98     // Compiler Daten lesen
99     sal_uInt16 nCmpLen;
100     rStm >> nCmpLen;
101 #ifdef IDL_COMPILER
102     DBG_ASSERT( (nVer & IDL_WRITE_MASK) == IDL_WRITE_COMPILER,
103                 "no idl compiler format" );
104     rStm >> aBeginName;
105     rStm >> aEndName;
106     rStm >> aNextName;
107 #else
108     rStm->SeekRel( nCmpLen );
109 #endif
110 }
111 
112 /*************************************************************************
113 |*
114 |*    SvMetaModule::Save()
115 |*
116 |*    Beschreibung
117 |*    Ersterstellung    MM 12.12.94
118 |*    Letzte Aenderung  MM 12.12.94
119 |*
120 *************************************************************************/
121 void SvMetaModule::Save( SvPersistStream & rStm )
122 {
123     SvMetaExtern::Save( rStm );
124 
125     rStm << (sal_uInt16)(MODULE_VER | IDL_WRITE_COMPILER); // Version
126 
127     rStm << aClassList;
128     rStm << aTypeList;
129     rStm << aAttrList;
130     // Browser
131     rStm.WriteByteString( aIdlFileName );
132     rStm.WriteByteString( aHelpFileName );
133     rStm.WriteByteString( aSlotIdFile );
134     rStm.WriteByteString( aModulePrefix );
135 
136     // Compiler Daten schreiben
137     sal_uInt16 nCmpLen = 0;
138     sal_uLong nLenPos = rStm.Tell();
139     rStm << nCmpLen;
140 #ifdef IDL_COMPILER
141     rStm << aBeginName;
142     rStm << aEndName;
143     rStm << aNextName;
144     // Laenge der Compiler Daten schreiben
145     sal_uLong nPos = rStm.Tell();
146     rStm.Seek( nLenPos );
147     rStm << (sal_uInt16)( nPos - nLenPos - sizeof( sal_uInt16 ) );
148     rStm.Seek( nPos );
149 #endif
150 }
151 
152 /*************************************************************************
153 |*
154 |*    SvMetaModule::SetName()
155 |*
156 |*    Beschreibung
157 |*    Ersterstellung    MM 12.12.94
158 |*    Letzte Aenderung  MM 12.12.94
159 |*
160 *************************************************************************/
161 sal_Bool SvMetaModule::SetName( const ByteString & rName, SvIdlDataBase * pBase )
162 {
163     if( pBase )
164     {
165         if( pBase->GetModule( rName ) )
166             return sal_False;
167     }
168     return SvMetaExtern::SetName( rName );
169 }
170 
171 #ifdef IDL_COMPILER
172 /*************************************************************************
173 |*    SvMetaModule::GetNextName()
174 |*
175 |*    Beschreibung
176 *************************************************************************/
177 sal_Bool SvMetaModule::FillNextName( SvGlobalName * pName )
178 {
179     *pName = aNextName;
180 
181     if( aNextName < aEndName )
182     {
183         ++aNextName;
184         bIsModified = sal_True;
185         return sal_True;
186     }
187     return sal_False;
188 }
189 
190 /*************************************************************************
191 |*    SvMetaModule::ReadSvIdl()
192 |*
193 |*    Beschreibung
194 *************************************************************************/
195 void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase,
196                                         SvTokenStream & rInStm )
197 {
198     SvMetaExtern::ReadAttributesSvIdl( rBase, rInStm );
199 
200     aHelpFileName.ReadSvIdl( SvHash_HelpFile(), rInStm );
201     if( aSlotIdFile.ReadSvIdl( SvHash_SlotIdFile(), rInStm ) )
202     {
203         sal_uInt32 nTokPos = rInStm.Tell();
204         if( !rBase.ReadIdFile( String::CreateFromAscii( aSlotIdFile.GetBuffer() ) ) )
205         {
206             ByteString aStr = "cannot read file: ";
207             aStr += aSlotIdFile;
208             rBase.SetError( aStr, rInStm.GetToken() );
209             rBase.WriteError( rInStm );
210 
211             rInStm.Seek( nTokPos );
212         }
213     }
214     aTypeLibFile.ReadSvIdl( SvHash_TypeLibFile(), rInStm );
215     aModulePrefix.ReadSvIdl( SvHash_ModulePrefix(), rInStm );
216 }
217 
218 /*************************************************************************
219 |*    SvMetaModule::WriteAttributesSvIdl()
220 |*
221 |*    Beschreibung
222 *************************************************************************/
223 void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase,
224                                          SvStream & rOutStm,
225                                          sal_uInt16 nTab )
226 {
227     SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
228     if( aTypeLibFile.Len() || aSlotIdFile.Len() || aTypeLibFile.Len() )
229     {
230         if( aHelpFileName.Len() )
231         {
232             WriteTab( rOutStm, nTab );
233             aHelpFileName.WriteSvIdl( SvHash_HelpFile(), rOutStm, nTab +1 );
234             rOutStm << ';' << endl;
235         }
236         if( aSlotIdFile.Len() )
237         {
238             WriteTab( rOutStm, nTab );
239             aSlotIdFile.WriteSvIdl( SvHash_SlotIdFile(), rOutStm, nTab +1 );
240             rOutStm << ';' << endl;
241         }
242         if( aTypeLibFile.Len() )
243         {
244             WriteTab( rOutStm, nTab );
245             aTypeLibFile.WriteSvIdl( SvHash_TypeLibFile(), rOutStm, nTab +1 );
246             rOutStm << ';' << endl;
247         }
248     }
249 }
250 
251 /*************************************************************************
252 |*    SvMetaModule::ReadContextSvIdl()
253 |*
254 |*    Beschreibung
255 *************************************************************************/
256 void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
257                                      SvTokenStream & rInStm )
258 {
259     sal_uInt32  nTokPos = rInStm.Tell();
260     if( rInStm.GetToken()->Is( SvHash_interface() )
261       || rInStm.GetToken()->Is( SvHash_shell() ) )
262     {
263         SvMetaClassRef aClass = new SvMetaClass();
264         if( aClass->ReadSvIdl( rBase, rInStm ) )
265         {
266             aClassList.Append( aClass );
267             // Global bekanntgeben
268             rBase.GetClassList().Append( aClass );
269         }
270     }
271     else if( rInStm.GetToken()->Is( SvHash_enum() ) )
272     {
273         SvMetaTypeEnumRef aEnum = new SvMetaTypeEnum();
274 
275         if( aEnum->ReadSvIdl( rBase, rInStm ) )
276         {
277             // Im Modul deklariert
278             aTypeList.Append( aEnum );
279             // Global bekanntgeben
280             rBase.GetTypeList().Append( aEnum );
281         }
282     }
283     else if( rInStm.GetToken()->Is( SvHash_item() )
284       || rInStm.GetToken()->Is( SvHash_struct() )
285       || rInStm.GetToken()->Is( SvHash_typedef() ) )
286     {
287         SvMetaTypeRef xItem = new SvMetaType();
288 
289         if( xItem->ReadSvIdl( rBase, rInStm ) )
290         {
291             // Im Modul deklariert
292             aTypeList.Append( xItem );
293             // Global bekanntgeben
294             rBase.GetTypeList().Append( xItem );
295         }
296     }
297     else if( rInStm.GetToken()->Is( SvHash_include() ) )
298     {
299         sal_Bool bOk = sal_False;
300         rInStm.GetToken_Next();
301         SvToken * pTok = rInStm.GetToken_Next();
302         if( pTok->IsString() )
303         {
304             DirEntry aFullName( String::CreateFromAscii( pTok->GetString().GetBuffer() ) );
305             rBase.StartNewFile( aFullName.GetFull() );
306             if( aFullName.Find( rBase.GetPath() ) )
307             {
308                 SvTokenStream aTokStm( aFullName.GetFull() );
309                 if( SVSTREAM_OK == aTokStm.GetStream().GetError() )
310                 {
311                     // Fehler aus alter Datei retten
312                     SvIdlError aOldErr = rBase.GetError();
313                     // Fehler zuruecksetzen
314                     rBase.SetError( SvIdlError() );
315 
316                     sal_uInt32 nBeginPos = 0xFFFFFFFF; // kann mit Tell nicht vorkommen
317                     while( nBeginPos != aTokStm.Tell() )
318                     {
319                         nBeginPos = aTokStm.Tell();
320                         ReadContextSvIdl( rBase, aTokStm );
321                         aTokStm.ReadDelemiter();
322                     }
323                     bOk = aTokStm.GetToken()->IsEof();
324                     if( !bOk )
325                     {
326                         rBase.WriteError( aTokStm );
327                     }
328                     // Fehler aus alter Datei wieder herstellen
329                     rBase.SetError( aOldErr );
330                 }
331                 else
332                 {
333                     ByteString aStr = "cannot open file: ";
334                     aStr += ByteString( aFullName.GetFull(), RTL_TEXTENCODING_UTF8 );
335                     rBase.SetError( aStr, pTok );
336                 }
337             }
338             else
339             {
340                 ByteString aStr = "cannot find file: ";
341                 aStr += ByteString( aFullName.GetFull(), RTL_TEXTENCODING_UTF8 );
342                 rBase.SetError( aStr, pTok );
343             }
344         }
345         if( !bOk )
346             rInStm.Seek( nTokPos );
347     }
348     else
349     {
350         SvMetaSlotRef xSlot = new SvMetaSlot();
351 
352         if( xSlot->ReadSvIdl( rBase, rInStm ) )
353         {
354             if( xSlot->Test( rBase, rInStm ) )
355             {
356                 // Im Modul deklariert
357                 aAttrList.Append( xSlot );
358                 // Global bekanntgeben
359                 rBase.AppendAttr( xSlot );
360             }
361         }
362     }
363 }
364 
365 /*************************************************************************
366 |*    SvMetaModule::WriteContextSvIdl()
367 |*
368 |*    Beschreibung
369 *************************************************************************/
370 void SvMetaModule::WriteContextSvIdl( SvIdlDataBase & rBase,
371                                       SvStream & rOutStm,
372                                       sal_uInt16 nTab )
373 {
374     SvMetaExtern::WriteContextSvIdl( rBase, rOutStm, nTab );
375     sal_uLong n;
376     for( n = 0; n < aTypeList.Count(); n++ )
377     {
378         WriteTab( rOutStm, nTab );
379         aTypeList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
380     }
381     rOutStm << endl;
382     for( n = 0; n < aAttrList.Count(); n++ )
383     {
384         WriteTab( rOutStm, nTab );
385         aAttrList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
386     }
387     rOutStm << endl;
388     for( n = 0; n < aClassList.Count(); n++ )
389     {
390         WriteTab( rOutStm, nTab );
391         aClassList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
392     }
393 }
394 
395 /*************************************************************************
396 |*
397 |*    SvMetaModule::ReadSvIdl()
398 |*
399 |*    Beschreibung
400 |*
401 *************************************************************************/
402 sal_Bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
403 {
404     bIsModified = sal_True; // bisher immer wenn Compiler laueft
405 
406     sal_uInt32  nTokPos = rInStm.Tell();
407     SvToken * pTok  = rInStm.GetToken_Next();
408     sal_Bool bOk        = sal_False;
409     bOk = pTok->Is( SvHash_module() );
410     if( bOk )
411     {
412         pTok = rInStm.GetToken_Next();
413         if( pTok->IsString() )
414              bOk = aBeginName.MakeId( String::CreateFromAscii( pTok->GetString().GetBuffer() ) );
415     }
416     rInStm.ReadDelemiter();
417     if( bOk )
418     {
419         pTok = rInStm.GetToken_Next();
420         if( pTok->IsString() )
421              bOk = aEndName.MakeId( String::CreateFromAscii( pTok->GetString().GetBuffer() ) );
422     }
423     rInStm.ReadDelemiter();
424     if( bOk )
425     {
426         aNextName = aBeginName;
427 
428         rBase.Push( this ); // auf den Context Stack
429 
430         if( ReadNameSvIdl( rBase, rInStm ) )
431         {
432             // Zeiger auf sich selbst setzen
433             SetModule( rBase );
434             bOk = SvMetaName::ReadSvIdl( rBase, rInStm );
435         }
436         rBase.GetStack().Pop(); // und runter
437     }
438     if( !bOk )
439         rInStm.Seek( nTokPos );
440     return bOk;
441 }
442 
443 /*************************************************************************
444 |*
445 |*    SvMetaModule::WriteSvIdl()
446 |*
447 |*    Beschreibung
448 |*
449 *************************************************************************/
450 void SvMetaModule::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
451                                sal_uInt16 nTab )
452 {
453     rOutStm << SvHash_module()->GetName().GetBuffer() << endl
454             << '\"';
455     rOutStm.WriteByteString( aBeginName.GetHexName() );
456     rOutStm << '\"' << endl << '\"';
457     rOutStm.WriteByteString( aEndName.GetHexName() );
458     rOutStm << '\"' << endl;
459     SvMetaExtern::WriteSvIdl( rBase, rOutStm, nTab );
460 }
461 
462 /*************************************************************************
463 |*    SvMetaModule::WriteSfx()
464 *************************************************************************/
465 void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
466 {
467     for( sal_uLong n = 0; n < aClassList.Count(); n++ )
468     {
469         SvMetaClass * pClass = aClassList.GetObject( n );
470         pClass->WriteSfx( rBase, rOutStm );
471     }
472 }
473 
474 void SvMetaModule::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
475                             Table* pTable )
476 {
477     for( sal_uLong n = 0; n < aClassList.Count(); n++ )
478     {
479         SvMetaClass * pClass = aClassList.GetObject( n );
480         pClass->WriteHelpIds( rBase, rOutStm, pTable );
481     }
482 }
483 
484 /*************************************************************************
485 |*    SvMetaModule::WriteAttributes()
486 *************************************************************************/
487 void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase,
488                                     SvStream & rOutStm,
489                                     sal_uInt16 nTab,
490                                     WriteType nT, WriteAttribute nA )
491 {
492     SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
493     if( aHelpFileName.Len() )
494     {
495         WriteTab( rOutStm, nTab );
496         rOutStm << "// class SvMetaModule" << endl;
497         WriteTab( rOutStm, nTab );
498         rOutStm << "helpfile(\"" << aHelpFileName.GetBuffer() << "\");" << endl;
499     }
500 }
501 
502 /*************************************************************************
503 |*    SvMetaModule::WriteSbx()
504 *************************************************************************/
505 /*
506 void SvMetaModule::WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm,
507                                 SvNamePosList & rList )
508 {
509     for( sal_uLong n = 0; n < aClassList.Count(); n++ )
510     {
511         SvMetaClass * pClass = aClassList.GetObject( n );
512         if( !pClass->IsShell() && pClass->GetAutomation() )
513         {
514             rList.Insert( new SvNamePos( pClass->GetUUId(), rOutStm.Tell() ),
515                         LIST_APPEND );
516             SbxObjectRef xSbxObj = new SbxObject( pClass->GetName() );
517             pClass->FillSbxObject( rBase, xSbxObj );
518             xSbxObj->Store( rOutStm );
519         }
520     }
521 }
522  */
523 
524 /*************************************************************************
525 |*    SvMetaModule::Write()
526 *************************************************************************/
527 void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
528                             sal_uInt16 nTab,
529                             WriteType nT, WriteAttribute nA )
530 {
531     switch ( nT )
532     {
533     case WRITE_ODL:
534     {
535         if( aSlotIdFile.Len() )
536         {
537             WriteTab( rOutStm, nTab );
538             rOutStm << "#include \"" << aSlotIdFile.GetBuffer() << '"' << endl << endl;
539         }
540         SvMetaExtern::Write( rBase, rOutStm, nTab, nT, nA );
541         rOutStm << endl;
542         WriteTab( rOutStm, nTab );
543         rOutStm << "library " << GetName().GetBuffer() << endl;
544         WriteTab( rOutStm, nTab );
545         rOutStm << '{' << endl;
546         WriteTab( rOutStm, nTab );
547         rOutStm << "importlib(\"STDOLE.TLB\");" << endl;
548 
549     /*
550         for( sal_uLong n = 0; n < aTypeList.Count(); n++ )
551         {
552             SvMetaType * pType = aTypeList.GetObject( n );
553             if( !pType ->Write( rBase, rOutStm, nTab +1, nT, nA ) )
554                 return sal_False;
555         }
556     */
557         /*
558         for( sal_uLong n = 0; n < rBase.GetModuleList().Count(); n++ )
559         {
560             SvMetaModule * pModule = rBase.GetModuleList().GetObject( n );
561             const SvMetaTypeMemberList &rTypeList = pModule->GetTypeList();
562             for( sal_uLong n = 0; n < rTypeList.Count(); n++ )
563             {
564                 SvMetaType * pType = rTypeList.GetObject( n );
565                 pType->Write( rBase, rOutStm, nTab +1, nT, nA );
566             }
567         }
568         */
569 
570         for( sal_uLong n = 0; n < aClassList.Count(); n++ )
571         {
572             SvMetaClass * pClass = aClassList.GetObject( n );
573             if( !pClass->IsShell() && pClass->GetAutomation() )
574             {
575                 WriteTab( rOutStm, nTab );
576                 WriteStars( rOutStm );
577                 pClass->Write( rBase, rOutStm, nTab +1, nT, nA );
578                 if( n +1 < aClassList.Count() )
579                     rOutStm << endl;
580             }
581         }
582 
583         rOutStm << '}' << endl;
584     }
585     break;
586     case WRITE_DOCU:
587     {
588         rOutStm << "SvIDL interface documentation" << endl << endl;
589         rOutStm << "<MODULE>" << endl << GetName().GetBuffer() << endl;
590         WriteDescription( rOutStm );
591         rOutStm << "</MODULE>" << endl << endl;
592 
593         rOutStm << "<CLASSES>" << endl;
594         for( sal_uLong n = 0; n < aClassList.Count(); n++ )
595         {
596             SvMetaClass * pClass = aClassList.GetObject( n );
597             if( !pClass->IsShell() )
598             {
599                 rOutStm << pClass->GetName().GetBuffer();
600                 SvMetaClass* pSC = pClass->GetSuperClass();
601                 if( pSC )
602                     rOutStm << " : " << pSC->GetName().GetBuffer();
603 
604                 // Importierte Klassen
605                 const SvClassElementMemberList& rClassList = pClass->GetClassList();
606                 if ( rClassList.Count() )
607                 {
608                     rOutStm << " ( ";
609 
610                     for( sal_uLong m=0; m<rClassList.Count(); m++ )
611                     {
612                         SvClassElement *pEle = rClassList.GetObject(m);
613                         SvMetaClass *pCl = pEle->GetClass();
614                         rOutStm << pCl->GetName().GetBuffer();
615                         if ( m+1 == rClassList.Count() )
616                             rOutStm << " )";
617                         else
618                             rOutStm << " , ";
619                     }
620                 }
621 
622                 rOutStm << endl;
623             }
624         }
625         rOutStm << "</CLASSES>" << endl << endl;
626         // kein Break!
627     }
628 
629     case WRITE_C_SOURCE:
630     case WRITE_C_HEADER:
631     {
632         for( sal_uLong n = 0; n < aClassList.Count(); n++ )
633         {
634             SvMetaClass * pClass = aClassList.GetObject( n );
635             if( !pClass->IsShell() /* && pClass->GetAutomation() */ )
636                 pClass->Write( rBase, rOutStm, nTab, nT, nA );
637         }
638     }
639     break;
640 
641     default:
642         break;
643     }
644 }
645 
646 /*************************************************************************
647 |*    SvMetaModule::WriteSrc()
648 *************************************************************************/
649 void SvMetaModule::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
650                              Table * pTable )
651 {
652 //  rOutStm << "#pragma CHARSET IBMPC" << endl;
653     if( aSlotIdFile.Len() )
654         rOutStm << "//#include <" << aSlotIdFile.GetBuffer() << '>' << endl;
655     for( sal_uLong n = 0; n < aClassList.Count(); n++ )
656     {
657         aClassList.GetObject( n )->WriteSrc( rBase, rOutStm, pTable );
658     }
659 }
660 
661 /*************************************************************************
662 |*    SvMetaModule::WriteHxx()
663 *************************************************************************/
664 void SvMetaModule::WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm,
665                              sal_uInt16 nTab )
666 {
667     for( sal_uLong n = 0; n < aClassList.Count(); n++ )
668     {
669         SvMetaClass * pClass = aClassList.GetObject( n );
670         pClass->WriteHxx( rBase, rOutStm, nTab );
671     }
672 }
673 
674 /*************************************************************************
675 |*    SvMetaModule::WriteCxx()
676 *************************************************************************/
677 void SvMetaModule::WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm,
678                              sal_uInt16 nTab )
679 {
680     for( sal_uLong n = 0; n < aClassList.Count(); n++ )
681     {
682         SvMetaClass * pClass = aClassList.GetObject( n );
683         pClass->WriteCxx( rBase, rOutStm, nTab );
684     }
685 }
686 
687 #endif // IDL_COMPILER
688 
689