debian/tmp/usr/include/bit-0.3/bit/factory.h

00001 /***************************************************************************
00002 *   Copyright (C) 2001 by Rick L. Vinyard, Jr.                            *
00003 *   rvinyard@cs.nmsu.edu                                                  *
00004 *                                                                         *
00005 *   This program is free software; you can redistribute it and/or modify  *
00006 *   it under the terms of the GNU Lesser General Public License as        *
00007 *   published by the Free Software Foundation version 2.1.                *
00008 *                                                                         *
00009 *   This program is distributed in the hope that it will be useful,       *
00010 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012 *   GNU General Public License for more details.                          *
00013 *                                                                         *
00014 *   You should have received a copy of the GNU Lesser General Public      *
00015 *   License along with this library; if not, write to the                 *
00016 *   Free Software Foundation, Inc.,                                       *
00017 *   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA              *
00018 ***************************************************************************/
00019 #ifndef BITFACTORY_H
00020 #define BITFACTORY_H
00021 
00022 #include <bit/fieldbase.h>
00023 #include <bit/fieldtype.h>
00024 #include <bit/field.h>
00025 #include <bit/fieldvector.h>
00026 #include <bit/record.h>
00027 #include <bit/recordvector.h>
00028 
00029 namespace bit {
00030 
00031   extern std::vector<std::string> xml_file_load_path;
00032 
00033   void initialize_xml_file_load_path();
00034 
00035   RecordBase::pointer xml_load_file(const std::string& filename);
00036   RecordBase::pointer xml_load_memory(const std::string& string);
00037   RecordBase::pointer xml_load_memory_raw(const unsigned char *contents, size_t bytes_count);
00038   RecordBase::pointer xml_load_stream(std::istream &in);
00039 
00040   RecordBase::pointer xml_read_record(xmlpp::Element& xml_element, int& last_position, size_t length_units=BITS, size_t offset_units=BITS);
00041 
00042   Field::pointer xml_read_field(xmlpp::Element& xml_element, int& last_position, size_t length_units=BITS, size_t offset_units=BITS);
00043 
00044   FieldType xml_read_type(xmlpp::Element& xml_element);
00045 
00046   void xml_read_skip(xmlpp::Element& xml_element, int& last_position, size_t length_units=BITS, size_t offset_units=BITS);
00047 
00048   size_t get_units(std::string s);
00049 
00050   std::string get_xml_file_as_string(const std::string& filename);
00051 }
00052 
00053 #endif

Generated on Tue Mar 13 20:00:01 2007 by  doxygen 1.5.1