OOO330
[LibreOffice.git] / soltools / ldump / ldump.hxx
blobc0a1a166b8b28da611d0a23ea3aee81a83d0d681
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #include "hashtbl.hxx"
30 #define MAXFILT 200
32 struct LibExport
34 char *cExportName; // zu exportierende Fkt.
35 unsigned long nOrdinal; // Nummer der zu export. Fkt.
36 bool bByName; // NONAME anhaengen
37 bool bExport; // exportieren oder nicht ?
40 class ExportSet;
41 class LibDump
43 ExportSet *pBaseTab; // Zugriff auf gemangelte Namen
44 ExportSet *pIndexTab; // Zugriff auf die Ordinals
45 char *cBName; // Name der Datenbasis
46 char *cAPrefix; // Prefix fuer C-Fkts.
47 char *cLibName; // Name der zu untersuchenden Lib
48 char *cFilterName; // Name der Filterdatei
49 char *cModName; // Modulname
50 unsigned short nBegin; // Nummer des ersten Exports
51 unsigned long nBaseLines; // Line in Datenbasis
52 unsigned long nFilterLines; // Line in FilterTabelle
53 char **pFilterLines; // Filtertabelle
54 unsigned long nDefStart;
55 bool bBase; // Existenz der DatenBasis;
56 bool bAll; // Alle Fkts exportieren
57 bool bDef; // DefFile schreiben ( bei -E )
58 int bExportName; // 0 - export by ordinal; 1 - export by name
60 bool CheckDataBase();
61 bool CheckLibrary(char * cName);
62 bool ReadDataBase();
63 bool ReadFilter(char *);
64 bool PrintSym(char *, bool bName = true );
65 public:
66 LibDump( char *cFileName, int bExportByName );
67 ~LibDump();
68 bool Dump();
69 bool SetFilter(char *cFilterName);
70 void SetBeginExport(unsigned short nVal){nBegin = nVal;}
71 void SetCExport( char* pName );
72 bool Filter(char *pName);
73 bool IsFromAnonymousNamespace(char *pName);
74 bool PrintDefFile();
75 bool PrintDataBase();
76 static void DumpError(unsigned long nError);