This file is indexed.

/usr/include/mmdb/mmdb_xml.h is in libmmdb-dev 1.25.5-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
//  $Id: mmdb_xml.h,v 1.20 2012/01/26 17:52:21 ekr Exp $
//  =================================================================
//
//   CCP4 Coordinate Library: support of coordinate-related
//   functionality in protein crystallography applications.
//
//   Copyright (C) Eugene Krissinel 2000-2008.
//
//    This library is free software: you can redistribute it and/or 
//    modify it under the terms of the GNU Lesser General Public 
//    License version 3, modified in accordance with the provisions 
//    of the license to address the requirements of UK law.
//
//    You should have received a copy of the modified GNU Lesser 
//    General Public License along with this library. If not, copies 
//    may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU Lesser General Public License for more details.
//
//  =================================================================
//
//    08.07.08   <--  Date of Last Modification.
//                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//  -----------------------------------------------------------------
//
//  **** Module  :  MMDB_XML <interface>
//       ~~~~~~~~~
//  **** Project :  MacroMolecular Data Base (MMDB)
//       ~~~~~~~~~
//  **** Classes :  CXMLObject
//       ~~~~~~~~~
//
//   (C) E. Krissinel 2000-2008
//
//  =================================================================
//

#ifndef __MMDB_XML__
#define __MMDB_XML__


#ifndef __MMDB_MMCIF__
#include "mmdb_mmcif.h"
#endif



//  ======================  CXMLObject  ==========================

#define XMLR_Ok           0
#define XMLR_NoFile       1
#define XMLR_NoTag        2
#define XMLR_BrokenTag    3
#define XMLR_UnclosedTag  4

DefineClass(CXMLObject);
DefineStreamFunctions(CXMLObject);

class CXMLObject : public CStream  {

  public :

    CXMLObject ();
    CXMLObject ( cpstr Tag );
    CXMLObject ( cpstr Tag, cpstr Data );
    CXMLObject ( cpstr Tag, realtype V, int length=11 );
    CXMLObject ( cpstr Tag, int     iV, int length=0  );
    CXMLObject ( cpstr Tag, Boolean bV );
    CXMLObject ( cpstr Tag, PCXMLObject XMLObject );
    CXMLObject ( RPCStream Object );
    ~CXMLObject();

    void  SetTag       ( cpstr Tag                             );
    void  AddAttribute ( cpstr name, cpstr         value       );
    void  AddAttribute ( cpstr name, const int     iV          );
    void  AddAttribute ( cpstr name, const Boolean bV          );
    void  SetData      ( cpstr Data                            );
    void  AddData      ( cpstr Data                            );
    void  SetData      ( const realtype V, const int length=11 );
    void  SetData      ( const int     iV, const int length=0  );
    void  SetData      ( const Boolean bV                      );

    int   AddMMCIFCategory ( PCMMCIFCategory mmCIFCat    );
    int   AddMMCIFStruct   ( PCMMCIFStruct   mmCIFStruct );
    int   AddMMCIFLoop     ( PCMMCIFLoop     mmCIFLoop   );
    int   AddMMCIFData     ( PCMMCIFData     mmCIFData   );

    pstr  GetTag  () { return objTag; }

    //   Here and below the functions allow for "tag1>tag2>tag3>..."
    // as a composite multi-level tag, e.g. the above may stand for
    // <tag1><tag2><tag3>data</tag3></tag2></tag1>. NULL tag
    // corresponds to "this" object.
    //   objNo counts same-tag objects of the *highest* level used
    // (e.g. level tag3 for composite tag  tag1>tag2>tag3 ).
    //   GetData ( pstr& ... ) only copies a pointer to data.
    pstr  GetData ( cpstr Tag=NULL, int objNo=1 );
    int   GetData ( pstr   & Data, cpstr Tag=NULL, int objNo=1 );
    int   GetData ( realtype &  V, cpstr Tag=NULL, int objNo=1 );
    int   GetData ( int      & iV, cpstr Tag=NULL, int objNo=1 );
    int   GetData ( Boolean  & bV, cpstr Tag=NULL, int objNo=1 );

    PCXMLObject GetObject     ( cpstr Tag, int objNo=1 );
    PCXMLObject GetFirstObject();
    PCXMLObject GetLastObject ();
    inline int  GetNumberOfObjects() { return nObjects; }
    PCXMLObject GetObject     ( int objectNo );  // 0,1,...

    inline PCXMLObject GetParent() { return parent; }

    void  AddObject   ( PCXMLObject XMLObject , int lenInc=10 );
    int   WriteObject ( cpstr FName, int pos=0, int ident=2   );
    void  WriteObject ( RCFile    f, int pos=0, int ident=2   );
    int   ReadObject  ( cpstr FName );
    int   ReadObject  ( RCFile f, pstr S, int & pos, int slen );

    virtual void Copy ( PCXMLObject XMLObject );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected:
    PCXMLObject  parent;
    pstr         objTag;
    pstr         objData;
    int          nObjects,nAlloc;
    PPCXMLObject object;
    int          nAttributes,nAttrAlloc;
    psvector     attr_name,attr_value;

    void         InitXMLObject();
    virtual void FreeMemory   ();

    inline void SetParent ( PCXMLObject p ) { parent = p; }

};


extern  PCXMLObject mmCIF2XML ( PCMMCIFData mmCIFData, int * rc=NULL );
extern  PCXMLObject mmCIF2XML ( cpstr XMLName, PCMMCIFFile mmCIFFile,
                                                       int * rc=NULL );

#endif