MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RTOp_obj_null_vtbl.c
Go to the documentation of this file.
1 /*
2 // @HEADER
3 // ***********************************************************************
4 //
5 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
6 // Copyright (2003) Sandia Corporation
7 //
8 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 // license for use of this work by or on behalf of the U.S. Government.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
39 //
40 // ***********************************************************************
41 // @HEADER
42 */
43 
44 #include <assert.h>
45 
46 #include "RTOp_obj_null_vtbl.h"
47 #include "RTOp_obj_free_free.h"
48 
49 /* Local function definitions */
50 
52  const struct RTOp_obj_type_vtbl_t* vtbl
53  ,const void* instance_data
54  ,int* num_values
55  ,int* num_indexes
56  ,int* num_chars
57  )
58 {
59  *num_values = 0;
60  *num_indexes = 0;
61  *num_chars = 0;
62  return 0;
63 }
64 
65 static int obj_create( const struct RTOp_obj_type_vtbl_t* vtbl, const void* instance_data, void** obj )
66 {
67  *obj = NULL;
68  return 0;
69 }
70 
71 static int obj_reinit( const struct RTOp_obj_type_vtbl_t* vtbl, const void* instance_data, void* obj )
72 {
73  return 0;
74 }
75 
76 static int extract_state(
77  const struct RTOp_obj_type_vtbl_t* vtbl
78  ,const void * instance_data
79  ,void * obj
80  ,int num_values
81  ,RTOp_value_type value_data[]
82  ,int num_indexes
83  ,RTOp_index_type index_data[]
84  ,int num_chars
85  ,RTOp_char_type char_data[]
86  )
87 {
88  assert( obj == NULL );
89  assert( num_values == 0 );
90  assert( num_indexes == 0 );
91  assert( num_chars == 0 );
92  return 0;
93 }
94 
95 static int load_state(
96  const struct RTOp_obj_type_vtbl_t* vtbl
97  ,const void * instance_data
98  ,int num_values
99  ,const RTOp_value_type value_data[]
100  ,int num_indexes
101  ,const RTOp_index_type index_data[]
102  ,int num_chars
103  ,const RTOp_char_type char_data[]
104  ,void ** obj
105  )
106 {
107  assert( obj == NULL );
108  assert( num_values == 0 );
109  assert( num_indexes == 0 );
110  assert( num_chars == 0 );
111  return 0;
112 }
113 
115 {
117  ,obj_create
118  ,obj_reinit
121  ,load_state
122 };
double RTOp_value_type
Definition: RTOp.h:69
char RTOp_char_type
Definition: RTOp.h:70
static int obj_reinit(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj)
const struct RTOp_obj_type_vtbl_t RTOp_obj_null_vtbl
static int obj_create(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
static int get_obj_type_num_entries(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, int *num_values, int *num_indexes, int *num_chars)
static int extract_state(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
int RTOp_obj_free_free(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
static int load_state(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, int num_values, const RTOp_value_type value_data[], int num_indexes, const RTOp_index_type index_data[], int num_chars, const RTOp_char_type char_data[], void **obj)
Teuchos_Ordinal RTOp_index_type
Definition: RTOp.h:68