TsManagerDataSource Class Reference

A static class for managing the resources used by DataSource test suit. More...

#include <TsManagerDataSource.h>

Static Public Member Functions

static void ConvertToPropType (std::string s, te::dt::StringType &t)
 Converts a string into a string (Enum) property type. More...
 
static void ConvertToPropType (std::string s, int &t)
 Converts a string into a number (Enum) representing a property type. More...
 
static void ConvertVectorToEnvelope (std::vector< std::vector< double > > &vectd, std::vector< te::gm::Envelope > &vecte)
 Converts a vector of vector of doubles - representing the envelopes of layers into a vector of te::gm::Envelope. More...
 
static void ConvertVectorToLinearRing (std::vector< std::vector< double > > &vectd, te::gm::LinearRing &lr)
 Converts a vector of vector of 3 doubles - representing points (SRID,X,Y) into a vector of te::gm::LinearRings. More...
 
static void ConvertVectorToPoints (std::vector< std::vector< double > > &vectd, std::vector< te::gm::Point > &vectp)
 Converts a vector of vector of 3 doubles - representing points (SRID,X,Y) into a vector of te::gm::Envelope. More...
 
static void finalize ()
 It will finalize the resources used in Teste Suit: TsDataSource, TsDataSet, TsDataSetTypePersistence, TsTransactor... More...
 
static void initialize (const std::string driver_name)
 It will initialize the resources used by Test Suit: TsDataSource, TsDataSet, TsDataSetTypePersistence, TsTransactor etc. More...
 
static void setPairsValues ()
 It will set vectors of pairs of values based in some vector already known. More...
 

Static Public Attributes

static std::string sm_Attr1
 
static std::string sm_Attr2idx
 
static std::string sm_Attr3e4Uk
 
static std::string sm_Attr5idx
 
static std::string sm_Attr6Fk
 
static std::string sm_Attr6Pk
 
static std::string sm_Attr7_seq
 
static te::gm::Envelope sm_box
 
static te::da::DataSourceCapabilities sm_capabilit
 
static te::da::CheckConstraintsm_cc
 
static std::string sm_ccName
 
static std::map< std::string, std::string > sm_connInfo
 
static std::map< std::string, std::string > sm_connInfoDropDs
 
static std::map< std::string, std::string > sm_connInfoExist
 
static std::map< std::string, std::string > sm_connInfoNewDs
 
static std::string sm_connStr
 
static te::da::DataSourcesm_datasource
 
static std::string sm_dsType
 
static std::string sm_dtcloned
 
static std::vector< size_t > sm_dtRecSize
 
static std::vector< size_t > sm_dtSize
 
static te::da::ForeignKeysm_fk
 
static te::gm::Geometrysm_geom
 
static te::gm::LinearRingsm_linearRing
 
static std::string sm_NameAttr1
 
static std::string sm_NameAttr2
 
static std::string sm_NameAttr3
 
static std::string sm_NameAttr4
 
static std::string sm_NameAttr5
 
static std::string sm_NameAttr6
 
static std::string sm_NameAttr7
 
static std::string sm_NameAttr8
 
static std::string sm_newCapabilitiesDt
 
static std::string sm_newDataSetType
 
static std::string sm_newDataSetType2
 
static std::string sm_newDataSetType3
 
static te::da::DataSetTypesm_newdt
 
static te::da::DataSetTypesm_newdt3
 
static std::string sm_newNameProp
 
static size_t sm_nroDataSets
 
static std::string sm_oldNameProp
 
static te::gm::Polygonsm_pol = new te::gm::Polygon(0, te::gm::PolygonType)
 
static te::gm::Point sm_pt
 
static std::vector< te::gm::Envelopesm_recEnvelops
 
static std::vector< std::string > sm_vecCcNames
 
static std::vector< std::string > sm_vecDtNames
 
static std::vector< std::pair< std::string, te::gm::Envelope > > sm_vecDtNamesAndEnvelops
 
static std::vector< te::gm::Envelopesm_vecEnvelops
 
static std::vector< std::string > sm_vecFkNames
 
static std::vector< std::string > sm_vecIdxNames
 
static std::vector< std::pair< std::string, te::gm::Envelope > > sm_vecNamesAndRecs
 
