NCBI C++ ToolKit
MultiScriptExpression_.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id$
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * File Description:
27  * This code was generated by application DATATOOL
28  * using the following specifications:
29  * 'pubmed_mathml3.xsd'.
30  *
31  * ATTENTION:
32  * Don't edit or commit this file into CVS as this file will
33  * be overridden (by DATATOOL) without warning!
34  * ===========================================================================
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 #include <serial/serialimpl.hpp>
40 
41 // generated includes
213 
214 BEGIN_objects_SCOPE // namespace ncbi::objects::
215 
216 
217 // generated classes
218 
220 {
221  if ( m_choice != e_not_set )
222  ResetSelection();
223 }
224 
226 {
227  switch ( m_choice ) {
228  case e_Reln:
229  case e_Fn:
230  case e_Declare:
231  m_object->RemoveReference();
232  break;
233  default:
234  break;
235  }
237 }
238 
240 {
241  switch ( index ) {
242  case e_Reln:
243  (m_object = new(pool) ncbi::objects::CReln())->AddReference();
244  break;
245  case e_Fn:
246  (m_object = new(pool) ncbi::objects::CFn())->AddReference();
247  break;
248  case e_Declare:
249  (m_object = new(pool) ncbi::objects::CDeclare())->AddReference();
250  break;
251  default:
252  break;
253  }
254  m_choice = index;
255 }
256 
258  "not set",
259  "reln",
260  "fn",
261  "declare"
262 };
263 
265 {
266  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
267 }
268 
270 {
271  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
272 }
273 
275 {
276  CheckSelected(e_Reln);
277  return *static_cast<const TReln*>(m_object);
278 }
279 
281 {
283  return *static_cast<TReln*>(m_object);
284 }
285 
287 {
288  TReln* ptr = &value;
289  if ( m_choice != e_Reln || m_object != ptr ) {
290  ResetSelection();
291  (m_object = ptr)->AddReference();
292  m_choice = e_Reln;
293  }
294 }
295 
297 {
298  CheckSelected(e_Fn);
299  return *static_cast<const TFn*>(m_object);
300 }
301 
303 {
305  return *static_cast<TFn*>(m_object);
306 }
307 
309 {
310  TFn* ptr = &value;
311  if ( m_choice != e_Fn || m_object != ptr ) {
312  ResetSelection();
313  (m_object = ptr)->AddReference();
314  m_choice = e_Fn;
315  }
316 }
317 
319 {
320  CheckSelected(e_Declare);
321  return *static_cast<const TDeclare*>(m_object);
322 }
323 
325 {
327  return *static_cast<TDeclare*>(m_object);
328 }
329 
331 {
332  TDeclare* ptr = &value;
333  if ( m_choice != e_Declare || m_object != ptr ) {
334  ResetSelection();
335  (m_object = ptr)->AddReference();
336  m_choice = e_Declare;
337  }
338 }
339 
340 // helper methods
341 
342 // type info
344 {
345  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp", "DeprecatedContExp");
346  SET_CHOICE_MODULE("pubmed_mathml3");
347  ADD_NAMED_REF_CHOICE_VARIANT("reln", m_object, CReln)->SetNsQualified(true);
348  ADD_NAMED_REF_CHOICE_VARIANT("fn", m_object, CFn)->SetNsQualified(true);
349  ADD_NAMED_REF_CHOICE_VARIANT("declare", m_object, CDeclare)->SetNsQualified(true);
350  info->CodeVersion(22400);
351  info->DataSpec(ncbi::EDataSpec::eXSD);
352 }
354 
355 // constructor
358 {
359 }
360 
361 // destructor
363 {
364  Reset();
365 }
366 
367 
369 {
370  if ( !m_Interval ) {
371  m_Interval.Reset(new TInterval());
372  return;
373  }
374  (*m_Interval).Reset();
375 }
376 
378 {
379  m_Interval.Reset(&value);
380 }
381 
383 {
384  ResetInterval();
385 }
386 
388 {
389  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.interval", "mmlclass");
390  SET_CLASS_MODULE("pubmed_mathml3");
391  ADD_NAMED_REF_MEMBER("interval", m_Interval, CInterval)->SetNsQualified(true);
392  info->RandomOrder();
393  info->CodeVersion(22400);
394  info->DataSpec(ncbi::EDataSpec::eXSD);
395 }
397 
398 // constructor
400 {
401  memset(m_set_State,0,sizeof(m_set_State));
402  if ( !IsAllocatedInPool() ) {
403  ResetInterval();
404  }
405 }
406 
407 // destructor
409 {
410 }
411 
412 
414 {
415  if ( m_choice != e_not_set )
416  ResetSelection();
417 }
418 
420 {
421  switch ( m_choice ) {
422  case e_Inverse:
423  case e_Ident:
424  case e_Domain:
425  case e_Codomain:
426  case e_Image:
427  case e_Ln:
428  case e_Log:
429  case e_Moment:
430  m_object->RemoveReference();
431  break;
432  default:
433  break;
434  }
436 }
437 
439 {
440  switch ( index ) {
441  case e_Inverse:
442  (m_object = new(pool) ncbi::objects::CInverse())->AddReference();
443  break;
444  case e_Ident:
445  (m_object = new(pool) ncbi::objects::CIdent())->AddReference();
446  break;
447  case e_Domain:
448  (m_object = new(pool) ncbi::objects::CDomain())->AddReference();
449  break;
450  case e_Codomain:
451  (m_object = new(pool) ncbi::objects::CCodomain())->AddReference();
452  break;
453  case e_Image:
454  (m_object = new(pool) ncbi::objects::CImage())->AddReference();
455  break;
456  case e_Ln:
457  (m_object = new(pool) ncbi::objects::CLn())->AddReference();
458  break;
459  case e_Log:
460  (m_object = new(pool) ncbi::objects::CLog())->AddReference();
461  break;
462  case e_Moment:
463  (m_object = new(pool) ncbi::objects::CMoment())->AddReference();
464  break;
465  default:
466  break;
467  }
468  m_choice = index;
469 }
470 
472  "not set",
473  "inverse",
474  "ident",
475  "domain",
476  "codomain",
477  "image",
478  "ln",
479  "log",
480  "moment"
481 };
482 
484 {
485  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
486 }
487 
489 {
490  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
491 }
492 
494 {
495  CheckSelected(e_Inverse);
496  return *static_cast<const TInverse*>(m_object);
497 }
498 
500 {
503  value.SetInverse();
504  return value;
505 }
506 
508 {
509  CheckSelected(e_Ident);
510  return *static_cast<const TIdent*>(m_object);
511 }
512 
514 {
517  value.SetIdent();
518  return value;
519 }
520 
522 {
523  CheckSelected(e_Domain);
524  return *static_cast<const TDomain*>(m_object);
525 }
526 
528 {
531  value.SetDomain();
532  return value;
533 }
534 
536 {
537  CheckSelected(e_Codomain);
538  return *static_cast<const TCodomain*>(m_object);
539 }
540 
542 {
545  value.SetCodomain();
546  return value;
547 }
548 
550 {
551  CheckSelected(e_Image);
552  return *static_cast<const TImage*>(m_object);
553 }
554 
556 {
559  value.SetImage();
560  return value;
561 }
562 
564 {
565  CheckSelected(e_Ln);
566  return *static_cast<const TLn*>(m_object);
567 }
568 
570 {
573  value.SetLn();
574  return value;
575 }
576 
578 {
579  CheckSelected(e_Log);
580  return *static_cast<const TLog*>(m_object);
581 }
582 
584 {
587  value.SetLog();
588  return value;
589 }
590 
592 {
593  CheckSelected(e_Moment);
594  return *static_cast<const TMoment*>(m_object);
595 }
596 
598 {
601  value.SetMoment();
602  return value;
603 }
604 
605 // helper methods
606 
607 // type info
609 {
610  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.unary-functional", "mmlclass");
611  SET_CHOICE_MODULE("pubmed_mathml3");
612  ADD_NAMED_REF_CHOICE_VARIANT("inverse", m_object, CInverse)->SetNsQualified(true);
613  ADD_NAMED_REF_CHOICE_VARIANT("ident", m_object, CIdent)->SetNsQualified(true);
614  ADD_NAMED_REF_CHOICE_VARIANT("domain", m_object, CDomain)->SetNsQualified(true);
615  ADD_NAMED_REF_CHOICE_VARIANT("codomain", m_object, CCodomain)->SetNsQualified(true);
616  ADD_NAMED_REF_CHOICE_VARIANT("image", m_object, CImage)->SetNsQualified(true);
617  ADD_NAMED_REF_CHOICE_VARIANT("ln", m_object, CLn)->SetNsQualified(true);
618  ADD_NAMED_REF_CHOICE_VARIANT("log", m_object, CLog)->SetNsQualified(true);
619  ADD_NAMED_REF_CHOICE_VARIANT("moment", m_object, CMoment)->SetNsQualified(true);
620  info->CodeVersion(22400);
621  info->DataSpec(ncbi::EDataSpec::eXSD);
622 }
624 
625 // constructor
628 {
629 }
630 
631 // destructor
633 {
634  Reset();
635 }
636 
637 
639 {
640  if ( !m_Lambda ) {
641  m_Lambda.Reset(new TLambda());
642  return;
643  }
644  (*m_Lambda).Reset();
645 }
646 
648 {
649  m_Lambda.Reset(&value);
650 }
651 
653 {
654  ResetLambda();
655 }
656 
658 {
659  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.lambda", "mmlclass");
660  SET_CLASS_MODULE("pubmed_mathml3");
661  ADD_NAMED_REF_MEMBER("lambda", m_Lambda, CLambda)->SetNsQualified(true);
662  info->RandomOrder();
663  info->CodeVersion(22400);
664  info->DataSpec(ncbi::EDataSpec::eXSD);
665 }
667 
668 // constructor
670 {
671  memset(m_set_State,0,sizeof(m_set_State));
672  if ( !IsAllocatedInPool() ) {
673  ResetLambda();
674  }
675 }
676 
677 // destructor
679 {
680 }
681 
682 
684 {
685  return m_Compose ? m_Compose->IsSetCompose() : false;
686 }
687 
689 {
690  if ( !m_Compose ) {
691  m_Compose.Reset(new TCompose());
692  return;
693  }
694  (*m_Compose).Reset();
695 }
696 
698 {
699  m_Compose.Reset(&value);
700 }
701 
703 {
704  if ( !m_Compose ) {
705  ResetCompose();
706  }
707  m_Compose->SetCompose();
708  return (*m_Compose);
709 }
710 
712 {
713  ResetCompose();
714 }
715 
717 {
718  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-functional", "mmlclass");
719  SET_CLASS_MODULE("pubmed_mathml3");
720  ADD_NAMED_REF_MEMBER("compose", m_Compose, CCompose)->SetNsQualified(true);
721  info->RandomOrder();
722  info->CodeVersion(22400);
723  info->DataSpec(ncbi::EDataSpec::eXSD);
724 }
726 
727 // constructor
729 {
730  memset(m_set_State,0,sizeof(m_set_State));
731  if ( !IsAllocatedInPool() ) {
732  ResetCompose();
733  }
734 }
735 
736 // destructor
738 {
739 }
740 
741 
743 {
744  if ( m_choice != e_not_set )
745  ResetSelection();
746 }
747 
749 {
750  switch ( m_choice ) {
751  case e_Quotient:
752  case e_Divide:
753  case e_Minus:
754  case e_Power:
755  case e_Rem:
756  case e_Root:
757  m_object->RemoveReference();
758  break;
759  default:
760  break;
761  }
763 }
764 
766 {
767  switch ( index ) {
768  case e_Quotient:
769  (m_object = new(pool) ncbi::objects::CQuotient())->AddReference();
770  break;
771  case e_Divide:
772  (m_object = new(pool) ncbi::objects::CDivide())->AddReference();
773  break;
774  case e_Minus:
775  (m_object = new(pool) ncbi::objects::CMinus())->AddReference();
776  break;
777  case e_Power:
778  (m_object = new(pool) ncbi::objects::CPower())->AddReference();
779  break;
780  case e_Rem:
781  (m_object = new(pool) ncbi::objects::CRem())->AddReference();
782  break;
783  case e_Root:
784  (m_object = new(pool) ncbi::objects::CRoot())->AddReference();
785  break;
786  default:
787  break;
788  }
789  m_choice = index;
790 }
791 
793  "not set",
794  "quotient",
795  "divide",
796  "minus",
797  "power",
798  "rem",
799  "root"
800 };
801 
803 {
804  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
805 }
806 
808 {
809  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
810 }
811 
813 {
814  CheckSelected(e_Quotient);
815  return *static_cast<const TQuotient*>(m_object);
816 }
817 
819 {
822  value.SetQuotient();
823  return value;
824 }
825 
827 {
828  CheckSelected(e_Divide);
829  return *static_cast<const TDivide*>(m_object);
830 }
831 
833 {
836  value.SetDivide();
837  return value;
838 }
839 
841 {
842  CheckSelected(e_Minus);
843  return *static_cast<const TMinus*>(m_object);
844 }
845 
847 {
850  value.SetMinus();
851  return value;
852 }
853 
855 {
856  CheckSelected(e_Power);
857  return *static_cast<const TPower*>(m_object);
858 }
859 
861 {
864  value.SetPower();
865  return value;
866 }
867 
869 {
870  CheckSelected(e_Rem);
871  return *static_cast<const TRem*>(m_object);
872 }
873 
875 {
878  value.SetRem();
879  return value;
880 }
881 
883 {
884  CheckSelected(e_Root);
885  return *static_cast<const TRoot*>(m_object);
886 }
887 
889 {
892  value.SetRoot();
893  return value;
894 }
895 
896 // helper methods
897 
898 // type info
900 {
901  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.binary-arith", "mmlclass");
902  SET_CHOICE_MODULE("pubmed_mathml3");
903  ADD_NAMED_REF_CHOICE_VARIANT("quotient", m_object, CQuotient)->SetNsQualified(true);
904  ADD_NAMED_REF_CHOICE_VARIANT("divide", m_object, CDivide)->SetNsQualified(true);
905  ADD_NAMED_REF_CHOICE_VARIANT("minus", m_object, CMinus)->SetNsQualified(true);
906  ADD_NAMED_REF_CHOICE_VARIANT("power", m_object, CPower)->SetNsQualified(true);
907  ADD_NAMED_REF_CHOICE_VARIANT("rem", m_object, CRem)->SetNsQualified(true);
908  ADD_NAMED_REF_CHOICE_VARIANT("root", m_object, CRoot)->SetNsQualified(true);
909  info->CodeVersion(22400);
910  info->DataSpec(ncbi::EDataSpec::eXSD);
911 }
913 
914 // constructor
917 {
918 }
919 
920 // destructor
922 {
923  Reset();
924 }
925 
926 
928 {
929  if ( m_choice != e_not_set )
930  ResetSelection();
931 }
932 
934 {
935  switch ( m_choice ) {
936  case e_Factorial:
937  case e_Abs:
938  case e_Conjugate:
939  case e_Arg:
940  case e_Real:
941  case e_Imaginary:
942  case e_Floor:
943  case e_Ceiling:
944  case e_Exp:
945  m_object->RemoveReference();
946  break;
947  default:
948  break;
949  }
951 }
952 
954 {
955  switch ( index ) {
956  case e_Factorial:
957  (m_object = new(pool) ncbi::objects::CFactorial())->AddReference();
958  break;
959  case e_Abs:
960  (m_object = new(pool) ncbi::objects::CAbs())->AddReference();
961  break;
962  case e_Conjugate:
963  (m_object = new(pool) ncbi::objects::CConjugate())->AddReference();
964  break;
965  case e_Arg:
966  (m_object = new(pool) ncbi::objects::CArg())->AddReference();
967  break;
968  case e_Real:
969  (m_object = new(pool) ncbi::objects::CReal())->AddReference();
970  break;
971  case e_Imaginary:
972  (m_object = new(pool) ncbi::objects::CImaginary())->AddReference();
973  break;
974  case e_Floor:
975  (m_object = new(pool) ncbi::objects::CFloor())->AddReference();
976  break;
977  case e_Ceiling:
978  (m_object = new(pool) ncbi::objects::CCeiling())->AddReference();
979  break;
980  case e_Exp:
981  (m_object = new(pool) ncbi::objects::CExp())->AddReference();
982  break;
983  default:
984  break;
985  }
986  m_choice = index;
987 }
988 
990  "not set",
991  "factorial",
992  "abs",
993  "conjugate",
994  "arg",
995  "real",
996  "imaginary",
997  "floor",
998  "ceiling",
999  "exp"
1000 };
1001 
1003 {
1004  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1005 }
1006 
1008 {
1009  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1010 }
1011 
1013 {
1014  CheckSelected(e_Factorial);
1015  return *static_cast<const TFactorial*>(m_object);
1016 }
1017 
1019 {
1022  value.SetFactorial();
1023  return value;
1024 }
1025 
1027 {
1028  CheckSelected(e_Abs);
1029  return *static_cast<const TAbs*>(m_object);
1030 }
1031 
1033 {
1036  value.SetAbs();
1037  return value;
1038 }
1039 
1041 {
1042  CheckSelected(e_Conjugate);
1043  return *static_cast<const TConjugate*>(m_object);
1044 }
1045 
1047 {
1050  value.SetConjugate();
1051  return value;
1052 }
1053 
1055 {
1056  CheckSelected(e_Arg);
1057  return *static_cast<const TArg*>(m_object);
1058 }
1059 
1061 {
1064  value.SetArg();
1065  return value;
1066 }
1067 
1069 {
1070  CheckSelected(e_Real);
1071  return *static_cast<const TReal*>(m_object);
1072 }
1073 
1075 {
1078  value.SetReal();
1079  return value;
1080 }
1081 
1083 {
1084  CheckSelected(e_Imaginary);
1085  return *static_cast<const TImaginary*>(m_object);
1086 }
1087 
1089 {
1092  value.SetImaginary();
1093  return value;
1094 }
1095 
1097 {
1098  CheckSelected(e_Floor);
1099  return *static_cast<const TFloor*>(m_object);
1100 }
1101 
1103 {
1106  value.SetFloor();
1107  return value;
1108 }
1109 
1111 {
1112  CheckSelected(e_Ceiling);
1113  return *static_cast<const TCeiling*>(m_object);
1114 }
1115 
1117 {
1120  value.SetCeiling();
1121  return value;
1122 }
1123 
1125 {
1126  CheckSelected(e_Exp);
1127  return *static_cast<const TExp*>(m_object);
1128 }
1129 
1131 {
1134  value.SetExp();
1135  return value;
1136 }
1137 
1138 // helper methods
1139 
1140 // type info
1142 {
1143  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.unary-arith", "mmlclass");
1144  SET_CHOICE_MODULE("pubmed_mathml3");
1145  ADD_NAMED_REF_CHOICE_VARIANT("factorial", m_object, CFactorial)->SetNsQualified(true);
1146  ADD_NAMED_REF_CHOICE_VARIANT("abs", m_object, CAbs)->SetNsQualified(true);
1147  ADD_NAMED_REF_CHOICE_VARIANT("conjugate", m_object, CConjugate)->SetNsQualified(true);
1148  ADD_NAMED_REF_CHOICE_VARIANT("arg", m_object, CArg)->SetNsQualified(true);
1149  ADD_NAMED_REF_CHOICE_VARIANT("real", m_object, CReal)->SetNsQualified(true);
1150  ADD_NAMED_REF_CHOICE_VARIANT("imaginary", m_object, CImaginary)->SetNsQualified(true);
1151  ADD_NAMED_REF_CHOICE_VARIANT("floor", m_object, CFloor)->SetNsQualified(true);
1152  ADD_NAMED_REF_CHOICE_VARIANT("ceiling", m_object, CCeiling)->SetNsQualified(true);
1153  ADD_NAMED_REF_CHOICE_VARIANT("exp", m_object, CExp)->SetNsQualified(true);
1154  info->CodeVersion(22400);
1155  info->DataSpec(ncbi::EDataSpec::eXSD);
1156 }
1158 
1159 // constructor
1161  : m_choice(e_not_set)
1162 {
1163 }
1164 
1165 // destructor
1167 {
1168  Reset();
1169 }
1170 
1171 
1173 {
1174  if ( m_choice != e_not_set )
1175  ResetSelection();
1176 }
1177 
1179 {
1180  switch ( m_choice ) {
1181  case e_Max:
1182  case e_Min:
1183  m_object->RemoveReference();
1184  break;
1185  default:
1186  break;
1187  }
1188  m_choice = e_not_set;
1189 }
1190 
1192 {
1193  switch ( index ) {
1194  case e_Max:
1195  (m_object = new(pool) ncbi::objects::CMax())->AddReference();
1196  break;
1197  case e_Min:
1198  (m_object = new(pool) ncbi::objects::CMin())->AddReference();
1199  break;
1200  default:
1201  break;
1202  }
1203  m_choice = index;
1204 }
1205 
1207  "not set",
1208  "max",
1209  "min"
1210 };
1211 
1213 {
1214  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1215 }
1216 
1218 {
1219  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1220 }
1221 
1223 {
1225  return *static_cast<const TMax*>(m_object);
1226 }
1227 
1229 {
1232  value.SetMax();
1233  return value;
1234 }
1235 
1237 {
1238  CheckSelected(e_Min);
1239  return *static_cast<const TMin*>(m_object);
1240 }
1241 
1243 {
1246  value.SetMin();
1247  return value;
1248 }
1249 
1250 // helper methods
1251 
1252 // type info
1254 {
1255  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-minmax", "mmlclass");
1256  SET_CHOICE_MODULE("pubmed_mathml3");
1257  ADD_NAMED_REF_CHOICE_VARIANT("max", m_object, CMax)->SetNsQualified(true);
1258  ADD_NAMED_REF_CHOICE_VARIANT("min", m_object, CMin)->SetNsQualified(true);
1259  info->CodeVersion(22400);
1260  info->DataSpec(ncbi::EDataSpec::eXSD);
1261 }
1263 
1264 // constructor
1266  : m_choice(e_not_set)
1267 {
1268 }
1269 
1270 // destructor
1272 {
1273  Reset();
1274 }
1275 
1276 
1278 {
1279  if ( m_choice != e_not_set )
1280  ResetSelection();
1281 }
1282 
1284 {
1285  switch ( m_choice ) {
1286  case e_Plus:
1287  case e_Times:
1288  case e_Gcd:
1289  case e_Lcm:
1290  m_object->RemoveReference();
1291  break;
1292  default:
1293  break;
1294  }
1295  m_choice = e_not_set;
1296 }
1297 
1299 {
1300  switch ( index ) {
1301  case e_Plus:
1302  (m_object = new(pool) ncbi::objects::CPlus())->AddReference();
1303  break;
1304  case e_Times:
1305  (m_object = new(pool) ncbi::objects::CTimes())->AddReference();
1306  break;
1307  case e_Gcd:
1308  (m_object = new(pool) ncbi::objects::CGcd())->AddReference();
1309  break;
1310  case e_Lcm:
1311  (m_object = new(pool) ncbi::objects::CLcm())->AddReference();
1312  break;
1313  default:
1314  break;
1315  }
1316  m_choice = index;
1317 }
1318 
1320  "not set",
1321  "plus",
1322  "times",
1323  "gcd",
1324  "lcm"
1325 };
1326 
1328 {
1329  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1330 }
1331 
1333 {
1334  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1335 }
1336 
1338 {
1339  CheckSelected(e_Plus);
1340  return *static_cast<const TPlus*>(m_object);
1341 }
1342 
1344 {
1347  value.SetPlus();
1348  return value;
1349 }
1350 
1352 {
1353  CheckSelected(e_Times);
1354  return *static_cast<const TTimes*>(m_object);
1355 }
1356 
1358 {
1361  value.SetTimes();
1362  return value;
1363 }
1364 
1366 {
1367  CheckSelected(e_Gcd);
1368  return *static_cast<const TGcd*>(m_object);
1369 }
1370 
1372 {
1375  value.SetGcd();
1376  return value;
1377 }
1378 
1380 {
1381  CheckSelected(e_Lcm);
1382  return *static_cast<const TLcm*>(m_object);
1383 }
1384 
1386 {
1389  value.SetLcm();
1390  return value;
1391 }
1392 
1393 // helper methods
1394 
1395 // type info
1397 {
1398  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-arith", "mmlclass");
1399  SET_CHOICE_MODULE("pubmed_mathml3");
1400  ADD_NAMED_REF_CHOICE_VARIANT("plus", m_object, CPlus)->SetNsQualified(true);
1401  ADD_NAMED_REF_CHOICE_VARIANT("times", m_object, CTimes)->SetNsQualified(true);
1402  ADD_NAMED_REF_CHOICE_VARIANT("gcd", m_object, CGcd)->SetNsQualified(true);
1403  ADD_NAMED_REF_CHOICE_VARIANT("lcm", m_object, CLcm)->SetNsQualified(true);
1404  info->CodeVersion(22400);
1405  info->DataSpec(ncbi::EDataSpec::eXSD);
1406 }
1408 
1409 // constructor
1411  : m_choice(e_not_set)
1412 {
1413 }
1414 
1415 // destructor
1417 {
1418  Reset();
1419 }
1420 
1421 
1423 {
1424  if ( m_choice != e_not_set )
1425  ResetSelection();
1426 }
1427 
1429 {
1430  switch ( m_choice ) {
1431  case e_And:
1432  case e_Or:
1433  case e_Xor:
1434  m_object->RemoveReference();
1435  break;
1436  default:
1437  break;
1438  }
1439  m_choice = e_not_set;
1440 }
1441 
1443 {
1444  switch ( index ) {
1445  case e_And:
1446  (m_object = new(pool) ncbi::objects::CAnd())->AddReference();
1447  break;
1448  case e_Or:
1449  (m_object = new(pool) ncbi::objects::COr())->AddReference();
1450  break;
1451  case e_Xor:
1452  (m_object = new(pool) ncbi::objects::CXor())->AddReference();
1453  break;
1454  default:
1455  break;
1456  }
1457  m_choice = index;
1458 }
1459 
1461  "not set",
1462  "and",
1463  "or",
1464  "xor"
1465 };
1466 
1468 {
1469  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1470 }
1471 
1473 {
1474  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1475 }
1476 
1478 {
1479  CheckSelected(e_And);
1480  return *static_cast<const TAnd*>(m_object);
1481 }
1482 
1484 {
1487  value.SetAnd();
1488  return value;
1489 }
1490 
1492 {
1493  CheckSelected(e_Or);
1494  return *static_cast<const TOr*>(m_object);
1495 }
1496 
1498 {
1501  value.SetOr();
1502  return value;
1503 }
1504 
1506 {
1507  CheckSelected(e_Xor);
1508  return *static_cast<const TXor*>(m_object);
1509 }
1510 
1512 {
1515  value.SetXor();
1516  return value;
1517 }
1518 
1519 // helper methods
1520 
1521 // type info
1523 {
1524  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-logical", "mmlclass");
1525  SET_CHOICE_MODULE("pubmed_mathml3");
1526  ADD_NAMED_REF_CHOICE_VARIANT("and", m_object, CAnd)->SetNsQualified(true);
1527  ADD_NAMED_REF_CHOICE_VARIANT("or", m_object, COr)->SetNsQualified(true);
1528  ADD_NAMED_REF_CHOICE_VARIANT("xor", m_object, CXor)->SetNsQualified(true);
1529  info->CodeVersion(22400);
1530  info->DataSpec(ncbi::EDataSpec::eXSD);
1531 }
1533 
1534 // constructor
1536  : m_choice(e_not_set)
1537 {
1538 }
1539 
1540 // destructor
1542 {
1543  Reset();
1544 }
1545 
1546 
1548 {
1549  return m_Not ? m_Not->IsSetNot() : false;
1550 }
1551 
1553 {
1554  if ( !m_Not ) {
1555  m_Not.Reset(new TNot());
1556  return;
1557  }
1558  (*m_Not).Reset();
1559 }
1560 
1562 {
1563  m_Not.Reset(&value);
1564 }
1565 
1567 {
1568  if ( !m_Not ) {
1569  ResetNot();
1570  }
1571  m_Not->SetNot();
1572  return (*m_Not);
1573 }
1574 
1576 {
1577  ResetNot();
1578 }
1579 
1581 {
1582  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.unary-logical", "mmlclass");
1583  SET_CLASS_MODULE("pubmed_mathml3");
1584  ADD_NAMED_REF_MEMBER("not", m_Not, CNot)->SetNsQualified(true);
1585  info->RandomOrder();
1586  info->CodeVersion(22400);
1587  info->DataSpec(ncbi::EDataSpec::eXSD);
1588 }
1590 
1591 // constructor
1593 {
1594  memset(m_set_State,0,sizeof(m_set_State));
1595  if ( !IsAllocatedInPool() ) {
1596  ResetNot();
1597  }
1598 }
1599 
1600 // destructor
1602 {
1603 }
1604 
1605 
1607 {
1608  if ( m_choice != e_not_set )
1609  ResetSelection();
1610 }
1611 
1613 {
1614  switch ( m_choice ) {
1615  case e_Implies:
1616  case e_Equivalent:
1617  m_object->RemoveReference();
1618  break;
1619  default:
1620  break;
1621  }
1622  m_choice = e_not_set;
1623 }
1624 
1626 {
1627  switch ( index ) {
1628  case e_Implies:
1629  (m_object = new(pool) ncbi::objects::CImplies())->AddReference();
1630  break;
1631  case e_Equivalent:
1632  (m_object = new(pool) ncbi::objects::CEquivalent())->AddReference();
1633  break;
1634  default:
1635  break;
1636  }
1637  m_choice = index;
1638 }
1639 
1641  "not set",
1642  "implies",
1643  "equivalent"
1644 };
1645 
1647 {
1648  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1649 }
1650 
1652 {
1653  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1654 }
1655 
1657 {
1658  CheckSelected(e_Implies);
1659  return *static_cast<const TImplies*>(m_object);
1660 }
1661 
1663 {
1666  value.SetImplies();
1667  return value;
1668 }
1669 
1671 {
1672  CheckSelected(e_Equivalent);
1673  return *static_cast<const TEquivalent*>(m_object);
1674 }
1675 
1677 {
1680  value.SetEquivalent();
1681  return value;
1682 }
1683 
1684 // helper methods
1685 
1686 // type info
1688 {
1689  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.binary-logical", "mmlclass");
1690  SET_CHOICE_MODULE("pubmed_mathml3");
1691  ADD_NAMED_REF_CHOICE_VARIANT("implies", m_object, CImplies)->SetNsQualified(true);
1692  ADD_NAMED_REF_CHOICE_VARIANT("equivalent", m_object, CEquivalent)->SetNsQualified(true);
1693  info->CodeVersion(22400);
1694  info->DataSpec(ncbi::EDataSpec::eXSD);
1695 }
1697 
1698 // constructor
1700  : m_choice(e_not_set)
1701 {
1702 }
1703 
1704 // destructor
1706 {
1707  Reset();
1708 }
1709 
1710 
1712 {
1713  if ( m_choice != e_not_set )
1714  ResetSelection();
1715 }
1716 
1718 {
1719  switch ( m_choice ) {
1720  case e_Forall:
1721  case e_Exists:
1722  m_object->RemoveReference();
1723  break;
1724  default:
1725  break;
1726  }
1727  m_choice = e_not_set;
1728 }
1729 
1731 {
1732  switch ( index ) {
1733  case e_Forall:
1734  (m_object = new(pool) ncbi::objects::CForall())->AddReference();
1735  break;
1736  case e_Exists:
1737  (m_object = new(pool) ncbi::objects::CExists())->AddReference();
1738  break;
1739  default:
1740  break;
1741  }
1742  m_choice = index;
1743 }
1744 
1746  "not set",
1747  "forall",
1748  "exists"
1749 };
1750 
1752 {
1753  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1754 }
1755 
1757 {
1758  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1759 }
1760 
1762 {
1763  CheckSelected(e_Forall);
1764  return *static_cast<const TForall*>(m_object);
1765 }
1766 
1768 {
1771  value.SetForall();
1772  return value;
1773 }
1774 
1776 {
1777  CheckSelected(e_Exists);
1778  return *static_cast<const TExists*>(m_object);
1779 }
1780 
1782 {
1785  value.SetExists();
1786  return value;
1787 }
1788 
1789 // helper methods
1790 
1791 // type info
1793 {
1794  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.quantifier", "mmlclass");
1795  SET_CHOICE_MODULE("pubmed_mathml3");
1796  ADD_NAMED_REF_CHOICE_VARIANT("forall", m_object, CForall)->SetNsQualified(true);
1797  ADD_NAMED_REF_CHOICE_VARIANT("exists", m_object, CExists)->SetNsQualified(true);
1798  info->CodeVersion(22400);
1799  info->DataSpec(ncbi::EDataSpec::eXSD);
1800 }
1802 
1803 // constructor
1805  : m_choice(e_not_set)
1806 {
1807 }
1808 
1809 // destructor
1811 {
1812  Reset();
1813 }
1814 
1815 
1817 {
1818  if ( m_choice != e_not_set )
1819  ResetSelection();
1820 }
1821 
1823 {
1824  switch ( m_choice ) {
1825  case e_Eq:
1826  case e_Gt:
1827  case e_Lt:
1828  case e_Geq:
1829  case e_Leq:
1830  m_object->RemoveReference();
1831  break;
1832  default:
1833  break;
1834  }
1835  m_choice = e_not_set;
1836 }
1837 
1839 {
1840  switch ( index ) {
1841  case e_Eq:
1842  (m_object = new(pool) ncbi::objects::CEq())->AddReference();
1843  break;
1844  case e_Gt:
1845  (m_object = new(pool) ncbi::objects::CGt())->AddReference();
1846  break;
1847  case e_Lt:
1848  (m_object = new(pool) ncbi::objects::CLt())->AddReference();
1849  break;
1850  case e_Geq:
1851  (m_object = new(pool) ncbi::objects::CGeq())->AddReference();
1852  break;
1853  case e_Leq:
1854  (m_object = new(pool) ncbi::objects::CLeq())->AddReference();
1855  break;
1856  default:
1857  break;
1858  }
1859  m_choice = index;
1860 }
1861 
1863  "not set",
1864  "eq",
1865  "gt",
1866  "lt",
1867  "geq",
1868  "leq"
1869 };
1870 
1872 {
1873  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1874 }
1875 
1877 {
1878  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
1879 }
1880 
1882 {
1883  CheckSelected(e_Eq);
1884  return *static_cast<const TEq*>(m_object);
1885 }
1886 
1888 {
1891  value.SetEq();
1892  return value;
1893 }
1894 
1896 {
1897  CheckSelected(e_Gt);
1898  return *static_cast<const TGt*>(m_object);
1899 }
1900 
1902 {
1905  value.SetGt();
1906  return value;
1907 }
1908 
1910 {
1911  CheckSelected(e_Lt);
1912  return *static_cast<const TLt*>(m_object);
1913 }
1914 
1916 {
1919  value.SetLt();
1920  return value;
1921 }
1922 
1924 {
1925  CheckSelected(e_Geq);
1926  return *static_cast<const TGeq*>(m_object);
1927 }
1928 
1930 {
1933  value.SetGeq();
1934  return value;
1935 }
1936 
1938 {
1939  CheckSelected(e_Leq);
1940  return *static_cast<const TLeq*>(m_object);
1941 }
1942 
1944 {
1947  value.SetLeq();
1948  return value;
1949 }
1950 
1951 // helper methods
1952 
1953 // type info
1955 {
1956  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-reln", "mmlclass");
1957  SET_CHOICE_MODULE("pubmed_mathml3");
1958  ADD_NAMED_REF_CHOICE_VARIANT("eq", m_object, CEq)->SetNsQualified(true);
1959  ADD_NAMED_REF_CHOICE_VARIANT("gt", m_object, CGt)->SetNsQualified(true);
1960  ADD_NAMED_REF_CHOICE_VARIANT("lt", m_object, CLt)->SetNsQualified(true);
1961  ADD_NAMED_REF_CHOICE_VARIANT("geq", m_object, CGeq)->SetNsQualified(true);
1962  ADD_NAMED_REF_CHOICE_VARIANT("leq", m_object, CLeq)->SetNsQualified(true);
1963  info->CodeVersion(22400);
1964  info->DataSpec(ncbi::EDataSpec::eXSD);
1965 }
1967 
1968 // constructor
1970  : m_choice(e_not_set)
1971 {
1972 }
1973 
1974 // destructor
1976 {
1977  Reset();
1978 }
1979 
1980 
1982 {
1983  if ( m_choice != e_not_set )
1984  ResetSelection();
1985 }
1986 
1988 {
1989  switch ( m_choice ) {
1990  case e_Neq:
1991  case e_Approx:
1992  case e_Factorof:
1993  case e_Tendsto:
1994  m_object->RemoveReference();
1995  break;
1996  default:
1997  break;
1998  }
1999  m_choice = e_not_set;
2000 }
2001 
2003 {
2004  switch ( index ) {
2005  case e_Neq:
2006  (m_object = new(pool) ncbi::objects::CNeq())->AddReference();
2007  break;
2008  case e_Approx:
2009  (m_object = new(pool) ncbi::objects::CApprox())->AddReference();
2010  break;
2011  case e_Factorof:
2012  (m_object = new(pool) ncbi::objects::CFactorof())->AddReference();
2013  break;
2014  case e_Tendsto:
2015  (m_object = new(pool) ncbi::objects::CTendsto())->AddReference();
2016  break;
2017  default:
2018  break;
2019  }
2020  m_choice = index;
2021 }
2022 
2024  "not set",
2025  "neq",
2026  "approx",
2027  "factorof",
2028  "tendsto"
2029 };
2030 
2032 {
2033  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2034 }
2035 
2037 {
2038  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2039 }
2040 
2042 {
2043  CheckSelected(e_Neq);
2044  return *static_cast<const TNeq*>(m_object);
2045 }
2046 
2048 {
2051  value.SetNeq();
2052  return value;
2053 }
2054 
2056 {
2057  CheckSelected(e_Approx);
2058  return *static_cast<const TApprox*>(m_object);
2059 }
2060 
2062 {
2065  value.SetApprox();
2066  return value;
2067 }
2068 
2070 {
2071  CheckSelected(e_Factorof);
2072  return *static_cast<const TFactorof*>(m_object);
2073 }
2074 
2076 {
2079  value.SetFactorof();
2080  return value;
2081 }
2082 
2084 {
2085  CheckSelected(e_Tendsto);
2086  return *static_cast<const TTendsto*>(m_object);
2087 }
2088 
2090 {
2093  value.SetTendsto();
2094  return value;
2095 }
2096 
2097 // helper methods
2098 
2099 // type info
2101 {
2102  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.binary-reln", "mmlclass");
2103  SET_CHOICE_MODULE("pubmed_mathml3");
2104  ADD_NAMED_REF_CHOICE_VARIANT("neq", m_object, CNeq)->SetNsQualified(true);
2105  ADD_NAMED_REF_CHOICE_VARIANT("approx", m_object, CApprox)->SetNsQualified(true);
2106  ADD_NAMED_REF_CHOICE_VARIANT("factorof", m_object, CFactorof)->SetNsQualified(true);
2107  ADD_NAMED_REF_CHOICE_VARIANT("tendsto", m_object, CTendsto)->SetNsQualified(true);
2108  info->CodeVersion(22400);
2109  info->DataSpec(ncbi::EDataSpec::eXSD);
2110 }
2112 
2113 // constructor
2115  : m_choice(e_not_set)
2116 {
2117 }
2118 
2119 // destructor
2121 {
2122  Reset();
2123 }
2124 
2125 
2127 {
2128  return m_Int ? m_Int->IsSetInt() : false;
2129 }
2130 
2132 {
2133  if ( !m_Int ) {
2134  m_Int.Reset(new TInt());
2135  return;
2136  }
2137  (*m_Int).Reset();
2138 }
2139 
2141 {
2142  m_Int.Reset(&value);
2143 }
2144 
2146 {
2147  if ( !m_Int ) {
2148  ResetInt();
2149  }
2150  m_Int->SetInt();
2151  return (*m_Int);
2152 }
2153 
2155 {
2156  ResetInt();
2157 }
2158 
2160 {
2161  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.int", "mmlclass");
2162  SET_CLASS_MODULE("pubmed_mathml3");
2163  ADD_NAMED_REF_MEMBER("int", m_Int, CInt)->SetNsQualified(true);
2164  info->RandomOrder();
2165  info->CodeVersion(22400);
2166  info->DataSpec(ncbi::EDataSpec::eXSD);
2167 }
2169 
2170 // constructor
2172 {
2173  memset(m_set_State,0,sizeof(m_set_State));
2174  if ( !IsAllocatedInPool() ) {
2175  ResetInt();
2176  }
2177 }
2178 
2179 // destructor
2181 {
2182 }
2183 
2184 
2186 {
2187  return m_Diff ? m_Diff->IsSetDiff() : false;
2188 }
2189 
2191 {
2192  if ( !m_Diff ) {
2193  m_Diff.Reset(new TDiff());
2194  return;
2195  }
2196  (*m_Diff).Reset();
2197 }
2198 
2200 {
2201  m_Diff.Reset(&value);
2202 }
2203 
2205 {
2206  if ( !m_Diff ) {
2207  ResetDiff();
2208  }
2209  m_Diff->SetDiff();
2210  return (*m_Diff);
2211 }
2212 
2214 {
2215  ResetDiff();
2216 }
2217 
2219 {
2220  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.Differential-Operator", "mmlclass");
2221  SET_CLASS_MODULE("pubmed_mathml3");
2222  ADD_NAMED_REF_MEMBER("diff", m_Diff, CDiff)->SetNsQualified(true);
2223  info->RandomOrder();
2224  info->CodeVersion(22400);
2225  info->DataSpec(ncbi::EDataSpec::eXSD);
2226 }
2228 
2229 // constructor
2231 {
2232  memset(m_set_State,0,sizeof(m_set_State));
2233  if ( !IsAllocatedInPool() ) {
2234  ResetDiff();
2235  }
2236 }
2237 
2238 // destructor
2240 {
2241 }
2242 
2243 
2245 {
2246  return m_Partialdiff ? m_Partialdiff->IsSetPartialdiff() : false;
2247 }
2248 
2250 {
2251  if ( !m_Partialdiff ) {
2252  m_Partialdiff.Reset(new TPartialdiff());
2253  return;
2254  }
2255  (*m_Partialdiff).Reset();
2256 }
2257 
2259 {
2260  m_Partialdiff.Reset(&value);
2261 }
2262 
2264 {
2265  if ( !m_Partialdiff ) {
2266  ResetPartialdiff();
2267  }
2268  m_Partialdiff->SetPartialdiff();
2269  return (*m_Partialdiff);
2270 }
2271 
2273 {
2274  ResetPartialdiff();
2275 }
2276 
2278 {
2279  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.partialdiff", "mmlclass");
2280  SET_CLASS_MODULE("pubmed_mathml3");
2281  ADD_NAMED_REF_MEMBER("partialdiff", m_Partialdiff, CPartialdiff)->SetNsQualified(true);
2282  info->RandomOrder();
2283  info->CodeVersion(22400);
2284  info->DataSpec(ncbi::EDataSpec::eXSD);
2285 }
2287 
2288 // constructor
2290 {
2291  memset(m_set_State,0,sizeof(m_set_State));
2292  if ( !IsAllocatedInPool() ) {
2293  ResetPartialdiff();
2294  }
2295 }
2296 
2297 // destructor
2299 {
2300 }
2301 
2302 
2304 {
2305  if ( m_choice != e_not_set )
2306  ResetSelection();
2307 }
2308 
2310 {
2311  switch ( m_choice ) {
2312  case e_Divergence:
2313  case e_Grad:
2314  case e_Curl:
2315  case e_Laplacian:
2316  m_object->RemoveReference();
2317  break;
2318  default:
2319  break;
2320  }
2321  m_choice = e_not_set;
2322 }
2323 
2325 {
2326  switch ( index ) {
2327  case e_Divergence:
2328  (m_object = new(pool) ncbi::objects::CDivergence())->AddReference();
2329  break;
2330  case e_Grad:
2331  (m_object = new(pool) ncbi::objects::CGrad())->AddReference();
2332  break;
2333  case e_Curl:
2334  (m_object = new(pool) ncbi::objects::CCurl())->AddReference();
2335  break;
2336  case e_Laplacian:
2337  (m_object = new(pool) ncbi::objects::CLaplacian())->AddReference();
2338  break;
2339  default:
2340  break;
2341  }
2342  m_choice = index;
2343 }
2344 
2346  "not set",
2347  "divergence",
2348  "grad",
2349  "curl",
2350  "laplacian"
2351 };
2352 
2354 {
2355  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2356 }
2357 
2359 {
2360  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2361 }
2362 
2364 {
2365  CheckSelected(e_Divergence);
2366  return *static_cast<const TDivergence*>(m_object);
2367 }
2368 
2370 {
2373  value.SetDivergence();
2374  return value;
2375 }
2376 
2378 {
2379  CheckSelected(e_Grad);
2380  return *static_cast<const TGrad*>(m_object);
2381 }
2382 
2384 {
2387  value.SetGrad();
2388  return value;
2389 }
2390 
2392 {
2393  CheckSelected(e_Curl);
2394  return *static_cast<const TCurl*>(m_object);
2395 }
2396 
2398 {
2401  value.SetCurl();
2402  return value;
2403 }
2404 
2406 {
2407  CheckSelected(e_Laplacian);
2408  return *static_cast<const TLaplacian*>(m_object);
2409 }
2410 
2412 {
2415  value.SetLaplacian();
2416  return value;
2417 }
2418 
2419 // helper methods
2420 
2421 // type info
2423 {
2424  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.unary-veccalc", "mmlclass");
2425  SET_CHOICE_MODULE("pubmed_mathml3");
2426  ADD_NAMED_REF_CHOICE_VARIANT("divergence", m_object, CDivergence)->SetNsQualified(true);
2427  ADD_NAMED_REF_CHOICE_VARIANT("grad", m_object, CGrad)->SetNsQualified(true);
2428  ADD_NAMED_REF_CHOICE_VARIANT("curl", m_object, CCurl)->SetNsQualified(true);
2429  ADD_NAMED_REF_CHOICE_VARIANT("laplacian", m_object, CLaplacian)->SetNsQualified(true);
2430  info->CodeVersion(22400);
2431  info->DataSpec(ncbi::EDataSpec::eXSD);
2432 }
2434 
2435 // constructor
2437  : m_choice(e_not_set)
2438 {
2439 }
2440 
2441 // destructor
2443 {
2444  Reset();
2445 }
2446 
2447 
2449 {
2450  if ( m_choice != e_not_set )
2451  ResetSelection();
2452 }
2453 
2455 {
2456  switch ( m_choice ) {
2457  case e_Set:
2458  case e_List:
2459  m_object->RemoveReference();
2460  break;
2461  default:
2462  break;
2463  }
2464  m_choice = e_not_set;
2465 }
2466 
2468 {
2469  switch ( index ) {
2470  case e_Set:
2471  (m_object = new(pool) ncbi::objects::CSet())->AddReference();
2472  break;
2473  case e_List:
2474  (m_object = new(pool) ncbi::objects::CList())->AddReference();
2475  break;
2476  default:
2477  break;
2478  }
2479  m_choice = index;
2480 }
2481 
2483  "not set",
2484  "set",
2485  "list"
2486 };
2487 
2489 {
2490  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2491 }
2492 
2494 {
2495  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2496 }
2497 
2499 {
2500  CheckSelected(e_Set);
2501  return *static_cast<const TSet*>(m_object);
2502 }
2503 
2505 {
2507  return *static_cast<TSet*>(m_object);
2508 }
2509 
2511 {
2512  TSet* ptr = &value;
2513  if ( m_choice != e_Set || m_object != ptr ) {
2514  ResetSelection();
2515  (m_object = ptr)->AddReference();
2516  m_choice = e_Set;
2517  }
2518 }
2519 
2521 {
2522  CheckSelected(e_List);
2523  return *static_cast<const TList*>(m_object);
2524 }
2525 
2527 {
2529  return *static_cast<TList*>(m_object);
2530 }
2531 
2533 {
2534  TList* ptr = &value;
2535  if ( m_choice != e_List || m_object != ptr ) {
2536  ResetSelection();
2537  (m_object = ptr)->AddReference();
2538  m_choice = e_List;
2539  }
2540 }
2541 
2542 // helper methods
2543 
2544 // type info
2546 {
2547  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-setlist-constructor", "mmlclass");
2548  SET_CHOICE_MODULE("pubmed_mathml3");
2549  ADD_NAMED_REF_CHOICE_VARIANT("set", m_object, CSet)->SetNsQualified(true);
2550  ADD_NAMED_REF_CHOICE_VARIANT("list", m_object, CList)->SetNsQualified(true);
2551  info->CodeVersion(22400);
2552  info->DataSpec(ncbi::EDataSpec::eXSD);
2553 }
2555 
2556 // constructor
2558  : m_choice(e_not_set)
2559 {
2560 }
2561 
2562 // destructor
2564 {
2565  Reset();
2566 }
2567 
2568 
2570 {
2571  if ( m_choice != e_not_set )
2572  ResetSelection();
2573 }
2574 
2576 {
2577  switch ( m_choice ) {
2578  case e_Union:
2579  case e_Intersect:
2580  case e_Cartesianproduct:
2581  m_object->RemoveReference();
2582  break;
2583  default:
2584  break;
2585  }
2586  m_choice = e_not_set;
2587 }
2588 
2590 {
2591  switch ( index ) {
2592  case e_Union:
2593  (m_object = new(pool) ncbi::objects::CUnion())->AddReference();
2594  break;
2595  case e_Intersect:
2596  (m_object = new(pool) ncbi::objects::CIntersect())->AddReference();
2597  break;
2598  case e_Cartesianproduct:
2599  (m_object = new(pool) ncbi::objects::CCartesianproduct())->AddReference();
2600  break;
2601  default:
2602  break;
2603  }
2604  m_choice = index;
2605 }
2606 
2608  "not set",
2609  "union",
2610  "intersect",
2611  "cartesianproduct"
2612 };
2613 
2615 {
2616  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2617 }
2618 
2620 {
2621  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2622 }
2623 
2625 {
2626  CheckSelected(e_Union);
2627  return *static_cast<const TUnion*>(m_object);
2628 }
2629 
2631 {
2634  value.SetUnion();
2635  return value;
2636 }
2637 
2639 {
2640  CheckSelected(e_Intersect);
2641  return *static_cast<const TIntersect*>(m_object);
2642 }
2643 
2645 {
2648  value.SetIntersect();
2649  return value;
2650 }
2651 
2653 {
2654  CheckSelected(e_Cartesianproduct);
2655  return *static_cast<const TCartesianproduct*>(m_object);
2656 }
2657 
2659 {
2660  Select(e_Cartesianproduct, NCBI_NS_NCBI::eDoNotResetVariant);
2662  value.SetCartesianproduct();
2663  return value;
2664 }
2665 
2666 // helper methods
2667 
2668 // type info
2670 {
2671  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-set", "mmlclass");
2672  SET_CHOICE_MODULE("pubmed_mathml3");
2673  ADD_NAMED_REF_CHOICE_VARIANT("union", m_object, CUnion)->SetNsQualified(true);
2674  ADD_NAMED_REF_CHOICE_VARIANT("intersect", m_object, CIntersect)->SetNsQualified(true);
2675  ADD_NAMED_REF_CHOICE_VARIANT("cartesianproduct", m_object, CCartesianproduct)->SetNsQualified(true);
2676  info->CodeVersion(22400);
2677  info->DataSpec(ncbi::EDataSpec::eXSD);
2678 }
2680 
2681 // constructor
2683  : m_choice(e_not_set)
2684 {
2685 }
2686 
2687 // destructor
2689 {
2690  Reset();
2691 }
2692 
2693 
2695 {
2696  if ( m_choice != e_not_set )
2697  ResetSelection();
2698 }
2699 
2701 {
2702  switch ( m_choice ) {
2703  case e_In:
2704  case e_Notin:
2705  case e_Notsubset:
2706  case e_Notprsubset:
2707  case e_Setdiff:
2708  m_object->RemoveReference();
2709  break;
2710  default:
2711  break;
2712  }
2713  m_choice = e_not_set;
2714 }
2715 
2717 {
2718  switch ( index ) {
2719  case e_In:
2720  (m_object = new(pool) ncbi::objects::CIn())->AddReference();
2721  break;
2722  case e_Notin:
2723  (m_object = new(pool) ncbi::objects::CNotin())->AddReference();
2724  break;
2725  case e_Notsubset:
2726  (m_object = new(pool) ncbi::objects::CNotsubset())->AddReference();
2727  break;
2728  case e_Notprsubset:
2729  (m_object = new(pool) ncbi::objects::CNotprsubset())->AddReference();
2730  break;
2731  case e_Setdiff:
2732  (m_object = new(pool) ncbi::objects::CSetdiff())->AddReference();
2733  break;
2734  default:
2735  break;
2736  }
2737  m_choice = index;
2738 }
2739 
2741  "not set",
2742  "in",
2743  "notin",
2744  "notsubset",
2745  "notprsubset",
2746  "setdiff"
2747 };
2748 
2750 {
2751  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2752 }
2753 
2755 {
2756  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2757 }
2758 
2760 {
2761  CheckSelected(e_In);
2762  return *static_cast<const TIn*>(m_object);
2763 }
2764 
2766 {
2769  value.SetIn();
2770  return value;
2771 }
2772 
2774 {
2775  CheckSelected(e_Notin);
2776  return *static_cast<const TNotin*>(m_object);
2777 }
2778 
2780 {
2783  value.SetNotin();
2784  return value;
2785 }
2786 
2788 {
2789  CheckSelected(e_Notsubset);
2790  return *static_cast<const TNotsubset*>(m_object);
2791 }
2792 
2794 {
2797  value.SetNotsubset();
2798  return value;
2799 }
2800 
2802 {
2803  CheckSelected(e_Notprsubset);
2804  return *static_cast<const TNotprsubset*>(m_object);
2805 }
2806 
2808 {
2809  Select(e_Notprsubset, NCBI_NS_NCBI::eDoNotResetVariant);
2811  value.SetNotprsubset();
2812  return value;
2813 }
2814 
2816 {
2817  CheckSelected(e_Setdiff);
2818  return *static_cast<const TSetdiff*>(m_object);
2819 }
2820 
2822 {
2825  value.SetSetdiff();
2826  return value;
2827 }
2828 
2829 // helper methods
2830 
2831 // type info
2833 {
2834  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.binary-set", "mmlclass");
2835  SET_CHOICE_MODULE("pubmed_mathml3");
2836  ADD_NAMED_REF_CHOICE_VARIANT("in", m_object, CIn)->SetNsQualified(true);
2837  ADD_NAMED_REF_CHOICE_VARIANT("notin", m_object, CNotin)->SetNsQualified(true);
2838  ADD_NAMED_REF_CHOICE_VARIANT("notsubset", m_object, CNotsubset)->SetNsQualified(true);
2839  ADD_NAMED_REF_CHOICE_VARIANT("notprsubset", m_object, CNotprsubset)->SetNsQualified(true);
2840  ADD_NAMED_REF_CHOICE_VARIANT("setdiff", m_object, CSetdiff)->SetNsQualified(true);
2841  info->CodeVersion(22400);
2842  info->DataSpec(ncbi::EDataSpec::eXSD);
2843 }
2845 
2846 // constructor
2848  : m_choice(e_not_set)
2849 {
2850 }
2851 
2852 // destructor
2854 {
2855  Reset();
2856 }
2857 
2858 
2860 {
2861  if ( m_choice != e_not_set )
2862  ResetSelection();
2863 }
2864 
2866 {
2867  switch ( m_choice ) {
2868  case e_Subset:
2869  case e_Prsubset:
2870  m_object->RemoveReference();
2871  break;
2872  default:
2873  break;
2874  }
2875  m_choice = e_not_set;
2876 }
2877 
2879 {
2880  switch ( index ) {
2881  case e_Subset:
2882  (m_object = new(pool) ncbi::objects::CSubset())->AddReference();
2883  break;
2884  case e_Prsubset:
2885  (m_object = new(pool) ncbi::objects::CPrsubset())->AddReference();
2886  break;
2887  default:
2888  break;
2889  }
2890  m_choice = index;
2891 }
2892 
2894  "not set",
2895  "subset",
2896  "prsubset"
2897 };
2898 
2900 {
2901  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2902 }
2903 
2905 {
2906  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
2907 }
2908 
2910 {
2911  CheckSelected(e_Subset);
2912  return *static_cast<const TSubset*>(m_object);
2913 }
2914 
2916 {
2919  value.SetSubset();
2920  return value;
2921 }
2922 
2924 {
2925  CheckSelected(e_Prsubset);
2926  return *static_cast<const TPrsubset*>(m_object);
2927 }
2928 
2930 {
2933  value.SetPrsubset();
2934  return value;
2935 }
2936 
2937 // helper methods
2938 
2939 // type info
2941 {
2942  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-set-reln", "mmlclass");
2943  SET_CHOICE_MODULE("pubmed_mathml3");
2944  ADD_NAMED_REF_CHOICE_VARIANT("subset", m_object, CSubset)->SetNsQualified(true);
2945  ADD_NAMED_REF_CHOICE_VARIANT("prsubset", m_object, CPrsubset)->SetNsQualified(true);
2946  info->CodeVersion(22400);
2947  info->DataSpec(ncbi::EDataSpec::eXSD);
2948 }
2950 
2951 // constructor
2953  : m_choice(e_not_set)
2954 {
2955 }
2956 
2957 // destructor
2959 {
2960  Reset();
2961 }
2962 
2963 
2965 {
2966  return m_Card ? m_Card->IsSetCard() : false;
2967 }
2968 
2970 {
2971  if ( !m_Card ) {
2972  m_Card.Reset(new TCard());
2973  return;
2974  }
2975  (*m_Card).Reset();
2976 }
2977 
2979 {
2980  m_Card.Reset(&value);
2981 }
2982 
2984 {
2985  if ( !m_Card ) {
2986  ResetCard();
2987  }
2988  m_Card->SetCard();
2989  return (*m_Card);
2990 }
2991 
2993 {
2994  ResetCard();
2995 }
2996 
2998 {
2999  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.unary-set", "mmlclass");
3000  SET_CLASS_MODULE("pubmed_mathml3");
3001  ADD_NAMED_REF_MEMBER("card", m_Card, CCard)->SetNsQualified(true);
3002  info->RandomOrder();
3003  info->CodeVersion(22400);
3004  info->DataSpec(ncbi::EDataSpec::eXSD);
3005 }
3007 
3008 // constructor
3010 {
3011  memset(m_set_State,0,sizeof(m_set_State));
3012  if ( !IsAllocatedInPool() ) {
3013  ResetCard();
3014  }
3015 }
3016 
3017 // destructor
3019 {
3020 }
3021 
3022 
3024 {
3025  return m_Sum ? m_Sum->IsSetSum() : false;
3026 }
3027 
3029 {
3030  if ( !m_Sum ) {
3031  m_Sum.Reset(new TSum());
3032  return;
3033  }
3034  (*m_Sum).Reset();
3035 }
3036 
3038 {
3039  m_Sum.Reset(&value);
3040 }
3041 
3043 {
3044  if ( !m_Sum ) {
3045  ResetSum();
3046  }
3047  m_Sum->SetSum();
3048  return (*m_Sum);
3049 }
3050 
3052 {
3053  ResetSum();
3054 }
3055 
3057 {
3058  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.sum", "mmlclass");
3059  SET_CLASS_MODULE("pubmed_mathml3");
3060  ADD_NAMED_REF_MEMBER("sum", m_Sum, CSum)->SetNsQualified(true);
3061  info->RandomOrder();
3062  info->CodeVersion(22400);
3063  info->DataSpec(ncbi::EDataSpec::eXSD);
3064 }
3066 
3067 // constructor
3069 {
3070  memset(m_set_State,0,sizeof(m_set_State));
3071  if ( !IsAllocatedInPool() ) {
3072  ResetSum();
3073  }
3074 }
3075 
3076 // destructor
3078 {
3079 }
3080 
3081 
3083 {
3084  return m_Product ? m_Product->IsSetProduct() : false;
3085 }
3086 
3088 {
3089  if ( !m_Product ) {
3090  m_Product.Reset(new TProduct());
3091  return;
3092  }
3093  (*m_Product).Reset();
3094 }
3095 
3097 {
3098  m_Product.Reset(&value);
3099 }
3100 
3102 {
3103  if ( !m_Product ) {
3104  ResetProduct();
3105  }
3106  m_Product->SetProduct();
3107  return (*m_Product);
3108 }
3109 
3111 {
3112  ResetProduct();
3113 }
3114 
3116 {
3117  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.product", "mmlclass");
3118  SET_CLASS_MODULE("pubmed_mathml3");
3119  ADD_NAMED_REF_MEMBER("product", m_Product, CProduct)->SetNsQualified(true);
3120  info->RandomOrder();
3121  info->CodeVersion(22400);
3122  info->DataSpec(ncbi::EDataSpec::eXSD);
3123 }
3125 
3126 // constructor
3128 {
3129  memset(m_set_State,0,sizeof(m_set_State));
3130  if ( !IsAllocatedInPool() ) {
3131  ResetProduct();
3132  }
3133 }
3134 
3135 // destructor
3137 {
3138 }
3139 
3140 
3142 {
3143  return m_Limit ? m_Limit->IsSetLimit() : false;
3144 }
3145 
3147 {
3148  if ( !m_Limit ) {
3149  m_Limit.Reset(new TLimit());
3150  return;
3151  }
3152  (*m_Limit).Reset();
3153 }
3154 
3156 {
3157  m_Limit.Reset(&value);
3158 }
3159 
3161 {
3162  if ( !m_Limit ) {
3163  ResetLimit();
3164  }
3165  m_Limit->SetLimit();
3166  return (*m_Limit);
3167 }
3168 
3170 {
3171  ResetLimit();
3172 }
3173 
3175 {
3176  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.limit", "mmlclass");
3177  SET_CLASS_MODULE("pubmed_mathml3");
3178  ADD_NAMED_REF_MEMBER("limit", m_Limit, CLimit)->SetNsQualified(true);
3179  info->RandomOrder();
3180  info->CodeVersion(22400);
3181  info->DataSpec(ncbi::EDataSpec::eXSD);
3182 }
3184 
3185 // constructor
3187 {
3188  memset(m_set_State,0,sizeof(m_set_State));
3189  if ( !IsAllocatedInPool() ) {
3190  ResetLimit();
3191  }
3192 }
3193 
3194 // destructor
3196 {
3197 }
3198 
3199 
3201 {
3202  if ( m_choice != e_not_set )
3203  ResetSelection();
3204 }
3205 
3207 {
3208  switch ( m_choice ) {
3209  case e_Sin:
3210  case e_Cos:
3211  case e_Tan:
3212  case e_Sec:
3213  case e_Csc:
3214  case e_Cot:
3215  case e_Sinh:
3216  case e_Cosh:
3217  case e_Tanh:
3218  case e_Sech:
3219  case e_Csch:
3220  case e_Coth:
3221  case e_Arcsin:
3222  case e_Arccos:
3223  case e_Arctan:
3224  case e_Arccosh:
3225  case e_Arccot:
3226  case e_Arccoth:
3227  case e_Arccsc:
3228  case e_Arccsch:
3229  case e_Arcsec:
3230  case e_Arcsech:
3231  case e_Arcsinh:
3232  case e_Arctanh:
3233  m_object->RemoveReference();
3234  break;
3235  default:
3236  break;
3237  }
3238  m_choice = e_not_set;
3239 }
3240 
3242 {
3243  switch ( index ) {
3244  case e_Sin:
3245  (m_object = new(pool) ncbi::objects::CSin())->AddReference();
3246  break;
3247  case e_Cos:
3248  (m_object = new(pool) ncbi::objects::CCos())->AddReference();
3249  break;
3250  case e_Tan:
3251  (m_object = new(pool) ncbi::objects::CTan())->AddReference();
3252  break;
3253  case e_Sec:
3254  (m_object = new(pool) ncbi::objects::CSec())->AddReference();
3255  break;
3256  case e_Csc:
3257  (m_object = new(pool) ncbi::objects::CCsc())->AddReference();
3258  break;
3259  case e_Cot:
3260  (m_object = new(pool) ncbi::objects::CCot())->AddReference();
3261  break;
3262  case e_Sinh:
3263  (m_object = new(pool) ncbi::objects::CSinh())->AddReference();
3264  break;
3265  case e_Cosh:
3266  (m_object = new(pool) ncbi::objects::CCosh())->AddReference();
3267  break;
3268  case e_Tanh:
3269  (m_object = new(pool) ncbi::objects::CTanh())->AddReference();
3270  break;
3271  case e_Sech:
3272  (m_object = new(pool) ncbi::objects::CSech())->AddReference();
3273  break;
3274  case e_Csch:
3275  (m_object = new(pool) ncbi::objects::CCsch())->AddReference();
3276  break;
3277  case e_Coth:
3278  (m_object = new(pool) ncbi::objects::CCoth())->AddReference();
3279  break;
3280  case e_Arcsin:
3281  (m_object = new(pool) ncbi::objects::CArcsin())->AddReference();
3282  break;
3283  case e_Arccos:
3284  (m_object = new(pool) ncbi::objects::CArccos())->AddReference();
3285  break;
3286  case e_Arctan:
3287  (m_object = new(pool) ncbi::objects::CArctan())->AddReference();
3288  break;
3289  case e_Arccosh:
3290  (m_object = new(pool) ncbi::objects::CArccosh())->AddReference();
3291  break;
3292  case e_Arccot:
3293  (m_object = new(pool) ncbi::objects::CArccot())->AddReference();
3294  break;
3295  case e_Arccoth:
3296  (m_object = new(pool) ncbi::objects::CArccoth())->AddReference();
3297  break;
3298  case e_Arccsc:
3299  (m_object = new(pool) ncbi::objects::CArccsc())->AddReference();
3300  break;
3301  case e_Arccsch:
3302  (m_object = new(pool) ncbi::objects::CArccsch())->AddReference();
3303  break;
3304  case e_Arcsec:
3305  (m_object = new(pool) ncbi::objects::CArcsec())->AddReference();
3306  break;
3307  case e_Arcsech:
3308  (m_object = new(pool) ncbi::objects::CArcsech())->AddReference();
3309  break;
3310  case e_Arcsinh:
3311  (m_object = new(pool) ncbi::objects::CArcsinh())->AddReference();
3312  break;
3313  case e_Arctanh:
3314  (m_object = new(pool) ncbi::objects::CArctanh())->AddReference();
3315  break;
3316  default:
3317  break;
3318  }
3319  m_choice = index;
3320 }
3321 
3323  "not set",
3324  "sin",
3325  "cos",
3326  "tan",
3327  "sec",
3328  "csc",
3329  "cot",
3330  "sinh",
3331  "cosh",
3332  "tanh",
3333  "sech",
3334  "csch",
3335  "coth",
3336  "arcsin",
3337  "arccos",
3338  "arctan",
3339  "arccosh",
3340  "arccot",
3341  "arccoth",
3342  "arccsc",
3343  "arccsch",
3344  "arcsec",
3345  "arcsech",
3346  "arcsinh",
3347  "arctanh"
3348 };
3349 
3351 {
3352  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
3353 }
3354 
3356 {
3357  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
3358 }
3359 
3361 {
3362  CheckSelected(e_Sin);
3363  return *static_cast<const TSin*>(m_object);
3364 }
3365 
3367 {
3370  value.SetSin();
3371  return value;
3372 }
3373 
3375 {
3376  CheckSelected(e_Cos);
3377  return *static_cast<const TCos*>(m_object);
3378 }
3379 
3381 {
3384  value.SetCos();
3385  return value;
3386 }
3387 
3389 {
3390  CheckSelected(e_Tan);
3391  return *static_cast<const TTan*>(m_object);
3392 }
3393 
3395 {
3398  value.SetTan();
3399  return value;
3400 }
3401 
3403 {
3404  CheckSelected(e_Sec);
3405  return *static_cast<const TSec*>(m_object);
3406 }
3407 
3409 {
3412  value.SetSec();
3413  return value;
3414 }
3415 
3417 {
3418  CheckSelected(e_Csc);
3419  return *static_cast<const TCsc*>(m_object);
3420 }
3421 
3423 {
3426  value.SetCsc();
3427  return value;
3428 }
3429 
3431 {
3432  CheckSelected(e_Cot);
3433  return *static_cast<const TCot*>(m_object);
3434 }
3435 
3437 {
3440  value.SetCot();
3441  return value;
3442 }
3443 
3445 {
3446  CheckSelected(e_Sinh);
3447  return *static_cast<const TSinh*>(m_object);
3448 }
3449 
3451 {
3454  value.SetSinh();
3455  return value;
3456 }
3457 
3459 {
3460  CheckSelected(e_Cosh);
3461  return *static_cast<const TCosh*>(m_object);
3462 }
3463 
3465 {
3468  value.SetCosh();
3469  return value;
3470 }
3471 
3473 {
3474  CheckSelected(e_Tanh);
3475  return *static_cast<const TTanh*>(m_object);
3476 }
3477 
3479 {
3482  value.SetTanh();
3483  return value;
3484 }
3485 
3487 {
3488  CheckSelected(e_Sech);
3489  return *static_cast<const TSech*>(m_object);
3490 }
3491 
3493 {
3496  value.SetSech();
3497  return value;
3498 }
3499 
3501 {
3502  CheckSelected(e_Csch);
3503  return *static_cast<const TCsch*>(m_object);
3504 }
3505 
3507 {
3510  value.SetCsch();
3511  return value;
3512 }
3513 
3515 {
3516  CheckSelected(e_Coth);
3517  return *static_cast<const TCoth*>(m_object);
3518 }
3519 
3521 {
3524  value.SetCoth();
3525  return value;
3526 }
3527 
3529 {
3530  CheckSelected(e_Arcsin);
3531  return *static_cast<const TArcsin*>(m_object);
3532 }
3533 
3535 {
3538  value.SetArcsin();
3539  return value;
3540 }
3541 
3543 {
3544  CheckSelected(e_Arccos);
3545  return *static_cast<const TArccos*>(m_object);
3546 }
3547 
3549 {
3552  value.SetArccos();
3553  return value;
3554 }
3555 
3557 {
3558  CheckSelected(e_Arctan);
3559  return *static_cast<const TArctan*>(m_object);
3560 }
3561 
3563 {
3566  value.SetArctan();
3567  return value;
3568 }
3569 
3571 {
3572  CheckSelected(e_Arccosh);
3573  return *static_cast<const TArccosh*>(m_object);
3574 }
3575 
3577 {
3580  value.SetArccosh();
3581  return value;
3582 }
3583 
3585 {
3586  CheckSelected(e_Arccot);
3587  return *static_cast<const TArccot*>(m_object);
3588 }
3589 
3591 {
3594  value.SetArccot();
3595  return value;
3596 }
3597 
3599 {
3600  CheckSelected(e_Arccoth);
3601  return *static_cast<const TArccoth*>(m_object);
3602 }
3603 
3605 {
3608  value.SetArccoth();
3609  return value;
3610 }
3611 
3613 {
3614  CheckSelected(e_Arccsc);
3615  return *static_cast<const TArccsc*>(m_object);
3616 }
3617 
3619 {
3622  value.SetArccsc();
3623  return value;
3624 }
3625 
3627 {
3628  CheckSelected(e_Arccsch);
3629  return *static_cast<const TArccsch*>(m_object);
3630 }
3631 
3633 {
3636  value.SetArccsch();
3637  return value;
3638 }
3639 
3641 {
3642  CheckSelected(e_Arcsec);
3643  return *static_cast<const TArcsec*>(m_object);
3644 }
3645 
3647 {
3650  value.SetArcsec();
3651  return value;
3652 }
3653 
3655 {
3656  CheckSelected(e_Arcsech);
3657  return *static_cast<const TArcsech*>(m_object);
3658 }
3659 
3661 {
3664  value.SetArcsech();
3665  return value;
3666 }
3667 
3669 {
3670  CheckSelected(e_Arcsinh);
3671  return *static_cast<const TArcsinh*>(m_object);
3672 }
3673 
3675 {
3678  value.SetArcsinh();
3679  return value;
3680 }
3681 
3683 {
3684  CheckSelected(e_Arctanh);
3685  return *static_cast<const TArctanh*>(m_object);
3686 }
3687 
3689 {
3692  value.SetArctanh();
3693  return value;
3694 }
3695 
3696 // helper methods
3697 
3698 // type info
3700 {
3701  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.unary-elementary", "mmlclass");
3702  SET_CHOICE_MODULE("pubmed_mathml3");
3703  ADD_NAMED_REF_CHOICE_VARIANT("sin", m_object, CSin)->SetNsQualified(true);
3704  ADD_NAMED_REF_CHOICE_VARIANT("cos", m_object, CCos)->SetNsQualified(true);
3705  ADD_NAMED_REF_CHOICE_VARIANT("tan", m_object, CTan)->SetNsQualified(true);
3706  ADD_NAMED_REF_CHOICE_VARIANT("sec", m_object, CSec)->SetNsQualified(true);
3707  ADD_NAMED_REF_CHOICE_VARIANT("csc", m_object, CCsc)->SetNsQualified(true);
3708  ADD_NAMED_REF_CHOICE_VARIANT("cot", m_object, CCot)->SetNsQualified(true);
3709  ADD_NAMED_REF_CHOICE_VARIANT("sinh", m_object, CSinh)->SetNsQualified(true);
3710  ADD_NAMED_REF_CHOICE_VARIANT("cosh", m_object, CCosh)->SetNsQualified(true);
3711  ADD_NAMED_REF_CHOICE_VARIANT("tanh", m_object, CTanh)->SetNsQualified(true);
3712  ADD_NAMED_REF_CHOICE_VARIANT("sech", m_object, CSech)->SetNsQualified(true);
3713  ADD_NAMED_REF_CHOICE_VARIANT("csch", m_object, CCsch)->SetNsQualified(true);
3714  ADD_NAMED_REF_CHOICE_VARIANT("coth", m_object, CCoth)->SetNsQualified(true);
3715  ADD_NAMED_REF_CHOICE_VARIANT("arcsin", m_object, CArcsin)->SetNsQualified(true);
3716  ADD_NAMED_REF_CHOICE_VARIANT("arccos", m_object, CArccos)->SetNsQualified(true);
3717  ADD_NAMED_REF_CHOICE_VARIANT("arctan", m_object, CArctan)->SetNsQualified(true);
3718  ADD_NAMED_REF_CHOICE_VARIANT("arccosh", m_object, CArccosh)->SetNsQualified(true);
3719  ADD_NAMED_REF_CHOICE_VARIANT("arccot", m_object, CArccot)->SetNsQualified(true);
3720  ADD_NAMED_REF_CHOICE_VARIANT("arccoth", m_object, CArccoth)->SetNsQualified(true);
3721  ADD_NAMED_REF_CHOICE_VARIANT("arccsc", m_object, CArccsc)->SetNsQualified(true);
3722  ADD_NAMED_REF_CHOICE_VARIANT("arccsch", m_object, CArccsch)->SetNsQualified(true);
3723  ADD_NAMED_REF_CHOICE_VARIANT("arcsec", m_object, CArcsec)->SetNsQualified(true);
3724  ADD_NAMED_REF_CHOICE_VARIANT("arcsech", m_object, CArcsech)->SetNsQualified(true);
3725  ADD_NAMED_REF_CHOICE_VARIANT("arcsinh", m_object, CArcsinh)->SetNsQualified(true);
3726  ADD_NAMED_REF_CHOICE_VARIANT("arctanh", m_object, CArctanh)->SetNsQualified(true);
3727  info->CodeVersion(22400);
3728  info->DataSpec(ncbi::EDataSpec::eXSD);
3729 }
3731 
3732 // constructor
3734  : m_choice(e_not_set)
3735 {
3736 }
3737 
3738 // destructor
3740 {
3741  Reset();
3742 }
3743 
3744 
3746 {
3747  if ( m_choice != e_not_set )
3748  ResetSelection();
3749 }
3750 
3752 {
3753  switch ( m_choice ) {
3754  case e_Mean:
3755  case e_Sdev:
3756  case e_Variance:
3757  case e_Median:
3758  case e_Mode:
3759  m_object->RemoveReference();
3760  break;
3761  default:
3762  break;
3763  }
3764  m_choice = e_not_set;
3765 }
3766 
3768 {
3769  switch ( index ) {
3770  case e_Mean:
3771  (m_object = new(pool) ncbi::objects::CMean())->AddReference();
3772  break;
3773  case e_Sdev:
3774  (m_object = new(pool) ncbi::objects::CSdev())->AddReference();
3775  break;
3776  case e_Variance:
3777  (m_object = new(pool) ncbi::objects::CVariance())->AddReference();
3778  break;
3779  case e_Median:
3780  (m_object = new(pool) ncbi::objects::CMedian())->AddReference();
3781  break;
3782  case e_Mode:
3783  (m_object = new(pool) ncbi::objects::CMode())->AddReference();
3784  break;
3785  default:
3786  break;
3787  }
3788  m_choice = index;
3789 }
3790 
3792  "not set",
3793  "mean",
3794  "sdev",
3795  "variance",
3796  "median",
3797  "mode"
3798 };
3799 
3801 {
3802  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
3803 }
3804 
3806 {
3807  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
3808 }
3809 
3811 {
3812  CheckSelected(e_Mean);
3813  return *static_cast<const TMean*>(m_object);
3814 }
3815 
3817 {
3820  value.SetMean();
3821  return value;
3822 }
3823 
3825 {
3826  CheckSelected(e_Sdev);
3827  return *static_cast<const TSdev*>(m_object);
3828 }
3829 
3831 {
3834  value.SetSdev();
3835  return value;
3836 }
3837 
3839 {
3840  CheckSelected(e_Variance);
3841  return *static_cast<const TVariance*>(m_object);
3842 }
3843 
3845 {
3848  value.SetVariance();
3849  return value;
3850 }
3851 
3853 {
3854  CheckSelected(e_Median);
3855  return *static_cast<const TMedian*>(m_object);
3856 }
3857 
3859 {
3862  value.SetMedian();
3863  return value;
3864 }
3865 
3867 {
3868  CheckSelected(e_Mode);
3869  return *static_cast<const TMode*>(m_object);
3870 }
3871 
3873 {
3876  value.SetMode();
3877  return value;
3878 }
3879 
3880 // helper methods
3881 
3882 // type info
3884 {
3885  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-stats", "mmlclass");
3886  SET_CHOICE_MODULE("pubmed_mathml3");
3887  ADD_NAMED_REF_CHOICE_VARIANT("mean", m_object, CMean)->SetNsQualified(true);
3888  ADD_NAMED_REF_CHOICE_VARIANT("sdev", m_object, CSdev)->SetNsQualified(true);
3889  ADD_NAMED_REF_CHOICE_VARIANT("variance", m_object, CVariance)->SetNsQualified(true);
3890  ADD_NAMED_REF_CHOICE_VARIANT("median", m_object, CMedian)->SetNsQualified(true);
3891  ADD_NAMED_REF_CHOICE_VARIANT("mode", m_object, CMode)->SetNsQualified(true);
3892  info->CodeVersion(22400);
3893  info->DataSpec(ncbi::EDataSpec::eXSD);
3894 }
3896 
3897 // constructor
3899  : m_choice(e_not_set)
3900 {
3901 }
3902 
3903 // destructor
3905 {
3906  Reset();
3907 }
3908 
3909 
3911 {
3912  if ( m_choice != e_not_set )
3913  ResetSelection();
3914 }
3915 
3917 {
3918  switch ( m_choice ) {
3919  case e_Vector:
3920  case e_Matrix:
3921  case e_Matrixrow:
3922  m_object->RemoveReference();
3923  break;
3924  default:
3925  break;
3926  }
3927  m_choice = e_not_set;
3928 }
3929 
3931 {
3932  switch ( index ) {
3933  case e_Vector:
3934  (m_object = new(pool) ncbi::objects::CVector())->AddReference();
3935  break;
3936  case e_Matrix:
3937  (m_object = new(pool) ncbi::objects::CMatrix())->AddReference();
3938  break;
3939  case e_Matrixrow:
3940  (m_object = new(pool) ncbi::objects::CMatrixrow())->AddReference();
3941  break;
3942  default:
3943  break;
3944  }
3945  m_choice = index;
3946 }
3947 
3949  "not set",
3950  "vector",
3951  "matrix",
3952  "matrixrow"
3953 };
3954 
3956 {
3957  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
3958 }
3959 
3961 {
3962  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
3963 }
3964 
3966 {
3967  CheckSelected(e_Vector);
3968  return *static_cast<const TVector*>(m_object);
3969 }
3970 
3972 {
3974  return *static_cast<TVector*>(m_object);
3975 }
3976 
3978 {
3979  TVector* ptr = &value;
3980  if ( m_choice != e_Vector || m_object != ptr ) {
3981  ResetSelection();
3982  (m_object = ptr)->AddReference();
3983  m_choice = e_Vector;
3984  }
3985 }
3986 
3988 {
3989  CheckSelected(e_Matrix);
3990  return *static_cast<const TMatrix*>(m_object);
3991 }
3992 
3994 {
3996  return *static_cast<TMatrix*>(m_object);
3997 }
3998 
4000 {
4001  TMatrix* ptr = &value;
4002  if ( m_choice != e_Matrix || m_object != ptr ) {
4003  ResetSelection();
4004  (m_object = ptr)->AddReference();
4005  m_choice = e_Matrix;
4006  }
4007 }
4008 
4010 {
4011  CheckSelected(e_Matrixrow);
4012  return *static_cast<const TMatrixrow*>(m_object);
4013 }
4014 
4016 {
4018  return *static_cast<TMatrixrow*>(m_object);
4019 }
4020 
4022 {
4023  TMatrixrow* ptr = &value;
4024  if ( m_choice != e_Matrixrow || m_object != ptr ) {
4025  ResetSelection();
4026  (m_object = ptr)->AddReference();
4027  m_choice = e_Matrixrow;
4028  }
4029 }
4030 
4031 // helper methods
4032 
4033 // type info
4035 {
4036  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-constructor", "mmlclass");
4037  SET_CHOICE_MODULE("pubmed_mathml3");
4038  ADD_NAMED_REF_CHOICE_VARIANT("vector", m_object, CVector)->SetNsQualified(true);
4039  ADD_NAMED_REF_CHOICE_VARIANT("matrix", m_object, CMatrix)->SetNsQualified(true);
4040  ADD_NAMED_REF_CHOICE_VARIANT("matrixrow", m_object, CMatrixrow)->SetNsQualified(true);
4041  info->CodeVersion(22400);
4042  info->DataSpec(ncbi::EDataSpec::eXSD);
4043 }
4045 
4046 // constructor
4048  : m_choice(e_not_set)
4049 {
4050 }
4051 
4052 // destructor
4054 {
4055  Reset();
4056 }
4057 
4058 
4060 {
4061  if ( m_choice != e_not_set )
4062  ResetSelection();
4063 }
4064 
4066 {
4067  switch ( m_choice ) {
4068  case e_Determinant:
4069  case e_Transpose:
4070  m_object->RemoveReference();
4071  break;
4072  default:
4073  break;
4074  }
4075  m_choice = e_not_set;
4076 }
4077 
4079 {
4080  switch ( index ) {
4081  case e_Determinant:
4082  (m_object = new(pool) ncbi::objects::CDeterminant())->AddReference();
4083  break;
4084  case e_Transpose:
4085  (m_object = new(pool) ncbi::objects::CTranspose())->AddReference();
4086  break;
4087  default:
4088  break;
4089  }
4090  m_choice = index;
4091 }
4092 
4094  "not set",
4095  "determinant",
4096  "transpose"
4097 };
4098 
4100 {
4101  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
4102 }
4103 
4105 {
4106  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
4107 }
4108 
4110 {
4111  CheckSelected(e_Determinant);
4112  return *static_cast<const TDeterminant*>(m_object);
4113 }
4114 
4116 {
4117  Select(e_Determinant, NCBI_NS_NCBI::eDoNotResetVariant);
4119  value.SetDeterminant();
4120  return value;
4121 }
4122 
4124 {
4125  CheckSelected(e_Transpose);
4126  return *static_cast<const TTranspose*>(m_object);
4127 }
4128 
4130 {
4133  value.SetTranspose();
4134  return value;
4135 }
4136 
4137 // helper methods
4138 
4139 // type info
4141 {
4142  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.unary-linalg", "mmlclass");
4143  SET_CHOICE_MODULE("pubmed_mathml3");
4144  ADD_NAMED_REF_CHOICE_VARIANT("determinant", m_object, CDeterminant)->SetNsQualified(true);
4145  ADD_NAMED_REF_CHOICE_VARIANT("transpose", m_object, CTranspose)->SetNsQualified(true);
4146  info->CodeVersion(22400);
4147  info->DataSpec(ncbi::EDataSpec::eXSD);
4148 }
4150 
4151 // constructor
4153  : m_choice(e_not_set)
4154 {
4155 }
4156 
4157 // destructor
4159 {
4160  Reset();
4161 }
4162 
4163 
4165 {
4166  return m_Selector ? m_Selector->IsSetSelector() : false;
4167 }
4168 
4170 {
4171  if ( !m_Selector ) {
4172  m_Selector.Reset(new TSelector());
4173  return;
4174  }
4175  (*m_Selector).Reset();
4176 }
4177 
4179 {
4180  m_Selector.Reset(&value);
4181 }
4182 
4184 {
4185  if ( !m_Selector ) {
4186  ResetSelector();
4187  }
4188  m_Selector->SetSelector();
4189  return (*m_Selector);
4190 }
4191 
4193 {
4194  ResetSelector();
4195 }
4196 
4198 {
4199  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.nary-linalg", "mmlclass");
4200  SET_CLASS_MODULE("pubmed_mathml3");
4201  ADD_NAMED_REF_MEMBER("selector", m_Selector, CSelector)->SetNsQualified(true);
4202  info->RandomOrder();
4203  info->CodeVersion(22400);
4204  info->DataSpec(ncbi::EDataSpec::eXSD);
4205 }
4207 
4208 // constructor
4210 {
4211  memset(m_set_State,0,sizeof(m_set_State));
4212  if ( !IsAllocatedInPool() ) {
4213  ResetSelector();
4214  }
4215 }
4216 
4217 // destructor
4219 {
4220 }
4221 
4222 
4224 {
4225  if ( m_choice != e_not_set )
4226  ResetSelection();
4227 }
4228 
4230 {
4231  switch ( m_choice ) {
4232  case e_Vectorproduct:
4233  case e_Scalarproduct:
4234  case e_Outerproduct:
4235  m_object->RemoveReference();
4236  break;
4237  default:
4238  break;
4239  }
4240  m_choice = e_not_set;
4241 }
4242 
4244 {
4245  switch ( index ) {
4246  case e_Vectorproduct:
4247  (m_object = new(pool) ncbi::objects::CVectorproduct())->AddReference();
4248  break;
4249  case e_Scalarproduct:
4250  (m_object = new(pool) ncbi::objects::CScalarproduct())->AddReference();
4251  break;
4252  case e_Outerproduct:
4253  (m_object = new(pool) ncbi::objects::COuterproduct())->AddReference();
4254  break;
4255  default:
4256  break;
4257  }
4258  m_choice = index;
4259 }
4260 
4262  "not set",
4263  "vectorproduct",
4264  "scalarproduct",
4265  "outerproduct"
4266 };
4267 
4269 {
4270  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
4271 }
4272 
4274 {
4275  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
4276 }
4277 
4279 {
4280  CheckSelected(e_Vectorproduct);
4281  return *static_cast<const TVectorproduct*>(m_object);
4282 }
4283 
4285 {
4286  Select(e_Vectorproduct, NCBI_NS_NCBI::eDoNotResetVariant);
4288  value.SetVectorproduct();
4289  return value;
4290 }
4291 
4293 {
4294  CheckSelected(e_Scalarproduct);
4295  return *static_cast<const TScalarproduct*>(m_object);
4296 }
4297 
4299 {
4300  Select(e_Scalarproduct, NCBI_NS_NCBI::eDoNotResetVariant);
4302  value.SetScalarproduct();
4303  return value;
4304 }
4305 
4307 {
4308  CheckSelected(e_Outerproduct);
4309  return *static_cast<const TOuterproduct*>(m_object);
4310 }
4311 
4313 {
4314  Select(e_Outerproduct, NCBI_NS_NCBI::eDoNotResetVariant);
4316  value.SetOuterproduct();
4317  return value;
4318 }
4319 
4320 // helper methods
4321 
4322 // type info
4324 {
4325  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.binary-linalg", "mmlclass");
4326  SET_CHOICE_MODULE("pubmed_mathml3");
4327  ADD_NAMED_REF_CHOICE_VARIANT("vectorproduct", m_object, CVectorproduct)->SetNsQualified(true);
4328  ADD_NAMED_REF_CHOICE_VARIANT("scalarproduct", m_object, CScalarproduct)->SetNsQualified(true);
4329  ADD_NAMED_REF_CHOICE_VARIANT("outerproduct", m_object, COuterproduct)->SetNsQualified(true);
4330  info->CodeVersion(22400);
4331  info->DataSpec(ncbi::EDataSpec::eXSD);
4332 }
4334 
4335 // constructor
4337  : m_choice(e_not_set)
4338 {
4339 }
4340 
4341 // destructor
4343 {
4344  Reset();
4345 }
4346 
4347 
4349 {
4350  if ( m_choice != e_not_set )
4351  ResetSelection();
4352 }
4353 
4355 {
4356  switch ( m_choice ) {
4357  case e_Integers:
4358  case e_Reals:
4359  case e_Rationals:
4360  case e_Naturalnumbers:
4361  case e_Complexes:
4362  case e_Primes:
4363  case e_Emptyset:
4364  m_object->RemoveReference();
4365  break;
4366  default:
4367  break;
4368  }
4369  m_choice = e_not_set;
4370 }
4371 
4373 {
4374  switch ( index ) {
4375  case e_Integers:
4376  (m_object = new(pool) ncbi::objects::CIntegers())->AddReference();
4377  break;
4378  case e_Reals:
4379  (m_object = new(pool) ncbi::objects::CReals())->AddReference();
4380  break;
4381  case e_Rationals:
4382  (m_object = new(pool) ncbi::objects::CRationals())->AddReference();
4383  break;
4384  case e_Naturalnumbers:
4385  (m_object = new(pool) ncbi::objects::CNaturalnumbers())->AddReference();
4386  break;
4387  case e_Complexes:
4388  (m_object = new(pool) ncbi::objects::CComplexes())->AddReference();
4389  break;
4390  case e_Primes:
4391  (m_object = new(pool) ncbi::objects::CPrimes())->AddReference();
4392  break;
4393  case e_Emptyset:
4394  (m_object = new(pool) ncbi::objects::CEmptyset())->AddReference();
4395  break;
4396  default:
4397  break;
4398  }
4399  m_choice = index;
4400 }
4401 
4403  "not set",
4404  "integers",
4405  "reals",
4406  "rationals",
4407  "naturalnumbers",
4408  "complexes",
4409  "primes",
4410  "emptyset"
4411 };
4412 
4414 {
4415  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
4416 }
4417 
4419 {
4420  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
4421 }
4422 
4424 {
4425  CheckSelected(e_Integers);
4426  return *static_cast<const TIntegers*>(m_object);
4427 }
4428 
4430 {
4433  value.SetIntegers();
4434  return value;
4435 }
4436 
4438 {
4439  CheckSelected(e_Reals);
4440  return *static_cast<const TReals*>(m_object);
4441 }
4442 
4444 {
4447  value.SetReals();
4448  return value;
4449 }
4450 
4452 {
4453  CheckSelected(e_Rationals);
4454  return *static_cast<const TRationals*>(m_object);
4455 }
4456 
4458 {
4461  value.SetRationals();
4462  return value;
4463 }
4464 
4466 {
4467  CheckSelected(e_Naturalnumbers);
4468  return *static_cast<const TNaturalnumbers*>(m_object);
4469 }
4470 
4472 {
4473  Select(e_Naturalnumbers, NCBI_NS_NCBI::eDoNotResetVariant);
4475  value.SetNaturalnumbers();
4476  return value;
4477 }
4478 
4480 {
4481  CheckSelected(e_Complexes);
4482  return *static_cast<const TComplexes*>(m_object);
4483 }
4484 
4486 {
4489  value.SetComplexes();
4490  return value;
4491 }
4492 
4494 {
4495  CheckSelected(e_Primes);
4496  return *static_cast<const TPrimes*>(m_object);
4497 }
4498 
4500 {
4503  value.SetPrimes();
4504  return value;
4505 }
4506 
4508 {
4509  CheckSelected(e_Emptyset);
4510  return *static_cast<const TEmptyset*>(m_object);
4511 }
4512 
4514 {
4517  value.SetEmptyset();
4518  return value;
4519 }
4520 
4521 // helper methods
4522 
4523 // type info
4525 {
4526  SET_INTERNAL_NAME("MultiScriptExpression.MN.MathExpression.ContExp.constant-set", "mmlclass");
4527  SET_CHOICE_MODULE("pubmed_mathml3");
4528  ADD_NAMED_REF_CHOICE_VARIANT("integers", m_object, CIntegers)->SetNsQualified(true);
4529  ADD_NAMED_REF_CHOICE_VARIANT("reals", m_object, CReals)->SetNsQualified(true);
4530  ADD_NAMED_REF_CHOICE_VARIANT("rationals", m_object, CRationals)->SetNsQualified(true);
4531  ADD_NAMED_REF_CHOICE_VARIANT("naturalnumbers", m_object, CNaturalnumbers)->SetNsQualified(true);
4532  ADD_NAMED_REF_CHOICE_VARIANT("complexes", m_object, CComplexes)->SetNsQualified(true);
4533  ADD_NAMED_REF_CHOICE_VARIANT("primes", m_object, CPrimes)->SetNsQualified(true);
4534  ADD_NAMED_REF_CHOICE_VARIANT("emptyset", m_object, CEmptyset)->SetNsQualified(true);
4535  info->CodeVersion(22400);
4536  info->DataSpec(ncbi::EDataSpec::eXSD);
4537 }
4539 
4540 // constructor
4542  : m_choice(e_not_set)
4543 {
4544 }
4545 
4546 // destructor
4548 {
4549  Reset();
4550 }
4551 
4552 
4554 {
4555  if ( m_choice != e_not_set )
4556  ResetSelection();
4557 }
4558 
4560 {
4561  switch ( m_choice ) {
4562  case e_Exponentiale:
4563  case e_Imaginaryi:
4564  case e_Notanumber:
4565  case e_True:
4566  case e_False:
4567  case e_Pi:
4568  case e_Eulergamma:
4569  case e_Infinity:
4570  m_object->RemoveReference();
4571  break;
4572  default:
4573  break;
4574  }
4575  m_choice = e_not_set;
4576 }
4577 
4579 {
4580  switch ( index ) {
4581  case e_Exponentiale:
4582  (m_object = new(pool) ncbi::objects::CExponentiale())->AddReference();
4583  break;
4584  case e_Imaginaryi:
4585  (m_object = new(pool) ncbi::objects::CImaginaryi())->AddReference();
4586  break;
4587  case e_Notanumber:
4588  (m_object = new(pool) ncbi::objects::CNotanumber())->AddReference();
4589  break;
4590  case e_True:
4591  (m_object = new(pool) ncbi::objects::CTrue())->AddReference();
4592  break;
4593  case e_False:
4594  (m_object = new(pool) ncbi::objects::CFalse())->AddReference();
4595  break;
4596  case e_Pi:
4597  (m_object = new(pool) ncbi::objects::CPi())->AddReference();
4598  break;
4599  case e_Eulergamma:
4600  (m_object = new(pool) ncbi::objects::CEulergamma())->AddReference();
4601  break;
4602  case e_Infinity:
4603  (m_object = new(pool) ncbi::objects::CInfinity())->AddReference();
4604  break;
4605  default:
4606  break;
4607  }
4608  m_choice = index;
4609 }
4610 
4612  "not set",
4613  "exponentiale",
4614  "imaginaryi",
4615  "notanumber",
4616  "true",
4617  "false",
4618  "pi",
4619  "eulergamma",
4620  "infinity"
4621 };
4622