MCPcopy Create free account
hub / github.com/PDAL/PDAL / setCodecs

Method setCodecs

plugins/e57/libE57Format/src/CompressedVectorNodeImpl.cpp:88–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 void CompressedVectorNodeImpl::setCodecs( const std::shared_ptr<VectorNodeImpl> &codecs )
89 {
90 // don't checkImageFileOpen, ctor did it
91
92 //??? check ok for codecs, empty vector, or each element has "inputs" vector
93 // of strings, codec
94 // substruct
95
96 // Can't set codecs twice.
97 if ( codecs_ )
98 {
99 throw E57_EXCEPTION2( ErrorSetTwice, "this->pathName=" + this->pathName() );
100 }
101
102 // codecs can't have a parent (must be a root node)
103 if ( !codecs->isRoot() )
104 {
105 throw E57_EXCEPTION2( ErrorAlreadyHasParent,
106 "this->pathName=" + this->pathName() +
107 " codecs->pathName=" + codecs->pathName() );
108 }
109
110 // Verify that codecs is destined for same ImageFile as this is
111 ImageFileImplSharedPtr thisDest( destImageFile() );
112 ImageFileImplSharedPtr codecsDest( codecs->destImageFile() );
113 if ( thisDest != codecsDest )
114 {
115 throw E57_EXCEPTION2( ErrorDifferentDestImageFile,
116 "this->destImageFile" + thisDest->fileName() +
117 " codecs->destImageFile" + codecsDest->fileName() );
118 }
119
120 codecs_ = codecs;
121
122 // Note that codecs is not attached to CompressedVector in a parent/child
123 // relationship. This means that codecs is a root node (has no parent).
124 }
125
126 std::shared_ptr<VectorNodeImpl> CompressedVectorNodeImpl::getCodecs() const
127 {

Callers 2

CompressedVectorNodeMethod · 0.80
endElementMethod · 0.80

Calls 4

pathNameMethod · 0.45
isRootMethod · 0.45
destImageFileMethod · 0.45
fileNameMethod · 0.45

Tested by

no test coverage detected