Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
a6956879
Commit
a6956879
authored
16 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
intégration vectorData
parent
528b27f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/IO/otbVectorDataIOBase.cxx
+23
-9
23 additions, 9 deletions
Code/IO/otbVectorDataIOBase.cxx
Code/IO/otbVectorDataIOFactory.cxx
+16
-8
16 additions, 8 deletions
Code/IO/otbVectorDataIOFactory.cxx
with
39 additions
and
17 deletions
Code/IO/otbVectorDataIOBase.cxx
+
23
−
9
View file @
a6956879
...
...
@@ -14,6 +14,9 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef _otbVectorDataIOBase_txx
#define _otbVectorDataIOBase_txx
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
...
...
@@ -21,26 +24,33 @@
namespace
otb
{
VectorDataIOBase
::
VectorDataIOBase
()
:
template
<
class
TData
>
VectorDataIOBase
<
TData
>
::
VectorDataIOBase
()
:
m_ByteOrder
(
OrderNotApplicable
)
{
Reset
(
false
);
}
void
VectorDataIOBase
::
Reset
(
const
bool
)
template
<
class
TData
>
void
VectorDataIOBase
<
TData
>
::
Reset
(
const
bool
)
{
m_Initialized
=
false
;
m_FileName
=
""
;
}
VectorDataIOBase
::~
VectorDataIOBase
()
template
<
class
TData
>
VectorDataIOBase
<
TData
>
::~
VectorDataIOBase
()
{
}
std
::
string
VectorDataIOBase
::
GetByteOrderAsString
(
ByteOrder
t
)
const
template
<
class
TData
>
std
::
string
VectorDataIOBase
<
TData
>
::
GetByteOrderAsString
(
ByteOrder
t
)
const
{
std
::
string
s
;
switch
(
t
)
...
...
@@ -57,8 +67,10 @@ std::string VectorDataIOBase::GetByteOrderAsString(ByteOrder t) const
}
void
VectorDataIOBase
::
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
template
<
class
TData
>
void
VectorDataIOBase
<
TData
>
::
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
{
Superclass
::
PrintSelf
(
os
,
indent
);
...
...
@@ -67,3 +79,5 @@ void VectorDataIOBase::PrintSelf(std::ostream& os, itk::Indent indent) const
}
}
//namespace otb
#endif
This diff is collapsed.
Click to expand it.
Code/IO/otbVectorDataIOFactory.cxx
+
16
−
8
View file @
a6956879
...
...
@@ -15,6 +15,9 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef _otbVectorDataIOFactory_txx
#define _otbVectorDataIOFactory_txx
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif
...
...
@@ -27,20 +30,22 @@
namespace
otb
{
VectorDataIOBase
::
Pointer
VectorDataIOFactory
::
CreateVectorDataIO
(
const
char
*
path
,
FileModeType
mode
)
template
<
class
TData
>
typename
VectorDataIOFactory
<
TData
>
::
VectorDataIOBasePointerType
VectorDataIOFactory
<
TData
>
::
CreateVectorDataIO
(
const
char
*
path
,
FileModeType
mode
)
{
RegisterBuiltInFactories
();
std
::
list
<
VectorDataIOBase
::
Pointer
>
possibleVectorDataIO
;
std
::
list
<
VectorDataIOBasePointer
Type
>
possibleVectorDataIO
;
std
::
list
<
itk
::
LightObject
::
Pointer
>
allobjects
=
itk
::
ObjectFactoryBase
::
CreateAllInstance
(
"otbVectorDataIOBase"
);
for
(
std
::
list
<
itk
::
LightObject
::
Pointer
>::
iterator
i
=
allobjects
.
begin
();
i
!=
allobjects
.
end
();
++
i
)
{
VectorDataIOBase
*
io
=
dynamic_cast
<
VectorDataIOBase
*
>
(
i
->
GetPointer
());
VectorDataIOBase
*
io
=
dynamic_cast
<
VectorDataIOBase
PointerType
>
(
i
->
GetPointer
());
if
(
io
)
{
possibleVectorDataIO
.
push_back
(
io
);
...
...
@@ -52,7 +57,7 @@ VectorDataIOFactory::CreateVectorDataIO(const char* path, FileModeType mode)
<<
std
::
endl
;
}
}
for
(
std
::
list
<
VectorDataIOBase
::
Pointer
>::
iterator
k
=
possibleVectorDataIO
.
begin
();
for
(
std
::
list
<
VectorDataIOBasePointer
Type
>::
iterator
k
=
possibleVectorDataIO
.
begin
();
k
!=
possibleVectorDataIO
.
end
();
++
k
)
{
if
(
mode
==
ReadMode
)
...
...
@@ -73,9 +78,10 @@ VectorDataIOFactory::CreateVectorDataIO(const char* path, FileModeType mode)
}
return
0
;
}
template
<
class
TData
>
void
VectorDataIOFactory
::
RegisterBuiltInFactories
()
VectorDataIOFactory
<
TData
>
::
RegisterBuiltInFactories
()
{
static
bool
firstTime
=
true
;
...
...
@@ -94,3 +100,5 @@ VectorDataIOFactory::RegisterBuiltInFactories()
}
}
// end namespace otb
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment