Skip to content
Snippets Groups Projects
Commit 065d9546 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

ENH: added accessors for transactor

parent 27333824
No related branches found
No related tags found
No related merge requests found
......@@ -24,11 +24,15 @@ ADD_TEST(gfTuPostGISCreateTableTransactorNew ${GISFILTERS_TESTS}
otbPostGISCreateTableTransactorNew
)
ADD_TEST(gfTuPostGISCreateTableTransactorAccessors ${GISFILTERS_TESTS}
otbPostGISCreateTableTransactorAccessors
)
# ------- CXX source files -----------------------------------
SET(GISFilters_SRCS
otbPostGISCreateTableTransactorNew.cxx
otbPostGISCreateTableTransactorAccessors.cxx
)
INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
......
......@@ -27,4 +27,5 @@
void RegisterTests()
{
REGISTER_TEST(otbPostGISCreateTableTransactorNew);
REGISTER_TEST(otbPostGISCreateTableTransactorAccessors);
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "itkExceptionObject.h"
#include "otbMacro.h"
#include "otbPostGISCreateTableTransactor.h"
int otbPostGISCreateTableTransactorAccessors(int argc, char * argv[])
{
typedef otb::PostGISCreateTableTransactor TransactorType;
//Instantiation
TransactorType myTransactor;
unsigned short dimension = 2;
myTransactor.SetDimension( dimension );
if( dimension != myTransactor.GetDimension() )
return EXIT_FAILURE;
std::string name = "mytable";
myTransactor.SetTableName( name );
if( name != myTransactor.GetTableName() )
return EXIT_FAILURE;
int srid = -1;
myTransactor.SetSRID( srid );
if( srid != myTransactor.GetSRID() )
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment