C++ main module for mmsd Package  1.0
MM_Attribute.h
Go to the documentation of this file.
1 #ifndef MM_Attribute_H
2 #define MM_Attribute_H
3 
4 #include "MM_Data.h"
5 #include "CORE_String.h"
6 
7 
15 class MM_Attribute : public virtual MM_Data {
16 
17  SP_OBJECT(MM_Attribute);
18  // ATTRIBUTES
19 
20 public:
21  static const tFlag DIM;//size of a vector
22  static const tFlag ROW;//number of rows
23  static const tFlag COL;// number of cols
24 private:
25  static const tFlag STRING;
26  static const tFlag BOOL;
27  static const tFlag CHAR;
28  static const tFlag UCHAR;
29  static const tFlag SHORT;
30  static const tFlag USHORT;
31  static const tFlag INT;
32  static const tFlag UINT;
33  static const tFlag LONG;
34  static const tFlag LLONG;
35  static const tFlag ULLONG;
36  static const tFlag ULONG;
37  static const tFlag FLOAT;
38  static const tFlag DOUBLE;
39  static const tFlag LONG_DOUBLE;
40 
41 private:
42  static const tFlag SINGLE_CARDINALITY;
43  static const tFlag MULTIPLE_CARDINALITY;
44 
45 
46 
47  // type of the field
48  tFlag mAttributeType;
49  tFlag mCardinality;
50 
51  // value of primitive type
52  vector<int> mDimensions;
53  const void* mValue;
54  tBoolean mIsValueReferenced;
55 
56 
57 
58 protected:
59  // METHODS
60 
61  // CONSTRUCTORS
62 
64  MM_Attribute(void);
65 
66 
67 
68  // DESTRUCTORS
69 
70 
73  virtual ~MM_Attribute(void);
74 
75 
76 
77 public:
78  //----------------
79  // NEW constructors
80  // ---------------
81 
84  inline static SP::MM_Attribute New() {
85  SP::MM_Attribute p(new MM_Attribute(),
87  p->setThis(p);
88  return p;
89  };
90 
91 
92  // -------------------
93  // CARDINALITY Method
94  // -------------------
95 
99  if (mCardinality==SINGLE_CARDINALITY) return "1";
100  else return "*";
101  };
102 
105  inline void setCardinality(const tString& card) {
106  if (card.compare("1")==0) setIsSingleCardinality();
108  };
109 
112  inline tBoolean isSingleCardinality() const {
113  return (mCardinality==SINGLE_CARDINALITY);
114  }
115 
119  return (mCardinality==MULTIPLE_CARDINALITY);
120  };
121 
124  inline void setIsSingleCardinality() {
125  mCardinality=SINGLE_CARDINALITY;
126  };
129  inline void setIsMultipleCardinality() {
130  mCardinality=MULTIPLE_CARDINALITY;
131  };
132 
133 
134  // ------------
135  // TYPE Methods
136  // ------------
137 
140  inline tBoolean isVector() const {
141  return (mDimensions.size()==1) && (isMultipleCardinality());
142  }
145  inline tBoolean isMatrix() const {
146  return (mDimensions.size()==3);
147  }
148 
151  inline tBoolean isLongDouble() const {
152  return (mAttributeType==LONG_DOUBLE);
153  }
156  inline tBoolean isDouble() const {
157  return (mAttributeType==DOUBLE);
158  };
161  inline tBoolean isFloat() const {
162  return (mAttributeType==FLOAT);
163  };
166  inline tBoolean isLongInt(tBoolean &isUnsigned) const {
167  isUnsigned=(mAttributeType==ULONG);
168  return ((mAttributeType==ULONG) || (mAttributeType==LONG));
169  };
172  inline tBoolean isLongLongInt(tBoolean &isUnsigned) const {
173  isUnsigned=(mAttributeType==ULLONG);
174  return ((mAttributeType==ULLONG) || (mAttributeType==LLONG));
175  };
178  inline tBoolean isInt(tBoolean &isUnsigned) const {
179  isUnsigned=(mAttributeType==UINT);
180  return ((mAttributeType==UINT) || (mAttributeType==INT));
181  };
184  inline tBoolean isShortInt(tBoolean &isUnsigned) const {
185  isUnsigned=(mAttributeType==USHORT);
186  return ((mAttributeType==USHORT) || (mAttributeType==SHORT));
187  };
188 
189 
192  inline tBoolean isChar(tBoolean &isUnsigned) const {
193  isUnsigned=(mAttributeType==UCHAR);
194  return ((mAttributeType==UCHAR) || (mAttributeType==CHAR));
195  };
198  inline tBoolean isBoolean() const {
199 
200  return (mAttributeType==BOOL);
201  };
204  inline tBoolean isString() const {
205  return (mAttributeType==STRING);
206  };
207 
208 
209 
210 
211 
214  tString getFieldType(const int& i) const;
215 
218  virtual tString getFieldType() const {
219  return getFieldType(mAttributeType);
220  };
221 
222 
223 
224 
225  // -----------------------------------------------
226  // Set Value methods for single primitive type
227  // -----------------------------------------------
228 
231  void setValue(const tString& type,
232  const tString& card,
233  const tString& value,
234  const tString& separator,const tString& start,const tString& end);
235 
238  inline void setValue(const tString& v) {
240  mDimensions[DIM]=1;
241  mDimensions.resize(1);
242  tString *vs=new tString(v);
243  mValue=vs;
244  mAttributeType=STRING;
245  };
248  inline void setValue(const tBoolean& v) {
250  mDimensions[DIM]=1;
251  mDimensions.resize(1);
252  tBoolean *vs=new tBoolean(v);
253  mValue=vs;
254  mAttributeType=BOOL;
255  };
258  inline void setValue(const char* v) {
259  setValue(tString(v));
260  };
263  inline void setValue(const char& v) {
265  mDimensions[DIM]=1;
266  mDimensions.resize(1);
267  char *vs=new char(v);
268  mValue=vs;
269  mAttributeType=CHAR;
270  };
273  inline void setValue(const short& v) {
275  mDimensions[DIM]=1;
276  mDimensions.resize(1);
277  short *vs=new short(v);
278  mValue=vs;
279  mAttributeType=SHORT;
280 
281  };
284  inline void setValue(const int& v) {
286  mDimensions[DIM]=1;
287  mDimensions.resize(1);
288  int *vs=new int(v);
289  mValue=vs;
290  mAttributeType=INT;
291  };
294  inline void setValue(const long int& v) {
296  mDimensions[DIM]=1;
297  mDimensions.resize(1);
298  long int *vs=new long int(v);
299  mValue=vs;
300  mAttributeType=LONG;
301  };
304  inline void setValue(const long long int& v) {
306  mDimensions[DIM]=1;
307  mDimensions.resize(1);
308  long long int *vs=new long long int(v);
309  mValue=vs;
310  mAttributeType=LLONG;
311  };
314  inline void setValue(const unsigned long long int& v) {
316  mDimensions[DIM]=1;
317  mDimensions.resize(1);
318  unsigned long long int *vs=new unsigned long long int(v);
319  mValue=vs;
320  mAttributeType=ULLONG;
321  };
324  inline void setValue(const unsigned char& v) {
326  mDimensions[DIM]=1;
327  mDimensions.resize(1);
328  unsigned char *vs=new unsigned char(v);
329  mValue=vs;
330  mAttributeType=UCHAR;
331  };
334  inline void setValue(const unsigned short& v) {
336  mDimensions[DIM]=1;
337  mDimensions.resize(1);
338  unsigned short *vs=new unsigned short(v);
339  mValue=vs;
340  mAttributeType=USHORT;
341  };
344  inline void setValue(const unsigned int& v) {
346  mDimensions[DIM]=1;
347  mDimensions.resize(1);
348  unsigned int *vs=new unsigned int(v);
349  mValue=vs;
350  mAttributeType=UINT;
351  };
354  inline void setValue(const unsigned long int& v) {
356  mDimensions[DIM]=1;
357  mDimensions.resize(1);
358  unsigned long int *vs=new unsigned long int(v);
359  mValue=vs;
360  mAttributeType=ULONG;
361  };
364  inline void setValue(const double& v) {
366  mDimensions[DIM]=1;
367  mDimensions.resize(1);
368  double *vs=new double(v);
369  mValue=vs;
370  mAttributeType=DOUBLE;
371  };
374  inline void setValue(const long double& v) {
376  mDimensions[DIM]=1;
377  mDimensions.resize(1);
378  long double *vs=new long double(v);
379  mValue=vs;
380  mAttributeType=LONG_DOUBLE;
381  };
382  // -----------------------------------------------
383  // Set Value methods for vector primitive type
384  // -----------------------------------------------
387  inline void setValue(const vector<tString>& value) {
389  int n=value.size();
390  mDimensions[DIM]=n;
391  mDimensions.resize(1);
392  if (n>0) {
393  std::string *vs =new std::string[n];
394  for (int i=0;i<n;i++) vs[i]=value[i];
395  mValue=vs;
396  } else mValue=null;
397  mIsValueReferenced=false;
398  mAttributeType=STRING;
399 
400  };
403  inline void setValue(const vector<bool>& value) {
405  int n=value.size();
406  mDimensions[DIM]=n;
407  mDimensions.resize(1);
408  if (n>0) {
409  bool *vs =new bool[n];
410  for (int i=0;i<n;i++) vs[i]=value[i];
411  mValue=vs;
412  } else mValue=null;
413 
414  mIsValueReferenced=false;
415  mAttributeType=BOOL;
416  };
419  inline void setValue(const vector<unsigned char>& value) {
421  int n=value.size();
422  mDimensions[DIM]=n;
423  mDimensions.resize(1);
424  if (n>0) {
425  unsigned char *vs =new unsigned char[n];
426  for (int i=0;i<n;i++) vs[i]=value[i];
427  mValue=vs;
428  } else mValue=null;
429  mIsValueReferenced=false;
430  mAttributeType=UCHAR;
431  };
434  inline void setValue(const vector<int>& value) {
436  int n=value.size();
437  mDimensions[DIM]=n;
438  mDimensions.resize(1);
439  if (n>0) {
440  int *vs =new int[n];
441  for (int i=0;i<n;i++) vs[i]=value[i];
442  mValue=vs;
443  } else mValue=null;
444  mIsValueReferenced=false;
445  mAttributeType=INT;
446  };
449  inline void setValue(const vector<double>& value) {
451  int n=value.size();
452  mDimensions[DIM]=n;
453  mDimensions.resize(1);
454  if (n>0) {
455  double *vs =new double[n];
456  for (int i=0;i<n;i++) vs[i]=value[i];
457  mValue=vs;
458  } else mValue=null;
459  mIsValueReferenced=false;
460  mAttributeType=DOUBLE;
461  };
464  inline void setValue(const vector<long double>& value) {
466  int n=value.size();
467  mDimensions[DIM]=n;
468  mDimensions.resize(1);
469  if (n>0) {
470  long double *vs =new long double[n];
471  for (int i=0;i<n;i++) vs[i]=value[i];
472  mValue=vs;
473  } else mValue=null;
474  mIsValueReferenced=false;
475  mAttributeType=LONG_DOUBLE;
476  };
477 
480  inline void setValue(const int& n,const tString*& v,const tBoolean& isCopied) {
482  if (v!=null) {
483  mDimensions[DIM]=n;
484  mDimensions.resize(1);
485  if (isCopied) {
486  if (n>0) {
487  tString *vs =new tString[n];
488  for (int i=0;i<n;i++) vs[i]=v[i];
489  mValue=vs;
490  } else {
491  mValue=null;
492  }
493  } else {
494  mValue=v;
495 
496  }
497  mIsValueReferenced=!isCopied;
498 
499  } else {
500  mIsValueReferenced=false;
501  mValue=null;
502  mDimensions[DIM]=0;
503  mDimensions.resize(1);
504  }
505  mAttributeType=STRING;
506  };
509  inline void setValue(const int& n,const bool*& v,const tBoolean& isCopied) {
511  if (v!=null) {
512  mDimensions[DIM]=n;
513  mDimensions.resize(1);
514  if (isCopied) {
515  if (n>0) {
516  bool *vs =new bool[n];
517  for (int i=0;i<n;i++) vs[i]=v[i];
518  mValue=vs;
519  } else mValue=null;
520  } else {
521  mValue=v;
522 
523  }
524  mIsValueReferenced=!isCopied;
525 
526  } else {
527  mIsValueReferenced=false;
528  mValue=null;
529  mDimensions[DIM]=0;
530  mDimensions.resize(1);
531  }
532  mAttributeType=BOOL;
533  };
536  inline void setValue(const int& n,const unsigned int*& v,const tBoolean& isCopied) {
538  if (v!=null) {
539  mDimensions[DIM]=n;
540  mDimensions.resize(1);
541  if (isCopied) {
542  if (n>0) {
543  unsigned int *vs =new unsigned int[n];
544  for (int i=0;i<n;i++) vs[i]=v[i];
545  mValue=vs;
546  } else mValue=null;
547  } else {
548  mValue=v;
549 
550  }
551  mIsValueReferenced=!isCopied;
552 
553  } else {
554  mIsValueReferenced=false;
555  mValue=null;
556  mDimensions[DIM]=0;
557  mDimensions.resize(1);
558  }
559  mAttributeType=UINT;
560  };
563  inline void setValue(const int& n,unsigned int* v,const tBoolean& isCopied) {
564  setValue(n,(const unsigned int*&) v,isCopied);
565  };
568  inline void setValue(const int& n,const unsigned char*& v,const tBoolean& isCopied) {
570  if (v!=null) {
571  mDimensions[DIM]=n;
572  mDimensions.resize(1);
573  if (isCopied) {
574  if (n>0) {
575  unsigned char *vs =new unsigned char[n];
576  for (int i=0;i<n;i++) vs[i]=v[i];
577  mValue=vs;
578  } else {
579  mValue=null;
580  }
581  } else {
582  mValue=v;
583 
584  }
585  mIsValueReferenced=!isCopied;
586 
587  } else {
588  mIsValueReferenced=false;
589  mValue=null;
590  mDimensions[DIM]=0;
591  mDimensions.resize(1);
592  }
593  mAttributeType=UCHAR;
594  };
597  inline void setValue(const int& n,unsigned char* v,const tBoolean& isCopied) {
598  setValue(n,(const unsigned char*&) v,isCopied);
599  };
602  inline void setValue(const int& n,const long int*& v,const tBoolean& isCopied) {
604  if (v!=null) {
605  mDimensions[DIM]=n;
606  if (isCopied) {
607  if (n>0) {
608  long int *vs =new long int[n];
609  for (int i=0;i<n;i++) vs[i]=v[i];
610  mValue=vs;
611  } else mValue=null;
612  } else {
613  mValue=v;
614 
615  }
616  mIsValueReferenced=!isCopied;
617 
618  } else {
619  mIsValueReferenced=false;
620  mValue=null;
621  mDimensions[DIM]=0;
622  }
623  mAttributeType=LONG;
624  };
627  inline void setValue(const int& n,long int* v,const tBoolean& isCopied) {
628  setValue(n,(const long int*&) v,isCopied);
629  };
632  inline void setValue(const int& n,const long long int*& v,const tBoolean& isCopied) {
634  if (v!=null) {
635  mDimensions[DIM]=n;
636  if (isCopied) {
637  if (n>0) {
638  long long int *vs =new long long int[n];
639  for (int i=0;i<n;i++) vs[i]=v[i];
640  mValue=vs;
641  } else mValue=null;
642  } else {
643  mValue=v;
644 
645  }
646  mIsValueReferenced=!isCopied;
647 
648  } else {
649  mIsValueReferenced=false;
650  mValue=null;
651  mDimensions[DIM]=0;
652  }
653  mAttributeType=LLONG;
654  };
657  inline void setValue(const int& n,long long int* v,const tBoolean& isCopied) {
658  setValue(n,(const long long int*&) v,isCopied);
659  };
660 
663  inline void setValue(const int& n,const int*& v,const tBoolean& isCopied) {
665  if (v!=null) {
666  mDimensions[DIM]=n;
667  if (isCopied) {
668  if (n>0) {
669  int *vs =new int[n];
670  for (int i=0;i<n;i++) vs[i]=v[i];
671  mValue=vs;
672  } else mValue=null;
673  } else {
674  mValue=v;
675 
676  }
677  mIsValueReferenced=!isCopied;
678 
679  } else {
680  mIsValueReferenced=false;
681  mValue=null;
682  mDimensions[DIM]=0;
683  }
684  mAttributeType=INT;
685  };
688  inline void setValue(const int& n,const double*& v,const tBoolean& isCopied) {
690  if (v!=null) {
691  mDimensions[DIM]=n;
692  if (isCopied) {
693  if (n>0) {
694  double*vs =new double[n];
695  for (int i=0;i<n;i++) vs[i]=v[i];
696  mValue=vs;
697  } else mValue=null;
698  } else {
699  mValue=v;
700  }
701  mIsValueReferenced=!isCopied;
702 
703  } else {
704  mDimensions[DIM]=0;
705  mValue=null;
706  mIsValueReferenced=false;
707  }
708  mAttributeType=DOUBLE;
709  };
712  inline void setValue(const int& n,const long double*& v,const tBoolean& isCopied) {
714  if (v!=null) {
715  mDimensions[DIM]=n;
716  if (isCopied) {
717  if (n>0) {
718  long double*vs =new long double[n];
719  for (int i=0;i<n;i++) vs[i]=v[i];
720  mValue=vs;
721  } else mValue=null;
722  } else {
723  mValue=v;
724  }
725  mIsValueReferenced=!isCopied;
726 
727  } else {
728  mDimensions[DIM]=0;
729  mValue=null;
730  mIsValueReferenced=false;
731  }
732  mAttributeType=LONG_DOUBLE;
733  };
734  // -----------------------------------------------
735  // Set Value methods for matrix primitive type
736  // -----------------------------------------------
737  inline void setValue(const int& nRows,const int& nCols,const int& nValues,double* v,const tBoolean& isCopied) {
738  setValue(nRows,nCols,nValues,(const double*&)v,isCopied);
739  }
742  inline void setValue(const int& nRows,const int& nCols,const int& nValues,const double*& v,const tBoolean& isCopied) {
744  mDimensions.resize(3);
745  if (v!=null) {
746  mDimensions[DIM]=nValues;
747  mDimensions[ROW]=nRows;
748  mDimensions[COL]=nCols;
749  if (isCopied) {
750  if (nValues>0) {
751  double *vs=new double[nValues];
752  for (int i=0;i<nValues;i++) vs[i]=v[i];
753  mValue=vs;
754  } else mValue=null;
755 
756  } else {
757  mValue=v;
758  }
759  mIsValueReferenced=!isCopied;
760 
761  } else {
762  mValue=null;
763  mDimensions[DIM]=0;
764  mDimensions[ROW]=0;
765  mDimensions[COL]=0;
766  mDimensions.resize(1);
767  mIsValueReferenced=false;
768  }
769  mAttributeType=DOUBLE;
770  }
773  inline void setValue(const int& nRows,const int& nCols,const vector<double>& v) {
775  int nValues=v.size();
776  mDimensions.resize(3);
777  mDimensions[DIM]=nValues;
778  mDimensions[ROW]=nRows;
779  mDimensions[COL]=nCols;
780  if (nValues>0) {
781  double *vs=new double[nValues];
782  for (int i=0;i<nValues;i++) vs[i]=v[i];
783  mValue=vs;
784  }
785  mIsValueReferenced=false;
786  mAttributeType=DOUBLE;
787  }
788 
791  inline double *createValue(const int& nRows,const int& nCols,const int& nValues) {
793  mDimensions.resize(3);
794 
795  mDimensions[DIM]=nValues;
796  mDimensions[ROW]=nRows;
797  mDimensions[COL]=nCols;
798  double *vs=new double[nValues];
799  mIsValueReferenced=false;
800  mAttributeType=DOUBLE;
801  return vs;
802  }
805  inline double *createDoubleValue(const int& nValues) {
807  mDimensions.resize(1);
808  mDimensions[DIM]=nValues;
809  double *vs=new double[nValues];
810  mIsValueReferenced=false;
811  mAttributeType=DOUBLE;
812  return vs;
813  }
816  inline int *createIntValue(const int& nValues) {
818  mDimensions.resize(1);
819  mDimensions[DIM]=nValues;
820  int *vs=new int[nValues];
821  mIsValueReferenced=false;
822  mAttributeType=INT;
823  return vs;
824  }
825 
826  // -----------------------------------------------
827  // Get Value methods for single primitive type
828  // -----------------------------------------------
829 
832  tString getValueToString(const tString& separator,const tString& start,const tString& end) const;
833 
836  inline tBoolean getValue(tString& v) const {
837  if (mValue==null) return false;
838  if (isString()) {
839  v=*static_cast<const tString*>(mValue);
840  return true;
841  }
842  return false;
843  };
846  inline tBoolean getValue(tBoolean& v) const {
847  if (mValue==null) return false;
848  if (isBoolean()) {
849  v=*static_cast<const tBoolean*>(mValue);
850  } else {
851  v=(tBoolean) (*static_cast<const tBoolean*>(mValue));
852  }
853  return true;
854  };
857  inline tBoolean getValue(char& v) const {
858  if (mValue==null) return false;
859  v=*static_cast<const char*>(mValue);
860  return true;
861  };
864  inline tBoolean getValue(short& v) const {
865  if (mValue==null) return false;
866  v=*static_cast<const short*>(mValue);
867  return true;
868  };
871  inline tBoolean getValue(int& v) const {
872  if (mValue==null) return false;
873  v=*static_cast<const int*>(mValue);
874  return true;
875  };
878  inline tBoolean getValue(long int& v) const {
879  if (mValue==null) return false;
880  v=*static_cast<const long int*>(mValue);
881  return true;
882  };
885  inline tBoolean getValue(long long int& v) const {
886  if (mValue==null) return false;
887  v=*static_cast<const long long int*>(mValue);
888  return true;
889  };
892  inline tBoolean getValue(unsigned long long int& v) const {
893  if (mValue==null) return false;
894  v=*static_cast<const unsigned long long int*>(mValue);
895  return true;
896  };
899  inline tBoolean getValue(unsigned char& v) const {
900  if (mValue==null) return false;
901  v=*static_cast<const unsigned char*>(mValue);
902  return true;
903  };
906  inline tBoolean getValue(unsigned short& v) const {
907  if (mValue==null) return false;
908  v=*static_cast<const unsigned short*>(mValue);
909  return true;
910  };
913  inline tBoolean getValue(unsigned int& v) const {
914  if (mValue==null) return false;
915  v=*static_cast<const unsigned int*>(mValue);
916  return true;
917  };
918 
922  inline tBoolean getValue(unsigned long int& v) const {
923  if (mValue==null) return false;
924  v=*static_cast<const unsigned long int*>(mValue);
925  return true;
926  };
929  inline tBoolean getValue(float& v) const {
930  if (mValue==null) return false;
931  v=*static_cast<const float*>(mValue);
932  return true;
933  };
936  inline tBoolean getValue(double & v) const {
937  if (mValue==null) return false;
938  v=*static_cast<const double*>(mValue);
939  return true;
940  };
943  inline tBoolean getValue(long double & v) const {
944  if (mValue==null) return false;
945  v=*static_cast<const long double*>(mValue);
946  return true;
947  };
948 
949  // -----------------------------------------------
950  // Get Value methods for vector primitive type
951  // -----------------------------------------------
952 
955  inline tBoolean getValue(vector<tString>& v) const {
956  if (mValue==null) return false;
957  const tString *vs=static_cast<const tString*>(mValue);
958  v.resize(mDimensions[DIM]);
959  for (int i=0;i<mDimensions[DIM];i++) {
960  v[i]=vs[i];
961  }
962  return true;
963  };
964 
967  inline tBoolean getValue(int& n,const tString*& v) const {
968  if (mValue==null) return false;
969  if (!isString()) return false;
970  n=mDimensions[DIM];
971  v=static_cast<const tString*>(mValue);
972  return true;
973  };
976  inline tBoolean getValue(int& n,const bool*& v) const {
977  if (mValue==null) return false;
978  if (!isBoolean()) return false;
979  n=mDimensions[DIM];
980  v=static_cast<const bool*>(mValue);
981  return true;
982  };
985  inline tBoolean getValue(int& n,bool*& v) const {
986  if (mValue==null) return false;
987  n=mDimensions[DIM];
988  const bool *vs=static_cast<const bool*>(mValue);
989  if (n>0) {
990  v=new bool[n];
991  for (int i=0;i<n;i++) v[i]=vs[i];
992  } else v=null;
993  return true;
994  };
995 
998  inline tBoolean getValue(int& n,tString*& v) const {
999  if (mValue==null) return false;
1000  const tString *vs=static_cast<const tString*>(mValue);
1001  n=mDimensions[DIM];
1002  if (n>0) {
1003  v=new tString[n];
1004  for (int i=0;i<n;i++) v[i]=vs[i];
1005  } else v=null;
1006  return true;
1007  };
1010  inline tBoolean getValue(int& n,const unsigned char*& v) const {
1011  if (mValue==null) return false;
1012  tBoolean isUnsigned=false;
1013  if (!isChar(isUnsigned)) return false;
1014  if (!isUnsigned) return false;
1015  n=mDimensions[DIM];
1016  v=static_cast<const unsigned char*>(mValue);
1017  return true;
1018  };
1021  inline tBoolean getValue(int& n,unsigned char*& v) const {
1022  if (mValue==null) return false;
1023  n=mDimensions[DIM];
1024  const unsigned char *vs=static_cast<const unsigned char*>(mValue);
1025  if (n>0) {
1026  v=new unsigned char[n];
1027  for (int i=0;i<n;i++) v[i]=vs[i];
1028  } else v=null;
1029  return true;
1030  };
1033  inline tBoolean getValue(int& n,const char*& v) const {
1034  if (mValue==null) return false;
1035  tBoolean isUnsigned=false;
1036  if (!isChar(isUnsigned)) return false;
1037  if (isUnsigned) return false;
1038  n=mDimensions[DIM];
1039  v=static_cast<const char*>(mValue);
1040  return true;
1041  };
1044  inline tBoolean getValue(int& n,char*& v) const {
1045  if (mValue==null) return false;
1046  n=mDimensions[DIM];
1047  const char *vs=static_cast<const char*>(mValue);
1048  if (n>0) {
1049  v=new char[n];
1050  for (int i=0;i<n;i++) v[i]=vs[i];
1051  } else v=null;
1052  return true;
1053  };
1055  inline tBoolean getValue(int& n,const unsigned short*& v) const {
1056  if (mValue==null) return false;
1057  tBoolean isUnsigned=false;
1058  if (!isShortInt(isUnsigned)) return false;
1059  if (!isUnsigned) return false;
1060  n=mDimensions[DIM];
1061  v=static_cast<const unsigned short*>(mValue);
1062  return true;
1063  };
1066  inline tBoolean getValue(int& n,unsigned short*& v) const {
1067  if (mValue==null) return false;
1068  n=mDimensions[DIM];
1069  const unsigned short *vs=static_cast<const unsigned short*>(mValue);
1070  if (n>0) {
1071  v=new unsigned short[n];
1072  for (int i=0;i<n;i++) v[i]=vs[i];
1073  } else v=null;
1074  return true;
1075  };
1078  inline tBoolean getValue(int& n,const short*& v) const {
1079  if (mValue==null) return false;
1080  tBoolean isUnsigned=false;
1081  if (!isShortInt(isUnsigned)) return false;
1082  if (isUnsigned) return false;
1083  n=mDimensions[DIM];
1084  v=static_cast<const short*>(mValue);
1085  return true;
1086  };
1089  inline tBoolean getValue(int& n,short*& v) const {
1090  if (mValue==null) return false;
1091  n=mDimensions[DIM];
1092  const short *vs=static_cast<const short*>(mValue);
1093  if (n>0) {
1094  v=new short[n];
1095  for (int i=0;i<n;i++) v[i]=vs[i];
1096  } else v=null;
1097  return true;
1098  };
1101  inline tBoolean getValue(int& n,const unsigned int*& v) const {
1102  if (mValue==null) return false;
1103  tBoolean isUnsigned=false;
1104  if (!isInt(isUnsigned)) return false;
1105  if (!isUnsigned) return false;
1106  n=mDimensions[DIM];
1107  v=static_cast<const unsigned int*>(mValue);
1108  return true;
1109  };
1112  inline tBoolean getValue(int& n,unsigned int*& v) const {
1113  if (mValue==null) return false;
1114  n=mDimensions[DIM];
1115  const unsigned int *vs=static_cast<const unsigned int*>(mValue);
1116  if (n>0) {
1117  v=new unsigned int[n];
1118  for (int i=0;i<n;i++) v[i]=vs[i];
1119  } else v=null;
1120  return true;
1121  };
1124  inline tBoolean getValue(int& n,const int*& v) const {
1125  if (mValue==null) return false;
1126  tBoolean isUnsigned=false;
1127  if (!isInt(isUnsigned)) return false;
1128  if (isUnsigned) return false;
1129  n=mDimensions[DIM];
1130  v=static_cast<const int*>(mValue);
1131  return true;
1132  };
1136  inline tBoolean getValue(int& n,int*& v) const {
1137  if (mValue==null) return false;
1138  n=mDimensions[DIM];
1139  const int *vs=static_cast<const int*>(mValue);
1140  if (n>0) {
1141  v=new int[n];
1142  for (int i=0;i<n;i++) v[i]=vs[i];
1143  } else v=null;
1144  return true;
1145  };
1148  inline tBoolean getValue(int& n,const unsigned long int*& v) const {
1149  if (mValue==null) return false;
1150  tBoolean isUnsigned=false;
1151  if (!isLongInt(isUnsigned)) return false;
1152  if (!isUnsigned) return false;
1153  n=mDimensions[DIM];
1154  v=static_cast<const unsigned long int*>(mValue);
1155  return true;
1156  };
1159  inline tBoolean getValue(int& n,unsigned long int*& v) const {
1160  if (mValue==null) return false;
1161  n=mDimensions[DIM];
1162  const unsigned long int *vs=static_cast<const unsigned long int*>(mValue);
1163  if (n>0) {
1164  v=new unsigned long int[n];
1165  for (int i=0;i<n;i++) v[i]=vs[i];
1166  } else v=null;
1167  return true;
1168  };
1171  inline tBoolean getValue(int& n,const long int*& v) const {
1172  if (mValue==null) return false;
1173  tBoolean isUnsigned=false;
1174  if (!isLongInt(isUnsigned)) return false;
1175  if (isUnsigned) return false;
1176  n=mDimensions[DIM];
1177  v=static_cast<const long int*>(mValue);
1178  return true;
1179  };
1182  inline tBoolean getValue(int& n,long int*& v) const {
1183  if (mValue==null) return false;
1184  n=mDimensions[DIM];
1185  const long int *vs=static_cast<const long int*>(mValue);
1186  if (n>0) {
1187  v=new long int[n];
1188  for (int i=0;i<n;i++) v[i]=vs[i];
1189  } else v=null;
1190  return true;
1191  };
1194  inline tBoolean getValue(int& n,const long long int*& v) const {
1195  if (mValue==null) return false;
1196  tBoolean isUnsigned=false;
1197  if (!isLongLongInt(isUnsigned)) return false;
1198  if (isUnsigned) return false;
1199  n=mDimensions[DIM];
1200  v=static_cast<const long long int*>(mValue);
1201  return true;
1202  };
1205  inline tBoolean getValue(int& n,long long int*& v) const {
1206  if (mValue==null) return false;
1207  n=mDimensions[DIM];
1208  const long long int *vs=static_cast<const long long int*>(mValue);
1209  if (n>0) {
1210  v=new long long int[n];
1211  for (int i=0;i<n;i++) v[i]=vs[i];
1212  } else v=null;
1213  return true;
1214  };
1217  inline tBoolean getValue(int& n,const unsigned long long int*& v) const {
1218  if (mValue==null) return false;
1219  tBoolean isUnsigned=false;
1220  if (!isLongLongInt(isUnsigned)) return false;
1221  if (!isUnsigned) return false;
1222  n=mDimensions[DIM];
1223  v=static_cast<const unsigned long long int*>(mValue);
1224  return true;
1225  };
1228  inline tBoolean getValue(int& n,unsigned long long int*& v) const {
1229  if (mValue==null) return false;
1230  n=mDimensions[DIM];
1231  const unsigned long long int *vs=static_cast<const unsigned long long int*>(mValue);
1232  if (n>0) {
1233  v=new unsigned long long int[n];
1234  for (int i=0;i<n;i++) v[i]=vs[i];
1235  } else v=null;
1236  return true;
1237  };
1240  inline tBoolean getValue(int& n,const float*& v) const {
1241  if (mValue==null) return false;
1242  if (!isFloat()) return false;
1243  n=mDimensions[DIM];
1244  v=static_cast<const float*>(mValue);
1245  return true;
1246  };
1249  inline tBoolean getValue(int& n,float*& v) const {
1250  if (mValue==null) return false;
1251  n=mDimensions[DIM];
1252  const float *vs=static_cast<const float*>(mValue);
1253  if (n>0) {
1254  v=new float[n];
1255  for (int i=0;i<n;i++) v[i]=vs[i];
1256  } else v=null;
1257  return true;
1258  };
1259 
1262  inline tBoolean getValue(int& n,const double*& v) const {
1263  if (mValue==null) return false;
1264  if (!isDouble()) return false;
1265  n=mDimensions[DIM];
1266  v=static_cast<const double*>(mValue);
1267  return true;
1268  };
1271  inline tBoolean getValue(int& n,double*& v) const {
1272  if (mValue==null) return false;
1273  n=mDimensions[DIM];
1274  const double *vs=static_cast<const double*>(mValue);
1275  if (n>0) {
1276  v=new double[n];
1277  for (int i=0;i<n;i++) v[i]=vs[i];
1278  } else v=null;
1279  return true;
1280  };
1283  inline tBoolean getValue(int& n,const long double*& v) const {
1284  if (mValue==null) return false;
1285  if (!isLongDouble()) return false;
1286  n=mDimensions[DIM];
1287  v=static_cast<const long double*>(mValue);
1288  return true;
1289  };
1292  inline tBoolean getValue(int& n,long double*& v) const {
1293  if (mValue==null) return false;
1294  n=mDimensions[DIM];
1295  const long double *vs=static_cast<const long double*>(mValue);
1296  if (n>0) {
1297  v=new long double[n];
1298  for (int i=0;i<n;i++) v[i]=vs[i];
1299  } else v=null;
1300  return true;
1301  };
1302 
1303 
1304 
1305 
1306  // -----------------------------------------------
1307  // Get Value methods for matrix primitive type
1308  // -----------------------------------------------
1314  inline int getDimension(const tFlag& d) const {
1315  return mDimensions[d];
1316  }
1319  inline tBoolean getValue(int& nRows,int& nCols,int& n,const double*& v) const {
1320  if (mValue==null) return false;
1321  if (mDimensions.size()!=3) return false;
1322  if (!isDouble()) return false;
1323  n=mDimensions[DIM];
1324  nRows=mDimensions[ROW];
1325  nCols=mDimensions[COL];
1326  if (!isDouble()) return false;
1327  v=static_cast<const double*>(mValue);
1328  return true;
1329  }
1330  inline tBoolean getValue(int& nRows,int& nCols,int& n,double*& v) const {
1331  if (mValue==null) return false;
1332  if (mDimensions.size()!=3) return false;
1333  if (!isDouble()) return false;
1334  n=mDimensions[DIM];
1335  nRows=mDimensions[ROW];
1336  nCols=mDimensions[COL];
1337  const double *vs=static_cast<const double*>(mValue);
1338  if (n>0) {
1339  v=new double[n];
1340  for (int i=0;i<n;i++) v[i]=vs[i];
1341  } else v=null;
1342  return true;
1343  };
1344 
1347  virtual tString toString() const {
1348  return getValueToString(",","(",")");
1349  }
1350 
1351 
1352 
1353 private:
1356  template<class T>
1357  void readValue(CORE_String& tokenizer) {
1358  T *vs;
1359  tString token;
1360  if (isMultipleCardinality()) { // multiple cardinality
1361  // set the cardinality
1362  mDimensions[DIM]=tokenizer.getTokensNumber();
1363  if (mDimensions[DIM]==1) {
1364  // case of 1 cardinality
1365  token=tokenizer.nextToken();
1366  // erase space characters at headline & endline
1367  CORE_String::trim(token);
1368  if (token.compare("null")==0) {
1369  vs=null;
1370  } else {
1371  // 1 cardinality
1372  vs=new T[1];
1373  // replace " by empty string
1374  CORE_String::replaceAll(token,"\"","");
1375  CORE_String::parse(token,vs[0]);
1376  }
1377  } else {
1378  // cae cardinality *
1379  if (mDimensions[DIM]>0) {
1380  vs=new T[mDimensions[DIM]];
1381  for (int i=0;i<mDimensions[DIM];i++) {
1382  token=tokenizer.nextToken();
1383  // erase space characters at headline & endline
1384  CORE_String::trim(token);
1385  // replace " by empty string
1386  CORE_String::replaceAll(token,"\"","");
1387  CORE_String::parse(token,vs[i]);
1388  }
1389  } else {
1390  vs=null;
1391  }
1392  }
1393  } else { // single cardinality
1394  // set the cardinality
1395  mDimensions[DIM]=1;
1396 
1397  // get the value in the string form
1398  token=tokenizer.nextToken();
1399  // erase space characters at headline & endline
1400  CORE_String::trim(token);
1401  // replace " by empty string
1402  CORE_String::replaceAll(token,"\"","");
1403  // parse it to type T
1404  T v;
1405  CORE_String::parse(token,v);
1406  // set the value
1407  vs=new T(v);
1408  }
1409  mValue=vs;
1410  }
1411 
1412 };
1413 
1414 #endif
this class describes a string
Definition: CORE_String.h:59
tBoolean isMultipleCardinality() const
verify if single cardinality
Definition: MM_Attribute.h:118
tBoolean isChar(tBoolean &isUnsigned) const
verify if the field is an short
Definition: MM_Attribute.h:192
tBoolean getValue(int &n, const unsigned int *&v) const
get the value vector of unsigned int by reference
Definition: MM_Attribute.h:1101
tBoolean isDouble() const
verify if the field is a double
Definition: MM_Attribute.h:156
void replaceAll(const tString &strToReplace, const tString &str)
replace all instances of strToReplace by str
Definition: CORE_String.h:215
void setValue(const long double &v)
set the value
Definition: MM_Attribute.h:374
This class is a primary field.
Definition: MM_Attribute.h:15
tBoolean isString() const
verify if the field is a string
Definition: MM_Attribute.h:204
void setValue(const int &nRows, const int &nCols, const vector< double > &v)
set the value of a matrix
Definition: MM_Attribute.h:773
tBoolean getValue(int &n, short *&v) const
get the value vector of short by coppiing
Definition: MM_Attribute.h:1089
void setValue(const unsigned char &v)
set the value
Definition: MM_Attribute.h:324
tBoolean getValue(int &n, const char *&v) const
get the value vector of int by reference
Definition: MM_Attribute.h:1033
tBoolean getValue(int &n, int *&v) const
get the value vector of int by coppiing the array must be destroyed
Definition: MM_Attribute.h:1136
tBoolean getValue(int &nRows, int &nCols, int &n, double *&v) const
Definition: MM_Attribute.h:1330
void setValue(const int &n, unsigned char *v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:597
static const tFlag DIM
Definition: MM_Attribute.h:21
void setValue(const int &n, long long int *v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:657
tBoolean isVector() const
isVector
Definition: MM_Attribute.h:140
void setIsSingleCardinality()
set simple cardinality
Definition: MM_Attribute.h:124
void setValue(const unsigned long long int &v)
set the value
Definition: MM_Attribute.h:314
tBoolean getValue(double &v) const
get the value
Definition: MM_Attribute.h:936
tBoolean getValue(unsigned char &v) const
get the value
Definition: MM_Attribute.h:899
tBoolean getValue(int &n, unsigned char *&v) const
get the value vector of int by coppiing
Definition: MM_Attribute.h:1021
void setValue(const vector< int > &value)
set the value
Definition: MM_Attribute.h:434
tBoolean getValue(int &n, const int *&v) const
get the value vector of int by reference
Definition: MM_Attribute.h:1124
tBoolean getValue(int &n, const double *&v) const
get the value vector of double by reference
Definition: MM_Attribute.h:1262
void setValue(const int &nRows, const int &nCols, const int &nValues, double *v, const tBoolean &isCopied)
Definition: MM_Attribute.h:737
tBoolean getValue(int &n, double *&v) const
get the value vector of double by coppiing
Definition: MM_Attribute.h:1271
tBoolean getValue(tBoolean &v) const
get the value
Definition: MM_Attribute.h:846
tBoolean getValue(int &n, bool *&v) const
get the value vector of boolean by coppiing
Definition: MM_Attribute.h:985
tBoolean getValue(int &n, unsigned long int *&v) const
get the value vector of long int by copping
Definition: MM_Attribute.h:1159
tBoolean isMatrix() const
isVector
Definition: MM_Attribute.h:145
tBoolean isLongDouble() const
verify if the field is a long double
Definition: MM_Attribute.h:151
void setValue(const tString &v)
set the value
Definition: MM_Attribute.h:238
void trim()
trim
Definition: CORE_String.h:605
#define tBoolean
Definition: types.h:48
double * createDoubleValue(const int &nValues)
set the value of a matrix
Definition: MM_Attribute.h:805
void setValue(const int &n, const unsigned char *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:568
void setValue(const long int &v)
set the value
Definition: MM_Attribute.h:294
tBoolean getValue(int &n, const unsigned long int *&v) const
get the value vector of unisgned long int by reference
Definition: MM_Attribute.h:1148
tBoolean getValue(int &n, const tString *&v) const
get the value string array by reference
Definition: MM_Attribute.h:967
static const tFlag COL
Definition: MM_Attribute.h:23
#define null
Definition: types.h:13
void setIsMultipleCardinality()
set simple cardinality
Definition: MM_Attribute.h:129
void setValue(const int &n, const tString *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:480
DEFINE_SVPTR(MM_Attribute)
void setValue(const int &nRows, const int &nCols, const int &nValues, const double *&v, const tBoolean &isCopied)
set the value of a matrix
Definition: MM_Attribute.h:742
void setValue(const char *v)
set the value
Definition: MM_Attribute.h:258
tBoolean getValue(int &nRows, int &nCols, int &n, const double *&v) const
get the value matrix double by reference
Definition: MM_Attribute.h:1319
void setValue(const int &v)
set the value
Definition: MM_Attribute.h:284
static void parse(const tString &str, unsigned char &c)
parse unsigned char c in str
Definition: CORE_String.h:418
void setValue(const vector< bool > &value)
set the value
Definition: MM_Attribute.h:403
tString nextToken()
return the next token
Definition: CORE_String.h:203
void setValue(const vector< tString > &value)
set the value
Definition: MM_Attribute.h:387
tBoolean getValue(unsigned int &v) const
get the value
Definition: MM_Attribute.h:913
tBoolean getValue(int &n, const unsigned char *&v) const
get the value vector of int by reference
Definition: MM_Attribute.h:1010
tBoolean getValue(int &n, const bool *&v) const
get the value vector of boolean by reference
Definition: MM_Attribute.h:976
tBoolean getValue(int &n, const long int *&v) const
get the value vector of long int by reference
Definition: MM_Attribute.h:1171
tBoolean isFloat() const
verify if the field is a double
Definition: MM_Attribute.h:161
tBoolean isSingleCardinality() const
verify if single cardinality
Definition: MM_Attribute.h:112
tBoolean getValue(int &n, long int *&v) const
get the value vector of long int by copping
Definition: MM_Attribute.h:1182
tBoolean getValue(int &n, long long int *&v) const
get the value vector of long int by copping
Definition: MM_Attribute.h:1205
tBoolean getValue(int &v) const
get the value
Definition: MM_Attribute.h:871
tBoolean isInt(tBoolean &isUnsigned) const
verify if the field is an int
Definition: MM_Attribute.h:178
void setValue(const double &v)
set the value
Definition: MM_Attribute.h:364
void setValue(const unsigned int &v)
set the value
Definition: MM_Attribute.h:344
tBoolean getValue(long int &v) const
get the value
Definition: MM_Attribute.h:878
tBoolean getValue(int &n, const long long int *&v) const
get the value vector of long int by reference
Definition: MM_Attribute.h:1194
tString getCardinalityToString() const
get Cardinality
Definition: MM_Attribute.h:98
virtual ~MM_Attribute(void)
destroy an object.
Definition: MM_Attribute.cpp:38
tBoolean getValue(int &n, long double *&v) const
get the value vector of double by coppiing
Definition: MM_Attribute.h:1292
tBoolean getValue(char &v) const
get the value
Definition: MM_Attribute.h:857
void setValue(const int &n, const int *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:663
void setValue(const char &v)
set the value
Definition: MM_Attribute.h:263
void setValue(const int &n, const bool *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:509
tBoolean getValue(int &n, float *&v) const
get the value vector of float by coppiing
Definition: MM_Attribute.h:1249
tString getValueToString(const tString &separator, const tString &start, const tString &end) const
get the value in string
Definition: MM_Attribute.cpp:270
void setCardinality(const tString &card)
get Cardinality
Definition: MM_Attribute.h:105
tBoolean getValue(int &n, const long double *&v) const
get the value vector of long double by reference
Definition: MM_Attribute.h:1283
tBoolean isBoolean() const
verify if the field is an short
Definition: MM_Attribute.h:198
tBoolean isShortInt(tBoolean &isUnsigned) const
verify if the field is an int
Definition: MM_Attribute.h:184
tBoolean getValue(short &v) const
get the value
Definition: MM_Attribute.h:864
void setValue(const unsigned long int &v)
set the value
Definition: MM_Attribute.h:354
tBoolean getValue(int &n, const unsigned long long int *&v) const
get the value vector of long int by reference
Definition: MM_Attribute.h:1217
tBoolean getValue(int &n, const unsigned short *&v) const
get the value vector of unsigned short by reference
Definition: MM_Attribute.h:1055
tBoolean getValue(int &n, char *&v) const
get the value vector of int by coppiing
Definition: MM_Attribute.h:1044
static SP::MM_Attribute New()
creta a matlab class
Definition: MM_Attribute.h:84
void setValue(const tString &type, const tString &card, const tString &value, const tString &separator, const tString &start, const tString &end)
set generic value
Definition: MM_Attribute.cpp:187
This class is a data.
Definition: MM_Data.h:17
virtual tString toString() const
turn the class into string
Definition: MM_Attribute.h:1347
tBoolean getValue(int &n, unsigned int *&v) const
get the value vector of unsigned int by coppiing
Definition: MM_Attribute.h:1112
void setValue(const int &n, long int *v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:627
tBoolean getValue(unsigned long int &v) const
get the value size_t = unsigned long int
Definition: MM_Attribute.h:922
MM_Attribute(void)
create an object
Definition: MM_Attribute.cpp:28
void setValue(const vector< unsigned char > &value)
set the value
Definition: MM_Attribute.h:419
#define tString
Definition: types.h:49
tBoolean getValue(int &n, const short *&v) const
get the value vector of short by reference
Definition: MM_Attribute.h:1078
tBoolean getValue(long double &v) const
get the value
Definition: MM_Attribute.h:943
tBoolean isLongLongInt(tBoolean &isUnsigned) const
verify if the field is a long long int
Definition: MM_Attribute.h:172
tBoolean getValue(int &n, const float *&v) const
get the value vector of float by reference
Definition: MM_Attribute.h:1240
tBoolean getValue(vector< tString > &v) const
get the value string array
Definition: MM_Attribute.h:955
tBoolean isLongInt(tBoolean &isUnsigned) const
verify if the field is a long int
Definition: MM_Attribute.h:166
void setValue(const int &n, const long int *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:602
void setValue(const vector< double > &value)
set the value
Definition: MM_Attribute.h:449
void setValue(const int &n, const long double *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:712
double * createValue(const int &nRows, const int &nCols, const int &nValues)
set the value of a matrix
Definition: MM_Attribute.h:791
tBoolean getValue(int &n, tString *&v) const
get the value string array by copiing
Definition: MM_Attribute.h:998
void setValue(const tBoolean &v)
set the value
Definition: MM_Attribute.h:248
static const tFlag ROW
Definition: MM_Attribute.h:22
void setValue(const int &n, const double *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:688
int getDimension(const tFlag &d) const
get the dimension of row , col or size @ see DIM
Definition: MM_Attribute.h:1314
virtual tString getFieldType() const
get type
Definition: MM_Attribute.h:218
void setValue(const unsigned short &v)
set the value
Definition: MM_Attribute.h:334
tBoolean getValue(float &v) const
get the value
Definition: MM_Attribute.h:929
tBoolean getValue(unsigned long long int &v) const
get the value
Definition: MM_Attribute.h:892
void setValue(const int &n, const long long int *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:632
void setValue(const short &v)
set the value
Definition: MM_Attribute.h:273
tBoolean getValue(int &n, unsigned long long int *&v) const
get the value vector of long int by copping
Definition: MM_Attribute.h:1228
void setValue(const int &n, const unsigned int *&v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:536
tBoolean getValue(tString &v) const
get the value
Definition: MM_Attribute.h:836
DEFINE_SPTR(MM_Attribute)
void setValue(const vector< long double > &value)
set the value
Definition: MM_Attribute.h:464
void setValue(const long long int &v)
set the value
Definition: MM_Attribute.h:304
tBoolean getValue(unsigned short &v) const
get the value
Definition: MM_Attribute.h:906
int getTokensNumber() const
get the number of tokens
Definition: CORE_String.h:187
tBoolean getValue(int &n, unsigned short *&v) const
get the value vector of short by coppiing
Definition: MM_Attribute.h:1066
int * createIntValue(const int &nValues)
set the value of a matrix
Definition: MM_Attribute.h:816
void setValue(const int &n, unsigned int *v, const tBoolean &isCopied)
set the value
Definition: MM_Attribute.h:563
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14
tBoolean getValue(long long int &v) const
get the value
Definition: MM_Attribute.h:885