54 inline static SP::MM_Structure
New() {
90 if (data==
null)
return false;
100 if (data==
null)
return false;
102 return data->
isChar(isUnsigned);
108 if (data==
null)
return false;
116 if (data==
null)
return false;
118 return data->
isInt(isUnsigned);
124 if (data==
null)
return false;
132 if (data==
null)
return false;
141 if (data==
null)
return false;
149 if (data==
null)
return false;
157 if (data==
null)
return false;
166 if (data==
null)
return false;
176 if (data==
null)
return false;
193 if (data==
null)
return false;
200 if (data==
null)
return false;
201 int nFields=fields.size();
202 for (
int i=0;i<nFields;i++) {
203 if (!data->
hasField(fields[i]))
return false;
228 if (isVector)
return false;
344 if (!
isString(isVector))
return false;
345 if (!isVector)
return false;
359 if (!isVector)
return false;
360 if (isCopied || !isBool) {
364 else return data->
getValue(n,(
const bool*&) value);
372 tBoolean isVector=
false,isUnsigned=
false;
374 if (!isVector)
return false;
375 if (!isUnsigned)
return false;
376 if (isCopied || !isTypeOk) {
380 else return data->
getValue(n,(
const unsigned char*&) value);
388 tBoolean isVector=
false,isUnsigned=
false;
390 if (!isVector)
return false;
391 if (!isUnsigned)
return false;
392 if (isCopied || !isTypeOk) {
396 else return data->
getValue(n,(
const unsigned int*&) value);
404 tBoolean isVector=
false,isUnsigned=
false;
406 if (!isVector)
return false;
407 if (isUnsigned)
return false;
408 if (isCopied || !isTypeOk) {
412 else return data->
getValue(n,(
const int*&) value);
419 tBoolean isVector=
false,isUnsigned=
false;
421 if (!isVector)
return false;
422 if (!isUnsigned)
return false;
423 if (isCopied || !isTypeOk ) {
427 else return data->
getValue(n,(
const unsigned long int*&) value);
434 tBoolean isVector=
false,isUnsigned=
false;
436 if (!isVector)
return false;
437 if (isUnsigned)
return false;
438 if (isCopied || !isTypeOk ) {
442 else return data->
getValue(n,(
const long int*&) value);
449 tBoolean isVector=
false,isUnsigned=
false;
451 if (!isVector)
return false;
452 if (isUnsigned)
return false;
453 if (isCopied || !isTypeOk ) {
457 else return data->
getValue(n,(
const long long int*&) value);
467 if (!isVector)
return false;
468 if (isCopied || !isTypeOk ) {
472 else return data->
getValue(n,(
const double*&) value);
482 if (!isVector)
return false;
483 if (isCopied || !isTypeOk ) {
487 else return data->
getValue(n,(
const long double*&) value);
499 if (isCopied || !isTypeOk ) {
501 return data->
getValue(nRows,nCols,n,(
double*&)value);
503 else return data->
getValue(nRows,nCols,n,(
const double*&)value);
518 data->setValue(type,card,value,separator,start,end);
547 virtual void createScalar(
const unsigned long long int& value);
568 virtual void createVector(
const vector<tString>& values);
577 virtual void createVector(
const vector<unsigned char>& values);
585 virtual void createVector(
const vector<double>& values);
589 virtual void createVector(
const vector<long double>& values);
685 createVector(n,(
const long long int *&) values,isCopied);
741 return setField(fieldName,
true,fieldValue);
751 if (data==
null) return ;
758 if (data==
null)
return "";
766 if (data==
null)
return 0;
775 if (data==
null)
return false;
782 if (mmClass==
null)
return false;
784 return (value.get()!=
null);
791 if (data==
null)
return false;
794 SP::MM_Data value=data->
getField(field);
799 if (mmClass==
null)
return false;
801 return (value.get()!=
null);
817 cout << msg.c_str() <<
"\n";
823 return mData->toString();
virtual tBoolean getScalar(long double &value) const
get the double value of argvalue
Definition: MM_Structure.h:318
virtual void createVector(const int &n, const double *values)
create a vector size of values must be n
Definition: MM_Structure.h:634
tBoolean isChar(tBoolean &isUnsigned) const
verify if the field is an short
Definition: MM_Attribute.h:192
tBoolean isDouble() const
verify if the field is a double
Definition: MM_Attribute.h:156
virtual void createFullMatrix(const int &nRows, const int &nCols, const double *values, tBoolean &isCopied)
create a matrix values must be of size nRows*nCols
Definition: MM_Structure.cpp:79
virtual void createScalar(const unsigned char &value)
create a scalar
Definition: MM_Structure.cpp:185
virtual void createVector(const int &n, const int *values)
create a vector size of values must be n
Definition: MM_Structure.h:615
This class is a primary field.
Definition: MM_Attribute.h:15
virtual tBoolean isShortInt(tBoolean &isVector, tBoolean &isUnsigned) const
Definition: MM_Structure.h:106
tBoolean isString() const
verify if the field is a string
Definition: MM_Attribute.h:204
MM_Structure(void)
create an object
Definition: MM_Structure.cpp:4
virtual void createClass(const tString &id)
create the empty structure
Definition: MM_Structure.cpp:15
virtual tBoolean getVector(int &n, double *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:463
virtual tBoolean getScalar(long int &value) const
get the integer value of argvalue
Definition: MM_Structure.h:271
tBoolean isVector() const
isVector
Definition: MM_Attribute.h:140
virtual tBoolean isBoolean(tBoolean &isVector) const
Definition: MM_Structure.h:88
virtual tBoolean getVector(int &n, tString *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:341
virtual tString getClassName() const
get the field type
Definition: MM_Structure.h:756
virtual tBoolean setClassIntoList(const tString &fieldName, const int &index, UI_Class &fieldValue)
set the index-th element of the classes list supposed to be composite or not depending on isComposite...
Definition: MM_Structure.cpp:36
virtual tBoolean getScalar(unsigned long int &value) const
get the integer value of argvalue
Definition: MM_Structure.h:298
virtual tBoolean hasField(const tString &field) const
verify if the mData is a class which contains field
Definition: MM_Structure.h:191
virtual tBoolean getString(tString &name) const
get the string value of argvalue
Definition: MM_Structure.h:217
This class describes the main interface class for a soft user interface (R,matlab,python etc...) class.
Definition: UI_Class.h:38
tBoolean isMatrix() const
isVector
Definition: MM_Attribute.h:145
virtual tBoolean isClass() const
verify if the data is a struct with fields names
Definition: MM_Structure.h:184
virtual void createString(const tString &value)
create a string
Definition: MM_Structure.cpp:232
void createValue(const tString &type, const tString &card, const tString &value, const tString &separator, const tString &start, const tString &end)
set generic value
Definition: MM_Structure.h:513
virtual tBoolean getScalar(tBoolean &value) const
get the boolean value of argvalue
Definition: MM_Structure.h:225
tBoolean isLongDouble() const
verify if the field is a long double
Definition: MM_Attribute.h:151
virtual tBoolean hasFields(const vector< tString > &fields) const
verify if the mData is a struct with fields names
Definition: MM_Structure.h:198
#define tBoolean
Definition: types.h:48
virtual tBoolean getScalar(unsigned long long int &value) const
get the integer value of argvalue
Definition: MM_Structure.h:289
virtual tBoolean getVector(vector< tString > &names) const
get the string vector value of argvalue
Definition: MM_Structure.h:332
virtual int getClassesListSize(const tString &name) const
get the number of classes in the structure
Definition: MM_Structure.h:764
virtual tBoolean createClass(const tString &id, CORE_SharedPointersVMap< tString, UI_Class > &fields)
creathe the class
Definition: MM_Structure.h:719
void setData(SP::MM_Data data)
set & get the data
Definition: MM_Structure.h:70
tString getClassId() const
get the class id
Definition: MM_Class.h:383
virtual tBoolean getVector(int &n, long double *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:478
virtual void createVector(const int &n, const tString *values)
create a vector size of values must be n
Definition: MM_Structure.h:594
#define null
Definition: types.h:13
virtual void createVector(const int &n, const long int *values)
create a vector size of values must be n
Definition: MM_Structure.h:621
virtual tBoolean getField(const tString &field, UI_Class &uiClass) const
get the field
Definition: MM_Structure.h:788
This class is a description of class.
Definition: MM_Class.h:17
virtual tString toString() const
turn the class into string
Definition: MM_Structure.h:822
SP::MM_Data getAssociation(const tString &name, const int &index)
Definition: MM_Class.h:432
virtual tBoolean getVector(int &n, long long int *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:447
virtual void createClass(const tString &id)=0
create the empty class with type id
virtual tBoolean isChar(tBoolean &isVector, tBoolean &isUnsigned) const
Definition: MM_Structure.h:98
virtual tBoolean getFullMatrix(int &nRows, int &nCols, double *&value, tBoolean &isCopied) const
get the double full matrix value of argvalue
Definition: MM_Structure.h:493
virtual tBoolean getVector(int &n, int *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:402
tBoolean hasField(const tString &name) const
return true if the class contains attribute or association with name
Definition: MM_Class.h:416
This class is a class for MetaModel exchange.
Definition: MM_Structure.h:16
void getFieldNames(vector< tString > &fields) const
get the field names
Definition: MM_Class.h:468
virtual tBoolean isDoubleFullMatrix() const
Definition: MM_Structure.h:174
virtual tBoolean getVector(int &n, unsigned char *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:370
virtual void createVector(const int &n, const long long int *values)
create a vector size of values must be n
Definition: MM_Structure.h:627
tBoolean isFloat() const
verify if the field is a double
Definition: MM_Attribute.h:161
virtual void createVector(const int &n, const unsigned int *values)
Definition: MM_Structure.h:610
This class describes a map: primitive type of Key -> shared pointer of Value.
Definition: CORE_SharedPointersVMap.h:15
tBoolean isInt(tBoolean &isUnsigned) const
verify if the field is an int
Definition: MM_Attribute.h:178
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:15
virtual tBoolean getScalar(double &value) const
get the double value of argvalue
Definition: MM_Structure.h:308
virtual void createClassesList(const tString &fieldName, const tBoolean &isComposite, const int &n)
create a multiple association of size n with name fieldname of type isComoposite
Definition: MM_Structure.cpp:22
virtual tBoolean getScalar(short int &value) const
get the integer value of argvalue
Definition: MM_Structure.h:262
virtual tBoolean getVector(int &n, long int *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:432
virtual tBoolean getScalar(long long int &value) const
get the integer value of argvalue
Definition: MM_Structure.h:280
virtual tBoolean getScalar(unsigned char &value) const
get the boolean value of argvalue
Definition: MM_Structure.h:244
virtual void printMessage(const tString &msg) const
print the message on screen
Definition: MM_Structure.h:816
virtual tBoolean isInt(tBoolean &isVector, tBoolean &isUnsigned) const
Definition: MM_Structure.h:114
virtual tBoolean getVector(int &n, unsigned long int *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:417
virtual void printErrorMessage(const tString &msg) const
print the message & quit
Definition: MM_Structure.h:810
virtual tBoolean getScalar(char &value) const
get the boolean value of argvalue
Definition: MM_Structure.h:236
tBoolean isBoolean() const
verify if the field is an short
Definition: MM_Attribute.h:198
virtual void createVector(const int &n, long long int *&values, const tBoolean &isCopied)
create a vector size of values must be n
Definition: MM_Structure.h:684
tBoolean isShortInt(tBoolean &isUnsigned) const
verify if the field is an int
Definition: MM_Attribute.h:184
virtual SP::UI_Class NewInstance() const
create a new instance of class
Definition: MM_Structure.h:62
virtual tBoolean setField(const tString &fieldName, const tBoolean &isComposite, UI_Class &fieldValue)
set the field fieldName of the class
Definition: MM_Structure.cpp:66
static SP::MM_Attribute New()
creta a matlab class
Definition: MM_Attribute.h:84
virtual void createVector(const int &n, const tBoolean *values)
create a vector size of values must be n
Definition: MM_Structure.h:600
int getAssociationCardinality(const tString &name) const
Definition: MM_Class.h:439
virtual double * createDoubleVector(const int &n)
create a vector of double of size n
Definition: MM_Structure.cpp:90
virtual tBoolean isDouble(tBoolean &isVector) const
Definition: MM_Structure.h:147
DEFINE_SPTR(MM_Structure)
virtual void getFieldNames(vector< tString > &fields) const
get the field names
Definition: MM_Structure.h:749
virtual tBoolean setField(const tString &fieldName, UI_Class &fieldValue)
set the field fieldName of the class
Definition: MM_Structure.h:740
#define tString
Definition: types.h:49
virtual void createVector(const int &n, const unsigned char *values)
Definition: MM_Structure.h:605
tBoolean isLongLongInt(tBoolean &isUnsigned) const
verify if the field is a long long int
Definition: MM_Attribute.h:172
SP::MM_Data getData() const
get the build data
Definition: MM_Structure.h:76
tBoolean isLongInt(tBoolean &isUnsigned) const
verify if the field is a long int
Definition: MM_Attribute.h:166
virtual void createVector(const int &n, const long double *values)
create a vector size of values must be n
Definition: MM_Structure.h:641
virtual void createVector(const int &n, long int *&values, const tBoolean &isCopied)
create a vector size of values must be n
Definition: MM_Structure.h:674
virtual tBoolean getClassFromList(const tString &name, const int &index, UI_Class &uiClass) const
get the data field at index of the list
Definition: MM_Structure.h:772
virtual tBoolean isLongInt(tBoolean &isVector, tBoolean &isUnsigned) const
Definition: MM_Structure.h:122
SP::MM_Data getField(const tString &name)
Definition: MM_Class.h:461
virtual tBoolean isLongDouble(tBoolean &isVector) const
Definition: MM_Structure.h:155
static SP::MM_Structure New()
creta a matlab class
Definition: MM_Structure.h:54
virtual tBoolean isString(tBoolean &isVector) const
Definition: MM_Structure.h:164
virtual int * createIntVector(const int &n)
create a vector of int of size n
Definition: MM_Structure.cpp:96
virtual tBoolean isLongLongInt(tBoolean &isVector, tBoolean &isUnsigned) const
Definition: MM_Structure.h:130
virtual tBoolean getVector(int &n, bool *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:355
tBoolean getValue(tString &v) const
get the value
Definition: MM_Attribute.h:836
virtual tBoolean getScalar(int &value) const
get the integer value of argvalue
Definition: MM_Structure.h:253
virtual tBoolean getVector(int &n, unsigned int *&value, tBoolean &isCopied) const
get the vector value of argvalue
Definition: MM_Structure.h:386
virtual ~MM_Structure(void)
destroy an object.
Definition: MM_Structure.cpp:10
virtual void createVector(const vector< tString > &values)
create a vector size of values must be n
Definition: MM_Structure.cpp:104
virtual tBoolean isFloat(tBoolean &isVector) const
Definition: MM_Structure.h:139
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106