static std::vector< std::pair< std::string, size_t > > sm_vecNamesSizes
 
static std::vector< std::pair< std::string, size_t > > sm_vecNamesSizesRec
 
static std::vector< std::string > sm_vecPkNames
 
static std::vector< std::string > sm_vecSeqNames
 
static std::vector< std::string > sm_vecUkNames
 

Detailed Description

A static class for managing the resources used by DataSource test suit.

Definition at line 47 of file TsManagerDataSource.h.

Member Function Documentation

void TsManagerDataSource::ConvertToPropType ( std::string  s,
te::dt::StringType t 
)
static

Converts a string into a string (Enum) property type.

Parameters
sString represententing a property type.
tA string property type.

Definition at line 185 of file TsManagerDataSource.cpp.

References te::dt::FIXED_STRING, te::dt::STRING, and te::dt::VAR_STRING.

Referenced by initialize().

void TsManagerDataSource::ConvertToPropType ( std::string  s,
int t 
)
static

Converts a string into a number (Enum) representing a property type.

Parameters
sString represententing a property type.
tA number (int) representing a property type.

Definition at line 196 of file TsManagerDataSource.cpp.

References te::dt::INT16_TYPE, and te::gm::PolygonMType.

void TsManagerDataSource::ConvertVectorToEnvelope ( std::vector< std::vector< double > > &  vectd,
std::vector< te::gm::Envelope > &  vecte 
)
static

Converts a vector of vector of doubles - representing the envelopes of layers into a vector of te::gm::Envelope.

Parameters
vectdA vector of vector of doubles std::vector<std::vector<double>>.
vecteThe vector of Envelope to output the values.

Definition at line 129 of file TsManagerDataSource.cpp.

Referenced by initialize().

void TsManagerDataSource::ConvertVectorToLinearRing ( std::vector< std::vector< double > > &  vectd,
te::gm::LinearRing lr 
)
static

Converts a vector of vector of 3 doubles - representing points (SRID,X,Y) into a vector of te::gm::LinearRings.

Parameters
vectdA vector of vector of values representing points std::vector<std::vector<double>>.
vectpThe vector of Points with SRID,X,Y to output the values.

Definition at line 164 of file TsManagerDataSource.cpp.

References d, p, te::gm::LineString::setPoint(), and te::gm::LineString::setSRID().

Referenced by initialize().

void TsManagerDataSource::ConvertVectorToPoints ( std::vector< std::vector< double > > &  vectd,
std::vector< te::gm::Point > &  vectp 
)
static

Converts a vector of vector of 3 doubles - representing points (SRID,X,Y) into a vector of te::gm::Envelope.

Parameters
vectdA vector of vector of doubles std::vector<std::vector<double>>.
vectpThe vector of Points with SRID,X,Y to output the values.

Definition at line 142 of file TsManagerDataSource.cpp.

References d, te::gm::Point::setSRID(), te::gm::Point::setX(), and te::gm::Point::setY().

Referenced by initialize().

void TsManagerDataSource::finalize ( )
static
void TsManagerDataSource::initialize ( const std::string  driver_name)
static

It will initialize the resources used by Test Suit: TsDataSource, TsDataSet, TsDataSetTypePersistence, TsTransactor etc.

Parameters
driver_nameA json file name from where to read values used by tests.

This will avoid openning/closing database for each test case.

Definition at line 269 of file TsManagerDataSource.cpp.

