Qucs-core  0.0.19
dataset.h
Go to the documentation of this file.
00001 /*
00002  * dataset.h - dataset class definitions
00003  *
00004  * Copyright (C) 2003, 2004, 2006, 2007 Stefan Jahn <stefan@lkcc.org>
00005  *
00006  * This is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2, or (at your option)
00009  * any later version.
00010  *
00011  * This software is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this package; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  * $Id$
00022  *
00023  */
00024 
00025 #ifndef __DATASET_H__
00026 #define __DATASET_H__
00027 
00028 #include "object.h"
00029 
00030 namespace qucs {
00031 
00032 class vector;
00033 
00034 class dataset : public object
00035 {
00036  public:
00037   dataset ();
00038   dataset (char *);
00039   dataset (const dataset &);
00040   ~dataset ();
00041   void addDependency (qucs::vector *);
00042   void addDependencies (qucs::vector *);
00043   void appendDependency (qucs::vector *);
00044   void appendDependencies (qucs::vector *);
00045   void addVariable (qucs::vector *);
00046   void addVariables (qucs::vector *);
00047   void appendVariable (qucs::vector *);
00048   void appendVariables (qucs::vector *);
00049   void applyDependencies (qucs::vector * v);
00050   void delDependency (qucs::vector *);
00051   void delVariable (qucs::vector *);
00052 
00053   void assignDependency (const char *const, const char * const);
00054   char * getFile (void);
00055   void setFile (const char *);
00056   void print (void);
00057   void printData (qucs::vector *, FILE *);
00058   void printDependency (qucs::vector *, FILE *);
00059   void printVariable (qucs::vector *, FILE *);
00060   qucs::vector * findDependency (const char *);
00061   qucs::vector * findVariable (const std::string &);
00062   qucs::vector * getDependencies (void) { return dependencies; }
00063   qucs::vector * getVariables (void) { return variables; }
00064   int isDependency (qucs::vector *);
00065   int isVariable (qucs::vector *);
00066   qucs::vector * findOrigin (char *);
00067   static dataset * load (const char *);
00068   static dataset * load_touchstone (const char *);
00069   static dataset * load_csv (const char *);
00070   static dataset * load_citi (const char *);
00071   static dataset * load_zvr (const char *);
00072   static dataset * load_mdl (const char *);
00073 
00074   int countDependencies (void);
00075   int countVariables (void);
00076 
00077  private:
00078   char * file;
00079   qucs::vector * dependencies;
00080   qucs::vector * variables;
00081 };
00082 
00083 } // namespace qucs
00084 
00085 #endif /* __DATASET_H__ */