1 //------------------------------------------------------------------------------ 2 // <auto-generated /> 3 // 4 // This file was automatically generated by SWIG (http://www.swig.org). 5 // Version 4.0.2 6 // 7 // Do not make changes to this file unless you know what you are doing--modify 8 // the SWIG interface file instead. 9 //------------------------------------------------------------------------------ 10 11 namespace libsbml { 12 13 using System; 14 using System.Runtime.InteropServices; 15 16 /** 17 * @sbmlpackage{core} 18 * 19 @htmlinclude pkg-marker-core.html MIRIAM-compliant data about a model's creator. 20 * 21 * @htmlinclude not-sbml-warning.html 22 * 23 * The SBML specification beginning with Level 2 Version 2 24 * defines a standard approach to recording model history and model creator 25 * information in a form that complies with MIRIAM ('Minimum Information 26 * Requested in the Annotation of biochemical Models', <i>Nature 27 * Biotechnology</i>, vol. 23, no. 12, Dec. 2005). For the model creator, 28 * this form involves the use of parts of the <a target='_blank' 29 * href='http://en.wikipedia.org/wiki/VCard'>vCard</a> representation. 30 * LibSBML provides the ModelCreator class as a convenience high-level 31 * interface for working with model creator data. Objects of class 32 * ModelCreator can be used to store and carry around creator data within a 33 * program, and the various methods in this object class let callers 34 * manipulate the different parts of the model creator representation. 35 * 36 * @section parts The different parts of a model creator definition 37 * 38 * The ModelCreator class mirrors the structure of the MIRIAM model creator 39 * annotations in SBML. The following template illustrates these different 40 * fields when they are written in XML form: 41 * 42 <pre class='fragment'> 43 <vCard:N rdf:parseType='Resource'> 44 <vCard:Family><span style='background-color: #bbb'>family name</span></vCard:Family> 45 <vCard:Given><span style='background-color: #bbb'>given name</span></vCard:Given> 46 </vCard:N> 47 ... 48 <vCard:EMAIL><span style='background-color: #bbb'>email address</span></vCard:EMAIL> 49 ... 50 <vCard:ORG rdf:parseType='Resource'> 51 <vCard:Orgname><span style='background-color: #bbb'>organization</span></vCard:Orgname> 52 </vCard:ORG> 53 </pre> 54 * 55 * Each of the separate data values 56 * <span class='code' style='background-color: #bbb'>family name</span>, 57 * <span class='code' style='background-color: #bbb'>given name</span>, 58 * <span class='code' style='background-color: #bbb'>email address</span>, and 59 * <span class='code' style='background-color: #bbb'>organization</span> can 60 * be set and retrieved via corresponding methods in the ModelCreator 61 * class. These methods are documented in more detail below. 62 * 63 * 64 */ 65 66 public class ModelCreator : global::System.IDisposable { 67 private HandleRef swigCPtr; 68 protected bool swigCMemOwn; 69 ModelCreator(IntPtr cPtr, bool cMemoryOwn)70 internal ModelCreator(IntPtr cPtr, bool cMemoryOwn) 71 { 72 swigCMemOwn = cMemoryOwn; 73 swigCPtr = new HandleRef(this, cPtr); 74 } 75 getCPtr(ModelCreator obj)76 internal static HandleRef getCPtr(ModelCreator obj) 77 { 78 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; 79 } 80 getCPtrAndDisown(ModelCreator obj)81 internal static HandleRef getCPtrAndDisown (ModelCreator obj) 82 { 83 HandleRef ptr = new HandleRef(null, IntPtr.Zero); 84 85 if (obj != null) 86 { 87 ptr = obj.swigCPtr; 88 obj.swigCMemOwn = false; 89 } 90 91 return ptr; 92 } 93 ~ModelCreator()94 ~ModelCreator() { 95 Dispose(false); 96 } 97 Dispose()98 public void Dispose() { 99 Dispose(true); 100 global::System.GC.SuppressFinalize(this); 101 } 102 Dispose(bool disposing)103 protected virtual void Dispose(bool disposing) { 104 lock(this) { 105 if (swigCPtr.Handle != global::System.IntPtr.Zero) { 106 if (swigCMemOwn) { 107 swigCMemOwn = false; 108 libsbmlPINVOKE.delete_ModelCreator(swigCPtr); 109 } 110 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 111 } 112 } 113 } 114 operator ==(ModelCreator lhs, ModelCreator rhs)115 public static bool operator==(ModelCreator lhs, ModelCreator rhs) 116 { 117 if((Object)lhs == (Object)rhs) 118 { 119 return true; 120 } 121 122 if( ((Object)lhs == null) || ((Object)rhs == null) ) 123 { 124 return false; 125 } 126 127 return (getCPtr(lhs).Handle.ToString() == getCPtr(rhs).Handle.ToString()); 128 } 129 operator !=(ModelCreator lhs, ModelCreator rhs)130 public static bool operator!=(ModelCreator lhs, ModelCreator rhs) 131 { 132 return !(lhs == rhs); 133 } 134 Equals(Object sb)135 public override bool Equals(Object sb) 136 { 137 if ( ! (sb is ModelCreator) ) 138 { 139 return false; 140 } 141 142 return this == (ModelCreator)sb; 143 } 144 GetHashCode()145 public override int GetHashCode() 146 { 147 return swigCPtr.Handle.ToInt32(); 148 } 149 150 151 /** 152 * Creates a new ModelCreator object. 153 */ public ModelCreator()154 ModelCreator() : this(libsbmlPINVOKE.new_ModelCreator__SWIG_0(), true) { 155 } 156 157 158 /** 159 * Creates a new ModelCreator from an XMLNode. 160 * 161 * @param creator the XMLNode from which to create the ModelCreator. 162 */ public ModelCreator(XMLNode creator)163 ModelCreator(XMLNode creator) : this(libsbmlPINVOKE.new_ModelCreator__SWIG_1(XMLNode.getCPtr(creator)), true) { 164 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 165 } 166 167 168 /** 169 * Copy constructor; creates a copy of the ModelCreator. 170 * 171 * @param orig the object to copy. 172 */ public ModelCreator(ModelCreator orig)173 ModelCreator(ModelCreator orig) : this(libsbmlPINVOKE.new_ModelCreator__SWIG_2(ModelCreator.getCPtr(orig)), true) { 174 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 175 } 176 177 178 /** 179 * Creates and returns a deep copy of this ModelCreator object. 180 * 181 * @return the (deep) copy of this ModelCreator object. 182 */ public clone()183 ModelCreator clone() { 184 global::System.IntPtr cPtr = libsbmlPINVOKE.ModelCreator_clone(swigCPtr); 185 ModelCreator ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModelCreator(cPtr, true); 186 return ret; 187 } 188 189 190 /** 191 * Returns the 'family name' stored in this ModelCreator object. 192 * 193 * @return the 'family name' portion of the ModelCreator object. 194 */ public getFamilyName()195 string getFamilyName() { 196 string ret = libsbmlPINVOKE.ModelCreator_getFamilyName(swigCPtr); 197 return ret; 198 } 199 200 201 /** 202 * Returns the 'given name' stored in this ModelCreator object. 203 * 204 * @return the 'given name' portion of the ModelCreator object. 205 */ public getGivenName()206 string getGivenName() { 207 string ret = libsbmlPINVOKE.ModelCreator_getGivenName(swigCPtr); 208 return ret; 209 } 210 211 212 /** 213 * Returns the 'email' stored in this ModelCreator object. 214 * 215 * @return email from the ModelCreator. 216 */ public getEmail()217 string getEmail() { 218 string ret = libsbmlPINVOKE.ModelCreator_getEmail(swigCPtr); 219 return ret; 220 } 221 222 223 /** 224 * Returns the 'organization' stored in this ModelCreator object. 225 * 226 * @return organization from the ModelCreator. 227 */ public getOrganization()228 string getOrganization() { 229 string ret = libsbmlPINVOKE.ModelCreator_getOrganization(swigCPtr); 230 return ret; 231 } 232 233 234 /** 235 * (Alternate spelling) Returns the 'organization' stored in this 236 * ModelCreator object. 237 * 238 * @note This function is an alias of getOrganization(). 239 * 240 * @return organization from the ModelCreator. 241 * 242 * @see getOrganization() 243 */ public getOrganisation()244 string getOrganisation() { 245 string ret = libsbmlPINVOKE.ModelCreator_getOrganisation(swigCPtr); 246 return ret; 247 } 248 249 250 /** 251 * Returns the 'fn' stored in this ModelCreator object when using vCard4. 252 * 253 * @return the 'fn' portion of the ModelCreator object. 254 */ public getName()255 string getName() { 256 string ret = libsbmlPINVOKE.ModelCreator_getName(swigCPtr); 257 return ret; 258 } 259 260 261 /** 262 * Predicate returning @c true or @c false depending on whether this 263 * ModelCreator's 'family name' part is set. 264 * 265 * @return @c true if the familyName of this ModelCreator is set, @c false otherwise. 266 */ public isSetFamilyName()267 bool isSetFamilyName() { 268 bool ret = libsbmlPINVOKE.ModelCreator_isSetFamilyName(swigCPtr); 269 return ret; 270 } 271 272 273 /** 274 * Predicate returning @c true or @c false depending on whether this 275 * ModelCreator's 'given name' part is set. 276 * 277 * @return @c true if the givenName of this ModelCreator is set, @c false otherwise. 278 */ public isSetGivenName()279 bool isSetGivenName() { 280 bool ret = libsbmlPINVOKE.ModelCreator_isSetGivenName(swigCPtr); 281 return ret; 282 } 283 284 285 /** 286 * Predicate returning @c true or @c false depending on whether this 287 * ModelCreator's 'email' part is set. 288 * 289 * @return @c true if the email of this ModelCreator is set, @c false otherwise. 290 */ public isSetEmail()291 bool isSetEmail() { 292 bool ret = libsbmlPINVOKE.ModelCreator_isSetEmail(swigCPtr); 293 return ret; 294 } 295 296 297 /** 298 * Predicate returning @c true or @c false depending on whether this 299 * ModelCreator's 'organization' part is set. 300 * 301 * @return @c true if the organization of this ModelCreator is set, @c false otherwise. 302 */ public isSetOrganization()303 bool isSetOrganization() { 304 bool ret = libsbmlPINVOKE.ModelCreator_isSetOrganization(swigCPtr); 305 return ret; 306 } 307 308 309 /** 310 * (Alternate spelling) Predicate returning @c true or @c false depending 311 * on whether this ModelCreator's 'organization' part is set. 312 * 313 * @note This function is an alias of isSetOrganization(). 314 * 315 * @return @c true if the organization of this ModelCreator is set, @c false otherwise. 316 * 317 * @see isSetOrganization() 318 */ public isSetOrganisation()319 bool isSetOrganisation() { 320 bool ret = libsbmlPINVOKE.ModelCreator_isSetOrganisation(swigCPtr); 321 return ret; 322 } 323 324 325 /** 326 * Predicate returning @c true or @c false depending on whether this 327 * ModelCreator's 'fn' part is set (when using vCard4). 328 * 329 * @return @c true if the fn of this ModelCreator is set, @c false otherwise. 330 */ public isSetName()331 bool isSetName() { 332 bool ret = libsbmlPINVOKE.ModelCreator_isSetName(swigCPtr); 333 return ret; 334 } 335 336 337 /** 338 * Sets the 'family name' portion of this ModelCreator object. 339 * 340 * @param familyName a string representing the familyName of the ModelCreator. 341 * 342 * 343 * @return integer value indicating success/failure of the 344 * function. @if clike The value is drawn from the 345 * enumeration #OperationReturnValues_t. @endif The possible values 346 * returned by this function are: 347 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 348 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 349 */ public setFamilyName(string familyName)350 int setFamilyName(string familyName) { 351 int ret = libsbmlPINVOKE.ModelCreator_setFamilyName(swigCPtr, familyName); 352 return ret; 353 } 354 355 356 /** 357 * Sets the 'given name' portion of this ModelCreator object. 358 * 359 * @param givenName a string representing the givenName of the ModelCreator. 360 * 361 * 362 * @return integer value indicating success/failure of the 363 * function. @if clike The value is drawn from the 364 * enumeration #OperationReturnValues_t. @endif The possible values 365 * returned by this function are: 366 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 367 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 368 */ public setGivenName(string givenName)369 int setGivenName(string givenName) { 370 int ret = libsbmlPINVOKE.ModelCreator_setGivenName(swigCPtr, givenName); 371 return ret; 372 } 373 374 375 /** 376 * Sets the 'email' portion of this ModelCreator object. 377 * 378 * @param email a string representing the email of the ModelCreator. 379 * 380 * 381 * @return integer value indicating success/failure of the 382 * function. @if clike The value is drawn from the 383 * enumeration #OperationReturnValues_t. @endif The possible values 384 * returned by this function are: 385 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 386 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 387 */ public setEmail(string email)388 int setEmail(string email) { 389 int ret = libsbmlPINVOKE.ModelCreator_setEmail(swigCPtr, email); 390 return ret; 391 } 392 393 394 /** 395 * Sets the 'organization' portion of this ModelCreator object. 396 * 397 * @param organization a string representing the organization of the 398 * ModelCreator. 399 * 400 * 401 * @return integer value indicating success/failure of the 402 * function. @if clike The value is drawn from the 403 * enumeration #OperationReturnValues_t. @endif The possible values 404 * returned by this function are: 405 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 406 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 407 */ public setOrganization(string organization)408 int setOrganization(string organization) { 409 int ret = libsbmlPINVOKE.ModelCreator_setOrganization(swigCPtr, organization); 410 return ret; 411 } 412 413 414 /** 415 * (Alternate spelling) Sets the 'organization' portion of this 416 * ModelCreator object. 417 * 418 * @param organization a string representing the organization of the 419 * ModelCreator. 420 * 421 * @note This function is an alias of setOrganization(string organization). 422 * 423 * 424 * @return integer value indicating success/failure of the 425 * function. @if clike The value is drawn from the 426 * enumeration #OperationReturnValues_t. @endif The possible values 427 * returned by this function are: 428 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 429 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 430 * 431 * @see setOrganization(string organization) 432 */ public setOrganisation(string organization)433 int setOrganisation(string organization) { 434 int ret = libsbmlPINVOKE.ModelCreator_setOrganisation(swigCPtr, organization); 435 return ret; 436 } 437 438 439 /** 440 * Sets the 'fn' portion of this ModelCreator object (when using vCard4). 441 * 442 * @param name a string representing the fn of the ModelCreator. 443 * 444 * 445 * @return integer value indicating success/failure of the 446 * function. @if clike The value is drawn from the 447 * enumeration #OperationReturnValues_t. @endif The possible values 448 * returned by this function are: 449 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 450 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 451 */ public setName(string name)452 int setName(string name) { 453 int ret = libsbmlPINVOKE.ModelCreator_setName(swigCPtr, name); 454 return ret; 455 } 456 457 458 /** 459 * Unsets the 'family name' portion of this ModelCreator object. 460 * 461 * 462 * @return integer value indicating success/failure of the 463 * function. @if clike The value is drawn from the 464 * enumeration #OperationReturnValues_t. @endif The possible values 465 * returned by this function are: 466 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 467 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 468 */ public unsetFamilyName()469 int unsetFamilyName() { 470 int ret = libsbmlPINVOKE.ModelCreator_unsetFamilyName(swigCPtr); 471 return ret; 472 } 473 474 475 /** 476 * Unsets the 'given name' portion of this ModelCreator object. 477 * 478 * 479 * @return integer value indicating success/failure of the 480 * function. @if clike The value is drawn from the 481 * enumeration #OperationReturnValues_t. @endif The possible values 482 * returned by this function are: 483 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 484 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 485 */ public unsetGivenName()486 int unsetGivenName() { 487 int ret = libsbmlPINVOKE.ModelCreator_unsetGivenName(swigCPtr); 488 return ret; 489 } 490 491 492 /** 493 * Unsets the 'email' portion of this ModelCreator object. 494 * 495 * 496 * @return integer value indicating success/failure of the 497 * function. @if clike The value is drawn from the 498 * enumeration #OperationReturnValues_t. @endif The possible values 499 * returned by this function are: 500 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 501 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 502 */ public unsetEmail()503 int unsetEmail() { 504 int ret = libsbmlPINVOKE.ModelCreator_unsetEmail(swigCPtr); 505 return ret; 506 } 507 508 509 /** 510 * Unsets the 'organization' portion of this ModelCreator object. 511 * 512 * 513 * @return integer value indicating success/failure of the 514 * function. @if clike The value is drawn from the 515 * enumeration #OperationReturnValues_t. @endif The possible values 516 * returned by this function are: 517 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 518 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 519 */ public unsetOrganization()520 int unsetOrganization() { 521 int ret = libsbmlPINVOKE.ModelCreator_unsetOrganization(swigCPtr); 522 return ret; 523 } 524 525 526 /** 527 * (Alternate spelling) Unsets the 'organization' portion of this ModelCreator object. 528 * 529 * @note This function is an alias of unsetOrganization(). 530 * 531 * 532 * @return integer value indicating success/failure of the 533 * function. @if clike The value is drawn from the 534 * enumeration #OperationReturnValues_t. @endif The possible values 535 * returned by this function are: 536 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 537 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 538 * 539 * @see unsetOrganization() 540 */ public unsetOrganisation()541 int unsetOrganisation() { 542 int ret = libsbmlPINVOKE.ModelCreator_unsetOrganisation(swigCPtr); 543 return ret; 544 } 545 546 547 /** 548 * Unsets the 'fn' portion of this ModelCreator object (when using vCard4). 549 * 550 * 551 * @return integer value indicating success/failure of the 552 * function. @if clike The value is drawn from the 553 * enumeration #OperationReturnValues_t. @endif The possible values 554 * returned by this function are: 555 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 556 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 557 */ public unsetName()558 int unsetName() { 559 int ret = libsbmlPINVOKE.ModelCreator_unsetName(swigCPtr); 560 return ret; 561 } 562 563 564 /** 565 * Predicate returning @c true if all the required elements for this 566 * ModelCreator object have been set. 567 * 568 * The only required elements for a ModelCreator object are the 'family 569 * name' and 'given name'. 570 * 571 * @return a boolean value indicating whether all the required 572 * elements for this object have been defined. 573 */ public hasRequiredAttributes()574 bool hasRequiredAttributes() { 575 bool ret = libsbmlPINVOKE.ModelCreator_hasRequiredAttributes(swigCPtr); 576 return ret; 577 } 578 579 580 /** */ /* libsbml-internal */ public hasBeenModified()581 bool hasBeenModified() { 582 bool ret = libsbmlPINVOKE.ModelCreator_hasBeenModified(swigCPtr); 583 return ret; 584 } 585 586 587 /** */ /* libsbml-internal */ public resetModifiedFlags()588 void resetModifiedFlags() { 589 libsbmlPINVOKE.ModelCreator_resetModifiedFlags(swigCPtr); 590 } 591 592 593 /** */ /* libsbml-internal */ public usingFNVcard4()594 bool usingFNVcard4() { 595 bool ret = libsbmlPINVOKE.ModelCreator_usingFNVcard4(swigCPtr); 596 return ret; 597 } 598 599 600 /** */ /* libsbml-internal */ public usingSingleName()601 bool usingSingleName() { 602 bool ret = libsbmlPINVOKE.ModelCreator_usingSingleName(swigCPtr); 603 return ret; 604 } 605 606 607 /** */ /* libsbml-internal */ public setUseSingleName(bool flag)608 void setUseSingleName(bool flag) { 609 libsbmlPINVOKE.ModelCreator_setUseSingleName(swigCPtr, flag); 610 } 611 612 } 613 614 } 615