MCPcopy Create free account
hub / github.com/Kitware/VTK / initialize

Method initialize

ThirdParty/xdmf3/vtkxdmf3/core/XdmfArray.cpp:806–851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

804}
805
806void
807XdmfArray::initialize(const shared_ptr<const XdmfArrayType> & arrayType,
808 const unsigned int size)
809{
810 if(arrayType == XdmfArrayType::Int8()) {
811 this->initialize<char>(size);
812 }
813 else if(arrayType == XdmfArrayType::Int16()) {
814 this->initialize<short>(size);
815 }
816 else if(arrayType == XdmfArrayType::Int32()) {
817 this->initialize<int>(size);
818 }
819 else if(arrayType == XdmfArrayType::Int64()) {
820 this->initialize<int64_t>(size);
821 }
822 else if(arrayType == XdmfArrayType::Float32()) {
823 this->initialize<float>(size);
824 }
825 else if(arrayType == XdmfArrayType::Float64()) {
826 this->initialize<double>(size);
827 }
828 else if(arrayType == XdmfArrayType::UInt8()) {
829 this->initialize<unsigned char>(size);
830 }
831 else if(arrayType == XdmfArrayType::UInt16()) {
832 this->initialize<unsigned short>(size);
833 }
834 else if(arrayType == XdmfArrayType::UInt32()) {
835 this->initialize<unsigned int>(size);
836 }
837 else if(arrayType == XdmfArrayType::UInt64()) {
838 this->initialize<uint64_t>(size);
839 }
840 else if(arrayType == XdmfArrayType::String()) {
841 this->initialize<std::string>(size);
842 }
843 else if(arrayType == XdmfArrayType::Uninitialized()) {
844 this->release();
845 }
846 else {
847 XdmfError::message(XdmfError::FATAL,
848 "Array of unsupported type in XdmfArray::initialize");
849 }
850 this->setIsChanged(true);
851}
852
853void
854XdmfArray::initialize(const shared_ptr<const XdmfArrayType> & arrayType,

Callers 11

XdmfArrayMethod · 0.95
populateItemMethod · 0.95
preallocateStepsMethod · 0.45
setStepMethod · 0.45
operator()Method · 0.45
XdmfArrayInitializeFunction · 0.45
readMethod · 0.45
readMethod · 0.45
readMethod · 0.45
readMethod · 0.45
readMethod · 0.45

Calls 5

releaseMethod · 0.95
StringFunction · 0.85
setIsChangedMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected