------------------------------------------------------------------------------
| 31 | |
| 32 | //------------------------------------------------------------------------------ |
| 33 | void vtkInformationUnsignedLongKey::Set(vtkInformation* info, unsigned long value) |
| 34 | { |
| 35 | if (vtkInformationUnsignedLongValue* oldv = |
| 36 | static_cast<vtkInformationUnsignedLongValue*>(this->GetAsObjectBase(info))) |
| 37 | { |
| 38 | if (oldv->Value != value) |
| 39 | { |
| 40 | // Replace the existing value. |
| 41 | oldv->Value = value; |
| 42 | // Since this sets a value without call SetAsObjectBase(), |
| 43 | // the info has to be modified here (instead of |
| 44 | // vtkInformation::SetAsObjectBase() |
| 45 | info->Modified(this); |
| 46 | } |
| 47 | } |
| 48 | else |
| 49 | { |
| 50 | // Allocate a new value. |
| 51 | vtkInformationUnsignedLongValue* v = new vtkInformationUnsignedLongValue; |
| 52 | v->InitializeObjectBase(); |
| 53 | v->Value = value; |
| 54 | this->SetAsObjectBase(info, v); |
| 55 | v->Delete(); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | //------------------------------------------------------------------------------ |
| 60 | unsigned long vtkInformationUnsignedLongKey::Get(vtkInformation* info) |
no test coverage detected