1 /* ////////// LICENSE INFO ////////////////////
3 * Copyright (C) 2013 by NYSOL CORPORATION
5 * Unless you have received this program directly from NYSOL pursuant
6 * to the terms of a commercial license agreement with NYSOL, then
7 * this program is licensed to you under the terms of the GNU Affero General
8 * Public License (AGPL) as published by the Free Software Foundation,
9 * either version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF
13 * NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
15 * Please refer to the AGPL (http://www.gnu.org/licenses/agpl-3.0.txt)
18 ////////// LICENSE INFO ////////////////////*/
19 // ============================================================================
21 // ============================================================================
32 namespace kglib ////////////////////////////////////////////// start namespace
38 kgCSV* _csv; // 対象CSVクラス
39 vector<kgstr_t> _name; // 項目名
40 vector<kgstr_t> _attr; // 属性
41 vector<int> _num; // name位置->CSV項目番号
42 vector<int> _flg; // csv項目番号->name位置
45 // _name,_attrから_num,_flgへのデータセット(set関数で使用)
46 void _num_flg_Set(kgCSV* csv ,bool fldno,bool attrEval=true);
51 kgArgFld() : _csv(0){}
54 void set(vector< vector<kgstr_t> >& vvs, kgCSV* csv ,bool fldno, bool attrEval=true) throw(kgError);
55 void set(vector<kgstr_t>& vs, kgCSV* csv,bool fldno) throw(kgError);
56 void set(kgstr_t& s, kgCSV* csv,bool fldno) throw(kgError);
59 size_t size(void) const { return _name.size();}
60 size_t attrSize(void) const { return _attr.size();}
61 size_t numSize(void) const { return _num.size(); }
64 const kgCSV* csv(void) const { return _csv; }
65 const vector<kgstr_t> getAttr(void) const { return _attr; }
66 const vector<kgstr_t> getName(void) const { return _name; }
67 const vector<int> getNum(void) const { return _num; }
68 const vector<int> getFlg(void) const { return _flg; }
69 const vector<int>* getFlg_p(void) const { return &_flg; }
71 const kgstr_t name(size_t num) const;
72 const kgstr_t attr(size_t num) const;
73 int num (size_t num) const;
74 int flg (size_t num) const;
78 } //////////////////////////////////////////////////////////////// end namespace