References te::da::ForeignKey::add(), te::da::PrimaryKey::add(), te::da::UniqueKey::add(), te::da::Index::add(), te::da::DataSetType::add(), te::da::ForeignKey::addRefProperty(), te::common::Convert(), ConvertToPropType(), ConvertVectorToEnvelope(), ConvertVectorToLinearRing(), ConvertVectorToPoints(), te::da::DataSource::getCapabilities(), te::gm::LineString::getPointN(), te::dt::CompositeProperty::getProperty(), te::sa::Grid, te::dt::INT16_TYPE, te::gm::LineStringType, te::da::DataSourceFactory::make(), te::gm::PolygonMType, te::gm::CurvePolygon::push_back(), te::da::R_TREE_TYPE, te::da::CheckConstraint::setExpression(), te::rst::Grid::setGeoreference(), setPairsValues(), te::da::ForeignKey::setReferencedDataSetType(), te::gm::Point::setSRID(), te::gm::CurvePolygon::setSRID(), te::gm::Point::setX(), te::gm::Point::setY(), te::gm::LineString::size(), sm_Attr1, sm_Attr2idx, sm_Attr3e4Uk, sm_Attr5idx, sm_Attr6Fk, sm_Attr6Pk, sm_box, sm_capabilit, sm_cc, sm_ccName, sm_connInfo, sm_connInfoDropDs, sm_connInfoExist, sm_connInfoNewDs, sm_connStr, sm_datasource, sm_dsType, sm_dtcloned, sm_dtRecSize, sm_dtSize, sm_fk, sm_NameAttr1, sm_NameAttr2, sm_NameAttr3, sm_NameAttr4, sm_NameAttr5, sm_NameAttr6, sm_NameAttr7, sm_NameAttr8, sm_newCapabilitiesDt, sm_newDataSetType, sm_newDataSetType2, sm_newDataSetType3, sm_newdt, sm_newdt3, sm_newNameProp, sm_oldNameProp, sm_pol, sm_pt, sm_recEnvelops, sm_vecCcNames, sm_vecDtNames, sm_vecEnvelops, sm_vecFkNames, sm_vecIdxNames, sm_vecPkNames, sm_vecSeqNames, sm_vecUkNames, and te::dt::UCHAR_TYPE.

Referenced by main().

void TsManagerDataSource::setPairsValues ( )
static

It will set vectors of pairs of values based in some vector already known.

Definition at line 553 of file TsManagerDataSource.cpp.

References sm_dtRecSize, sm_dtSize, sm_recEnvelops, sm_vecDtNames, sm_vecDtNamesAndEnvelops, sm_vecEnvelops, sm_vecNamesAndRecs, sm_vecNamesSizes, and sm_vecNamesSizesRec.

Referenced by initialize().

Member Data Documentation

std::string TsManagerDataSource::sm_Attr1
static

Definition at line 162 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_Attr2idx
static

Definition at line 176 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_Attr3e4Uk
static

Definition at line 174 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_Attr5idx
static

Definition at line 175 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_Attr6Fk
static

Definition at line 172 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_Attr6Pk
static

Definition at line 171 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_Attr7_seq
static

Definition at line 177 of file TsManagerDataSource.h.

te::gm::Envelope TsManagerDataSource::sm_box
static
te::da::DataSourceCapabilities TsManagerDataSource::sm_capabilit
static

Definition at line 115 of file TsManagerDataSource.h.

Referenced by initialize(), and TsDataSource::setUp().

te::da::CheckConstraint * TsManagerDataSource::sm_cc
static

Definition at line 160 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_ccName
static

Definition at line 159 of file TsManagerDataSource.h.

Referenced by initialize().

std::map< std::string, std::string > TsManagerDataSource::sm_connInfo
static
std::map< std::string, std::string > TsManagerDataSource::sm_connInfoDropDs
static

Definition at line 121 of file TsManagerDataSource.h.

Referenced by finalize(), initialize(), and TsDataSource::setUp().

std::map< std::string, std::string > TsManagerDataSource::sm_connInfoExist
static

Definition at line 118 of file TsManagerDataSource.h.

Referenced by finalize(), initialize(), and TsDataSource::setUp().

std::map< std::string, std::string > TsManagerDataSource::sm_connInfoNewDs
static

Definition at line 120 of file TsManagerDataSource.h.

Referenced by finalize(), initialize(), and TsDataSource::setUp().

std::string TsManagerDataSource::sm_connStr
static

Definition at line 122 of file TsManagerDataSource.h.

Referenced by initialize(), and TsDataSource::setUp().

te::da::DataSource * TsManagerDataSource::sm_datasource
static
std::string TsManagerDataSource::sm_dsType
static
std::string TsManagerDataSource::sm_dtcloned
static

Definition at line 184 of file TsManagerDataSource.h.

Referenced by initialize().

std::vector< size_t > TsManagerDataSource::sm_dtRecSize
static

Definition at line 129 of file TsManagerDataSource.h.

Referenced by finalize(), initialize(), and setPairsValues().

