39#include "../include/STK_IPage.h"
51 , isOptional_(isOptional)
67 , isOptional_(
page.isOptional())
69 , p_Page_(
page.clone())
81 , isOptional_(
opt.isOptional_)
82 , isValued_(
opt.isOptional_)
105 if (
opt.p_lString_)
set(*(
opt.p_lString_));
117 if (
opt.p_lRange_)
set(*(
opt.p_lRange_));
146 if (
opt.p_String_)
set(*(
opt.p_String_));
162 if (
opt.p_lString_)
set(*(
opt.p_lString_));
174 if (
opt.p_lRange_)
set(*(
opt.p_lRange_));
400 p_lReal_ =
new std::list<Real>(value);
410 p_lint_ =
new std::list<int>(value);
#define STKRUNTIME_ERROR_1ARG(Where, Arg, Error)
#define STKRUNTIME_ERROR_NO_ARG(Where, Error)
#define _T(x)
Let x unmodified.
This file include all the other header files of the project Sdk.
A IPage is an interface base class for reading and/or writing a page of option in a file.
void write(ostream &os) const
write out options in a stream
virtual bool validate()
validate the page.
virtual IPage * clone() const
String const & msg_error() const
name of the IPage.
void read(istream &is)
read in options from an input steam stream
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
the Option class allow to store the value of an option from a IPage.
void read(istream &is)
read in the options from the input stream.
Option & operator=(const Option &opt)
Assignment operator.
void setPage(IPage const &value)
set a value from a Page.
void setDefaultValue()
set a default value of the option.
bool setValue(String const &str)
Convert a string in a value.
std::list< int > * p_lint_
void write(ostream &os) const
write out the options in the output stream
Char sep_
Char used for the option list.
TypeOption type_
type of the option
std::list< String > * p_lString_
bool isOptional_
true if the option is optional, false otherwise
bool isValued_
true if the option is valued, false otherwise.
Option(String const &name, TypeOption type=string_, bool isOptional=true)
constructor.
TypeOption type() const
type of the option.
std::list< Range > * p_lRange_
std::list< Real > * p_lReal_
String name_
name of the option
void deleteValue()
Remove the value of the option.
void set(String const &value)
set a value from string.
Index sub-vector region: Specialization when the size is unknown.
bool stringToType(Type &t, String const &s, std::ios_base &(*f)(std::ios_base &)=std::dec)
convert a String to Type
String const & toUpperString(String &s)
convert the characters of the String to upper case
String stringNa
Representation of a Not Available value.
void readList(String const &strBuffer, std::list< TYPE > &lst, Char sep=CHAR_SEP)
Read a list of value of type TYPE stored in a line.
TypeOption
A TypeOption is the kind of options that can read or write a program in a file.
void writeList(ostream &os, std::list< TYPE > const &lst, Char sep=CHAR_SEP)
Write a list of value of type TYPE stored in a line.
@ linteger_
list of discrete numbers separated by commas
@ lstring_
list of strings separated by commas
@ lreal_
list of floating numbers separated by commas
@ integer_
discrete number
@ lrange_
list of range of number separated by commas
std::basic_string< Char > String
STK fundamental type of a String.
double Real
STK fundamental type of Real values.
std::basic_ostream< Char > ostream
ostream for Char
std::basic_istream< Char > istream
istream for Char
The namespace STK is the main domain space of the Statistical ToolKit project.
TRange< UnknownSize > Range
static Type NA()
Adding a Non Available (NA) special number.