Changeset 4540 for trunk/psLib/src/xml/psXML.h
- Timestamp:
- Jul 12, 2005, 9:12:01 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/xml/psXML.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/xml/psXML.h
r4409 r4540 1 /** @file ps MetadataIO.h1 /** @file psXML.h 2 2 * 3 * @brief Contains metadata input/outputfunctions.3 * @brief Contains XML functions. 4 4 * 5 * This file defines functions to read and write metadata to/from an externalfile.5 * This file defines functions to read metadata from an XML file. 6 6 * 7 * @ingroup Metadata7 * @ingroup XML 8 8 * 9 9 * @author Ross Harman, MHPCC 10 10 * @author Robert DeSonia, MHPCC 11 11 * 12 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 6-28 20:17:52$12 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-07-12 19:12:01 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 16 16 */ 17 #ifndef PS_ METADATAIO_H18 #define PS_ METADATAIO_H17 #ifndef PS_XML_H 18 #define PS_XML_H 19 19 20 /// @addtogroup Metadata 20 #include "psMetadata.h" 21 #include "psMetadataConfig.h" 22 23 /// @addtogroup XML 21 24 /// @{ 22 23 /** A metadata data structure used in parsing arrays.24 *25 * Contains array information and the metadata storage location.26 */27 typedef struct28 {29 psArray* nonUniqueKeyArray; ///< non-unique key names30 psArray* typeArray; ///< array of user defined types31 psArray* templateArray; ///< array of user type templates32 psMetadata* metadata; ///< metadata container33 char* name; ///< name of key34 }35 p_psParseLevelInfo;36 37 /** Allocates a p_psParseLevelInfo structure38 *39 * @return p_psParseLevelInfo* : new p_psParseLevelInfo struct40 */41 p_psParseLevelInfo* p_psParseLevelInfoAlloc(void);42 43 /** Print metadata item to file.44 *45 * Metadata items may be printed to an open file descriptor based on a46 * provided format. The format is a sprintf format statement with exactly47 * one % formatting command. If the metadata item type is a numeric type,48 * this formatting command must also be numeric, and the type conversion49 * performed to the value to match the format type. If the metadata type is50 * a string, the fromatting command must also be for a string. If the51 * metadata type is any other data type, printing is not allowed.52 *53 * @return psMetadataItem* : Pointer metadata item.54 */55 bool psMetadataItemPrint(56 FILE * fd, ///< Pointer to file to write metadata item.57 const char *format, ///< Format to print metadata item.58 const psMetadataItem* item ///< Metadata item to print.59 );60 61 /** Read metadata header.62 *63 * Read a metadata header from file. If the file is not found, an error is64 * reported.65 *66 * @return psMetadata* : Pointer to resulting metadata.67 */68 psMetadata* psMetadataReadHeader(69 psMetadata* output, ///< Resulting metadata from read.70 char *extName, ///< File name extension string.71 psS32 extNum, ///< File name extension number. Starts at 1.72 char *fileName ///< Name of file to read.73 );74 75 /** Read metadata configuration file.76 *77 * Loads pre-defined settings by parsing a configuration file into a psMetadata structure.78 *79 * @return psMetadata* : Resulting metadata from read.80 */81 psMetadata* psMetadataConfigParse(82 psMetadata* md, ///< Resulting metadata from read.83 unsigned int *nFail, ///< Number of failed lines.84 const char *fileName, ///< Name of file to read.85 bool overwrite ///< Allow overwrite of duplicate specifications.86 );87 88 /** Read XML metadata configuration file.89 *90 * Loads pre-defined XML settings by parsing a configuration file into a psMetadata structure.91 *92 * @return psMetadata* : Resulting metadata from read.93 */94 25 95 26 psMetadata* psMetadataConfigParseXml( … … 102 33 /// @} 103 34 104 #endif // #ifndef PS_ METADATAIO_H35 #endif // #ifndef PS_XML_H
Note:
See TracChangeset
for help on using the changeset viewer.