std::vector< size_t > TsManagerDataSource::sm_dtSize
static

Definition at line 128 of file TsManagerDataSource.h.

Referenced by finalize(), initialize(), and setPairsValues().

te::da::ForeignKey * TsManagerDataSource::sm_fk
static

Definition at line 189 of file TsManagerDataSource.h.

Referenced by initialize().

te::gm::Geometry * TsManagerDataSource::sm_geom
static
te::gm::LinearRing* TsManagerDataSource::sm_linearRing
static

Definition at line 148 of file TsManagerDataSource.h.

std::string TsManagerDataSource::sm_NameAttr1
static

Definition at line 161 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_NameAttr2
static

Definition at line 163 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_NameAttr3
static

Definition at line 164 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_NameAttr4
static

Definition at line 165 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_NameAttr5
static

Definition at line 166 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_NameAttr6
static

Definition at line 167 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_NameAttr7
static

Definition at line 168 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_NameAttr8
static

Definition at line 169 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_newCapabilitiesDt
static

Definition at line 181 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_newDataSetType
static

Definition at line 180 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_newDataSetType2
static

Definition at line 182 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_newDataSetType3
static

Definition at line 183 of file TsManagerDataSource.h.

Referenced by initialize().

te::da::DataSetType * TsManagerDataSource::sm_newdt
static

Definition at line 156 of file TsManagerDataSource.h.

Referenced by initialize().

te::da::DataSetType * TsManagerDataSource::sm_newdt3
static

Definition at line 157 of file TsManagerDataSource.h.

Referenced by initialize().

std::string TsManagerDataSource::sm_newNameProp
static

Definition at line 187 of file TsManagerDataSource.h.

Referenced by initialize().

size_t TsManagerDataSource::sm_nroDataSets
static

Definition at line 152 of file TsManagerDataSource.h.

Referenced by TsDataSourceTransactor::setUp().

std::string TsManagerDataSource::sm_oldNameProp
static

Definition at line 186 of file TsManagerDataSource.h.

Referenced by initialize().

te::gm::Polygon * TsManagerDataSource::sm_pol = new te::gm::Polygon(0, te::gm::PolygonType)
static
te::gm::Point TsManagerDataSource::sm_pt
static
std::vector< te::gm::Envelope > TsManagerDataSource::sm_recEnvelops
static

Definition at line 127 of file TsManagerDataSource.h.

Referenced by finalize(), initialize(), and setPairsValues().

std::vector< std::string > TsManagerDataSource::sm_vecCcNames
static

Definition at line 143 of file TsManagerDataSource.h.

Referenced by finalize(), and initialize().

std::vector< std::string > TsManagerDataSource::sm_vecDtNames
static
std::vector< std::pair< std::string, te::gm::Envelope > > TsManagerDataSource::sm_vecDtNamesAndEnvelops
static
std::vector< te::gm::Envelope > TsManagerDataSource::sm_vecEnvelops
static
std::vector< std::string > TsManagerDataSource::sm_vecFkNames
static

Definition at line 141 of file TsManagerDataSource.h.

Referenced by finalize(), and initialize().

std::vector< std::string > TsManagerDataSource::sm_vecIdxNames
static

Definition at line 140 of file TsManagerDataSource.h.

Referenced by finalize(), and initialize().

std::vector< std::pair< std::string, te::gm::Envelope > > TsManagerDataSource::sm_vecNamesAndRecs
static
std::vector< std::pair< std::string, size_t > > TsManagerDataSource::sm_vecNamesSizes
static
std::vector< std::pair< std::string, size_t > > TsManagerDataSource::sm_vecNamesSizesRec
static
std::vector< std::string > TsManagerDataSource::sm_vecPkNames
static

Definition at line 138 of file TsManagerDataSource.h.

Referenced by finalize(), and initialize().

std::vector< std::string > TsManagerDataSource::sm_vecSeqNames
static

Definition at line 142 of file TsManagerDataSource.h.

Referenced by finalize(), and initialize().

std::vector< std::string > TsManagerDataSource::sm_vecUkNames
static

Definition at line 139 of file TsManagerDataSource.h.

Referenced by finalize(), and initialize().


The documentation for this class was generated from the following files: