ecl_file_kw.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'ecl_file_kw.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_ECL_FILE_KW_H
20#define ERT_ECL_FILE_KW_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <stdbool.h>
27
28#include <ert/util/util.h>
29
30#include <ert/ecl/ecl_kw.hpp>
31#include <ert/ecl/fortio.h>
32
33typedef struct ecl_file_kw_struct ecl_file_kw_type;
34typedef struct inv_map_struct inv_map_type;
35
39 bool ecl_file_kw_equal( const ecl_file_kw_type * kw1 , const ecl_file_kw_type * kw2);
41 ecl_file_kw_type * ecl_file_kw_alloc0( const char * header , ecl_data_type data_type , int size , offset_type offset);
43 void ecl_file_kw_free__( void * arg );
47 const char * ecl_file_kw_get_header( const ecl_file_kw_type * file_kw );
48 int ecl_file_kw_get_size( const ecl_file_kw_type * file_kw );
51 bool ecl_file_kw_ptr_eq( const ecl_file_kw_type * file_kw , const ecl_kw_type * ecl_kw);
52 void ecl_file_kw_replace_kw( ecl_file_kw_type * file_kw , fortio_type * target , ecl_kw_type * new_kw );
53 bool ecl_file_kw_fskip_data( const ecl_file_kw_type * file_kw , fortio_type * fortio);
55
56 void ecl_file_kw_fwrite( const ecl_file_kw_type * file_kw , FILE * stream );
59
60 void ecl_file_kw_start_transaction(const ecl_file_kw_type * file_kw, int * ref_count);
61 void ecl_file_kw_end_transaction(ecl_file_kw_type * file_kw, int ref_count);
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif
ecl_kw_type * ecl_file_kw_get_kw(ecl_file_kw_type *file_kw, fortio_type *fortio, inv_map_type *inv_map)
ecl_kw_type * ecl_file_kw_get_kw_ptr(ecl_file_kw_type *file_kw)
const char * ecl_file_kw_get_header(const ecl_file_kw_type *file_kw)
bool ecl_file_kw_ptr_eq(const ecl_file_kw_type *file_kw, const ecl_kw_type *ecl_kw)
void ecl_file_kw_start_transaction(const ecl_file_kw_type *file_kw, int *ref_count)
void ecl_file_kw_fwrite(const ecl_file_kw_type *file_kw, FILE *stream)
struct ecl_file_kw_struct ecl_file_kw_type
Definition: ecl_file_kw.hpp:33
bool ecl_file_kw_fskip_data(const ecl_file_kw_type *file_kw, fortio_type *fortio)
struct inv_map_struct inv_map_type
Definition: ecl_file_kw.hpp:34
ecl_data_type ecl_file_kw_get_data_type(const ecl_file_kw_type *)
void ecl_file_kw_free__(void *arg)
ecl_file_kw_type ** ecl_file_kw_fread_alloc_multiple(FILE *stream, int num)
ecl_file_kw_type * ecl_file_kw_alloc_copy(const ecl_file_kw_type *src)
int ecl_file_kw_get_size(const ecl_file_kw_type *file_kw)
inv_map_type * inv_map_alloc(void)
ecl_file_kw_type * ecl_file_kw_alloc(const ecl_kw_type *ecl_kw, offset_type offset)
ecl_file_kw_type * inv_map_get_file_kw(inv_map_type *inv_map, const ecl_kw_type *ecl_kw)
offset_type ecl_file_kw_get_offset(const ecl_file_kw_type *file_kw)
void inv_map_free(inv_map_type *map)
void ecl_file_kw_inplace_fwrite(ecl_file_kw_type *file_kw, fortio_type *fortio)
void ecl_file_kw_replace_kw(ecl_file_kw_type *file_kw, fortio_type *target, ecl_kw_type *new_kw)
ecl_file_kw_type * ecl_file_kw_fread_alloc(FILE *stream)
ecl_file_kw_type * ecl_file_kw_alloc0(const char *header, ecl_data_type data_type, int size, offset_type offset)
void ecl_file_kw_end_transaction(ecl_file_kw_type *file_kw, int ref_count)
bool ecl_file_kw_equal(const ecl_file_kw_type *kw1, const ecl_file_kw_type *kw2)
void ecl_file_kw_free(ecl_file_kw_type *file_kw)
struct ecl_kw_struct ecl_kw_type
Definition: ecl_kw.hpp:39
struct fortio_struct fortio_type
Definition: include/ert/ecl/fortio.h:42
std::vector< typename std::result_of< F(typename C::const_iterator::value_type &) >::type > map(F f, const C &src)
Definition: Functional.hpp:84
Definition: ecl_type.hpp:72
long offset_type
Definition: util.h:76