Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

DataMergeParams.h

Go to the documentation of this file.
00001 /**
00002 * @file         DataMergeParams.h
00003 * @brief    Edit option class for the data-merge
00004 *
00005 * @author   Nakashima h
00006 * @date     2021-10-06
00007 *
00008 * $Id: DataMergeParams.h 32 2022-07-14 03:20:43Z shingo.yoneda $
00009 *
00010 * Copyright (c) 2020-2022 Antenna House, Inc. All rights reserved.
00011 */
00012 
00013 #pragma once
00014 #include <string>
00015 
00016 /**
00017 * @brief    Common option for the data-merge
00018 */
00019 struct CommonOption {
00020     /**
00021     * @brief    Position of the additional character string to the output file name
00022     */
00023     enum AddingStrPlacePattern {
00024         /**
00025         * @brief    Add to the beginning of the output file name (default)
00026         */
00027         Head,
00028         /**
00029         * @brief    Add to the end of the output file name
00030         */
00031         Tail
00032     };
00033 
00034     /**
00035     * @brief    Control when cell data-merge overflows the cell width
00036     */
00037     enum CellStrOverflowRule {
00038         /**
00039         * @brief    Line break (default)
00040         */
00041         Normal,
00042         /**
00043         * @brief    Adjust font size
00044         */
00045         FontSizeChange,
00046         /**
00047         * @brief    Remove excess characters
00048         */
00049         CutExcess,
00050         /**
00051         * @brief    Converts to paddingfill character
00052         */
00053         Padding
00054     };
00055 
00056     /**
00057     * @brief    File format for merging data
00058     */
00059     enum DataType {
00060         CSV,
00061         JSON
00062     };
00063 
00064     /**
00065     * @brief    File encoding
00066     */
00067     enum DataFileEncoding {
00068         /**
00069         * @brief    Shift_JIS
00070         */
00071         SJIS,
00072         /**
00073         * @brief    UTF-8
00074         */
00075         UTF8
00076     };
00077 };
00078 
00079 /**
00080 * @brief    Options for the simple type
00081 */
00082 struct SimpleTypeOption {
00083     /**
00084     * @brief    Output mode for the data-merge data of multiple record
00085     */
00086     enum OutputMode {
00087         /**
00088         * @brief    Output single file (default)
00089         */
00090         Single,
00091         /**
00092         * @brief    Output single file for each record
00093         */
00094         PerData
00095     };
00096 };
00097 
00098 /**
00099 * @brief    Options for the compound type
00100 */
00101 struct CompoundTypeOption {
00102     /**
00103     * @brief    Row number pattern of breakdown part
00104     */
00105     enum RepeatingRowsPattern {
00106         /**
00107         * @brief    Fixed row number (default)
00108         */
00109         Fixed,
00110         /**
00111         * @brief    Variable row number
00112         */
00113         Variable
00114     };
00115 
00116     /**
00117     * @brief    Style when a breakdown part with a fixed number of rows spans multiple pages
00118     */
00119     enum MultiplePagesStyle {
00120         /**
00121         * @brief    Copy the entire body area (default)
00122         */
00123         RepeatTemplate,
00124         /**
00125         * @brief    Repeating the breakdown part
00126         */
00127         RepeatDetail
00128     };
00129 
00130     /**
00131     * @brief    Editing rule for the footer part with a fixed number of rows
00132     */
00133     enum DeletingFooterRule {
00134         /**
00135         * @brief    Do not edit (default)
00136         */
00137         LeaveAll,
00138         /**
00139         * @brief    Delete all footer parts
00140         */
00141         DeleteAll,
00142         /**
00143         * @brief    Leave the field
00144         */
00145         LeaveFld
00146     };
00147 };
00148 
00149 /**
00150 * @brief    Options for nested table type
00151 */
00152 struct NestedTableTypeOption {
00153     /**
00154     * @brief    Width of nested table type
00155     */
00156     enum DetailTableType {
00157         /**
00158         * @brief    Minimum column width (default)
00159         */
00160         FixedMinimum,
00161         /**
00162         * @brief    Even column width [\%]
00163         */
00164         DividedPct,
00165         /**
00166         * @brief    Even column width
00167         */
00168         DividedDxa
00169     };
00170 };
00171 
00172 /**
00173 * @brief    Input parameter
00174 */
00175 struct InputParam {
00176     /**
00177     * @brief    Path of the template file for data-merge
00178     */
00179     std::string m_input_file_path;
00180     /**
00181     * @brief    Path of the data-merge image
00182     */
00183     std::string m_input_image_dir = "";
00184 
00185     /**
00186     * @brief    Control when cell data-merge overflows the cell width
00187     */
00188     CommonOption::CellStrOverflowRule m_cell_str_overflow_rule = CommonOption::CellStrOverflowRule::Normal;
00189     /**
00190     * @brief    Padding string when the data-merge to cell overflows the cell width
00191     */
00192     std::string m_padding_string = "#";
00193 
00194     /**
00195     * @brief    The data-merge executor
00196     */
00197     std::string m_executor = "";
00198 };
00199 
00200 /**
00201 * @brief    Output parameter
00202 */
00203 struct OutputParam {
00204     /**
00205     * @brief    Path of the file to output
00206     */
00207     std::string m_output_file_path;
00208 
00209     /**
00210     * @brief    The position of characters to be added to the output file name
00211     */
00212     CommonOption::AddingStrPlacePattern m_adding_str_place_pattern = CommonOption::AddingStrPlacePattern::Head;
00213 
00214     /**
00215     * @brief    The column name for the additional data to the output file
00216     */
00217     std::string m_file_add_column;
00218 };

Generated on 10 Apr 2023 for Word API C/C++ Interface by Doxygen 1.3-rc2