w2c_writer.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017   
00018 #ifndef W2C_WRITER_H
00019 #define W2C_WRITER_H
00020 
00026 #include <axis2_utils.h>
00027 #include <axiom.h>
00028 #include <w2c_config_property_loader.h>
00029 #include <w2c_engine_configuration.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00036 #define W2C_WRITER_XSLT_PATH "/conf/templates/"
00037 
00044 typedef struct w2c_writer w2c_writer_t;
00045 typedef struct w2c_writer_ops w2c_writer_ops_t;
00046 
00047 AXIS2_DECLARE_DATA  struct w2c_writer_ops
00048 {
00056     axis2_status_t (AXIS2_CALL *
00057     free)(w2c_writer_t *writer,
00058           const axis2_env_t *env);
00059   
00068     axis2_char_t* (AXIS2_CALL *
00069     create_out_file)(w2c_writer_t *writer,
00070           const axis2_env_t *env,
00071           axis2_char_t *package_name,
00072           axis2_char_t *file_name);
00073    
00082     axis2_status_t (AXIS2_CALL *
00083     parse)(w2c_writer_t *writer,
00084           const axis2_env_t *env,
00085           axiom_node_t *root);
00086  
00096     axis2_status_t (AXIS2_CALL *
00097     initialize)(w2c_writer_t *writer,
00098           const axis2_env_t *env,
00099           w2c_config_property_loader_t *loader,
00100           w2c_engine_configuration_t *config);
00101 
00102 };
00103 
00104 AXIS2_DECLARE_DATA  struct w2c_writer
00105 {
00106      struct w2c_writer_ops *ops;
00107 };
00108 
00111 /*************************** Function macros **********************************/
00112 
00113 #define W2C_WRITER_FREE(writer, env) \
00114       ((writer)->ops->free (writer, env)) 
00115 
00116 #define W2C_WRITER_CREATE_OUT_FILE(writer, env, package, file) \
00117       ((writer)->ops->create_out_file(writer, env, package, file ))
00118 
00119 #define W2C_WRITER_PARSE(writer, env, root) \
00120       ((writer)->ops->parse(writer, env, root ))
00121 
00122 #define W2C_WRITER_INITIALIZE(writer, env, loader, config) \
00123       ((writer)->ops->initialize(writer, env, loader, config))
00124 
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130 
00131 #endif /* W2C_WRITER_H */

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1