Main Page | Namespace List | Compound List | File List | Compound Members | File Members

scaling_usr.cc

Go to the documentation of this file.
00001 /*--------------------------------------------------------------------
00002  *
00003  * (C) Copyright Koninklijke Philips Electronics NV 2006. 
00004  * All rights reserved. This software is licensed under the terms of
00005  * version 2.1 of the GNU Lesser General Public License as published 
00006  * by the Free Software Foundation. For licensing and warranty
00007  * information, see the file COPYING in the main directory.
00008  *
00009  *------------------------------------------------------------------*/
00010 
00011 #include "scaling_usr.h"
00012 #include "parse_options.h"
00013 
00014 ScalingUsr::ScalingUsr
00015 (
00016   const Id&             n,
00017   Out<scaling_args_t>&  arguments,
00018   char*                 filename
00019 )
00020 : //member initialisation
00021   Process(n),
00022   argumentsP(id("argumentsP"), arguments),
00023   cfg_filename(filename)
00024 {
00025 }
00026 
00027 void ScalingUsr::main()
00028 {
00029   scaling_args_t arguments;
00030 
00031   option_t options[] =
00032   {
00033       { "hsize", "int", NULL, &arguments.hsize, "horizontal output size"},
00034       { "vsize", "int", NULL, &arguments.vsize, "vertical output size"},
00035       { NULL, NULL, NULL, NULL, NULL}
00036   };
00037 
00038   #ifdef VERBOSE
00039     printf("%s: parsing cfg-files %s\n",
00040       fullName(),
00041       cfg_filename
00042     );
00043   #endif
00044   char *scalingArgs[] = {"", "-ini", cfg_filename};
00045   if (parse_options((char*)fullName(), 3, scalingArgs, options))
00046   {
00047     exit(1);
00048   }
00049 
00050   #ifdef VERBOSE
00051     print_option_values(cfg_filename, options);
00052     printf("\n");
00053   #endif
00054 
00055   write(argumentsP, arguments);
00056 }

Generated on Wed Feb 15 14:52:44 2006 for scaling by doxygen 1.3.2