The type for arbitrary precison numbers, like numeric(p, q). More...
#include <NumericProperty.h>
Public Member Functions | |
Property * | clone () const |
It returns a clone of the object. More... | |
const std::string & | getDatasetName () const |
It returns the name of the propery's dataset. More... | |
std::string * | getDefaultValue () const |
It returns the default value associated to the property, or NULL if none is associated. More... | |
unsigned int | getId () const |
It returns the property identifier. More... | |
const std::string & | getName () const |
It returns the property name. More... | |
Property * | getParent () const |
It returns the parent of this property, or NULL, if it doesn't have one. More... | |
unsigned int | getPrecision () const |
It returns the total count of significant digits in the whole number, that is, the number of digits to both sides of the decimal point. More... | |
unsigned int | getScale () const |
It returns the count of decimal digits in the fractional part, to the right of the decimal point. More... | |
int | getType () const |
It returns the property data type. More... | |
bool | has (Property *p) const |
It checks if the Property "p" is associated to this property or any other parent. More... | |
bool | isAutoNumber () const |
It returns true if the attribute is an autonumber, otherwise it returns false. More... | |
bool | isRequired () const |
It returns true if the attribute is required, otherwise it returns false. More... | |
NumericProperty (const std::string &name, unsigned int precision, unsigned int scale, bool isRequired=false, std::string *defaultValue=0, unsigned int id=0, Property *parent=0) | |
It constructs a new NumericProperty. More... | |
NumericProperty (const NumericProperty &rhs) | |
Copy constructor. More... | |
NumericProperty & | operator= (const NumericProperty &rhs) |
Assignment operator. More... | |
void | setAutoNumber (bool a) |
It tells if the property is an autonumber or not. More... | |
void | setDatasetName (const std::string &dsName) |
It sets the property name. More... | |
void | setDefaultValue (std::string *d) |
It sets the default value associated to the property, or NULL if none is associated. More... | |
void | setId (unsigned int id) |
It sets the property identifier. More... | |
void | setName (const std::string &name) |
It sets the property name. More... | |
void | setParent (Property *p) |
It associate this property to the informed parent. More... | |
void | setPrecision (unsigned int precision) |
Sets the total count of significant digits in the whole number, that is, the number of digits to both sides of the decimal point. More... | |
void | setRequired (bool r) |
It tells if the property is required or not. More... | |
void | setScale (unsigned int scale) |
Sets the count of decimal digits in the fractional part, to the right of the decimal point. More... | |
~NumericProperty () | |
Destructor. More... | |
Protected Attributes | |
std::string | m_datasetName |
The property's dataset name. More... | |
std::string * | m_defaultValue |
Default value. More... | |
unsigned int | m_id |
An identification number that can be used internally. More... | |
bool | m_isAutoNumber |
A flag that indicates if this is an autonumber or serial type. More... | |
bool | m_isRequired |
This flag indicates if the attribute is required or not. More... | |
std::string | m_name |
The property name. More... | |
Property * | m_parent |
The parent property type: it must be a CompositeProperty. More... | |
unsigned int | m_precision |
Total number of digits of a numeric value. More... | |
unsigned int | m_scale |
Number of digits for the right of the decimal point of a numeric value. More... | |
int | m_type |
The property data type. More... | |
The type for arbitrary precison numbers, like numeric(p, q).
Definition at line 45 of file NumericProperty.h.
te::dt::NumericProperty::NumericProperty | ( | const std::string & | name, |
unsigned int | precision, | ||
unsigned int | scale, | ||
bool | isRequired = false , |
||
std::string * | defaultValue = 0 , |
||
unsigned int | id = 0 , |
||
Property * | parent = 0 |
||
) |
It constructs a new NumericProperty.
name | The attribute name. |
precision | The total count of significant digits in the whole number, that is, the number of digits to both sides of the decimal point. |
scale | The count of decimal digits in the fractional part, to the right of the decimal point. |
isRequired | Indicates if the the property is required (mandatory) or not. |
defaultValue | The default value to be used, if none is informed. |
id | The property identifier. |
parent | A reference to the parent Property of the new object if it has one. |
Definition at line 30 of file NumericProperty.cpp.
te::dt::NumericProperty::NumericProperty | ( | const NumericProperty & | rhs | ) |
Copy constructor.
rhs | The right-hand-side copy used to copy from. |
Definition at line 43 of file NumericProperty.cpp.
|
inline |
Destructor.
Definition at line 81 of file NumericProperty.h.
|
virtual |
It returns a clone of the object.
The new property will NOT have associations to other properties.
Reimplemented from te::dt::SimpleProperty.
Definition at line 64 of file NumericProperty.cpp.
|
inlineinherited |
It returns the name of the propery's dataset.
Definition at line 144 of file Property.h.
Referenced by te::da::GetOIDDatasetProps().
|
inlineinherited |
It returns the default value associated to the property, or NULL if none is associated.
Definition at line 127 of file SimpleProperty.h.
Referenced by te::pgis::SetColumnDef().
|
inlineinherited |
It returns the property identifier.
Definition at line 109 of file Property.h.
Referenced by te::da::DataSetTypeConverter::DataSetTypeConverter(), te::pgis::Transactor::getConstraints(), te::pgis::Transactor::getIndexes(), te::pgis::Transactor::getPropertyId(), and te::serialize::xml::Save().
|
inlineinherited |
It returns the property name.
Definition at line 127 of file Property.h.
Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::DataSourceGraphMetadata::addEdgeProperty(), te::ado::Transactor::addForeignKey(), te::pgis::Transactor::addForeignKey(), te::sa::AddGraphEdgeAttribute(), te::sa::AddGraphVertexAttribute(), te::ado::Transactor::addPrimaryKey(), te::mem::DataSource::addProperty(), te::ogr::Transactor::addProperty(), te::sqlite::DataSourceTransactor::addProperty(), te::ado::Transactor::addProperty(), terralib4::Transactor::addProperty(), te::pgis::Transactor::addProperty(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::da::DataSourceCatalog::addRef(), te::pgis::Transactor::addSequence(), te::ado::Transactor::addUniqueKey(), te::graph::DataSourceGraphMetadata::addVertexProperty(), te::vp::PolygonToLineOp::buildOutDataSetType(), te::vp::LineToPolygonOp::buildOutDataSetType(), te::sa::KernelMapOperation::buildTree(), te::sa::KernelRatioOperation::buildTree(), te::da::DataSourceCatalog::checkFKsDependency(), te::da::DataSourceCatalog::checkSequenceDependency(), te::qt::plugins::terralib4::TL4ConverterWizard::commit(), te::qt::widgets::ConstraintWidget::ConstraintWidget(), te::ogr::Convert2OGR(), te::sqlite::Convert2SQLCreate(), te::da::Create(), te::da::CreateAdapter(), te::mem::DataSource::createDataSet(), te::gdal::Transactor::createDataSet(), te::ogr::Transactor::createDataSet(), te::sqlite::DataSourceTransactor::createDataSet(), te::ado::Transactor::createDataSet(), te::pgis::Transactor::createDataSet(), te::vp::IntersectionMemory::createDataSetType(), te::sa::GeneralizedProximityMatrix::createDataSetType(), DataSetAdapterLayerReader(), DataSetAdapterLayerWriter(), te::qt::widgets::DataSetOptionsWizardPage::datasetPressed(), te::da::DataSetType::DataSetType(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::qt::widgets::DataSetDisplay::draw(), te::map::QueryLayerRenderer::draw(), te::map::AbstractLayerRenderer::draw(), te::map::DrawGeometries(), te::map::DrawRaster(), te::da::DataSourceCatalog::dropDependentSequenceEntry(), te::da::DataSourceCatalog::dropDependentSequences(), te::ado::Transactor::dropProperty(), te::qt::widgets::DataExchangerWizard::exchange(), te::qt::widgets::DirectExchangerDialog::exchangeToDatabase(), te::qt::widgets::Selection::executeSelection(), te::qt::widgets::DataSetCategoryItem::fetchMore(), te::qt::widgets::DataSetGroupItem::fetchMore(), te::qt::widgets::DataSetAdapterWidget::fillDataSetTable(), generateLayer(), te::ado::Transactor::getCheckConstraints(), te::pgis::Transactor::getConstraints(), terralib4::Transactor::getDataSetType(), te::sa::GPMWeightsAbstractStrategy::getDistanceAttributeIndex(), te::da::GetEmptyOIDSet(), te::sqlite::DataSourceCatalogLoader::getGeometryInfo(), te::pgis::Transactor::getGeometryInfo(), te::sa::GeneralizedProximityMatrix::getGPMPropertyMap(), te::sa::GetGraphEdgeAttrIndex(), te::sa::GetGraphVertexAttrIndex(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::sqlite::DataSourceCatalogLoader::getIndexes(), te::ado::Transactor::getIndexes(), te::pgis::Transactor::getIndexes(), te::qt::widgets::Info::getInfo(), te::qt::widgets::ClassifierWizardPage::getInputParams(), te::qt::widgets::ClippingWizardPage::getLayerClipping(), te::attributefill::VectorToVectorMemory::getOutputDataSetType(), te::sqlite::DataSourceCatalogLoader::getPrimaryKey(), te::ado::Transactor::getPrimaryKey(), te::ado::Transactor::getProperties(), te::pgis::Transactor::getPropertyId(), te::da::GetPropertyInfo(), te::attributefill::VectorToVectorMemory::getPropertyName(), te::stmem::Transactor::getPropertyNames(), te::da::GetPropertyPos(), te::pgis::Transactor::getRasterInfo(), te::map::QueryLayer::getSchema(), te::sqlite::DataSourceCatalogLoader::getSpatialIndexes(), te::da::GetSQLValueNames(), te::sqlite::DataSourceCatalogLoader::getUniqueKey(), te::sqlite::DataSourceCatalogLoader::getUniqueKeys(), te::ado::Transactor::getUniqueKeys(), te::da::DataSourceCatalog::indexFKs(), te::da::DataSourceCatalog::indexSequenceDependency(), te::qt::widgets::IndexWidget::IndexWidget(), te::edit::FeatureAttributesDialog::initialize(), te::ado::Transactor::insertIntoGeometryColumns(), te::qt::widgets::ChartLayerWidget::listAttributes(), te::qt::widgets::GroupingWidget::listAttributes(), te::da::LoadFull(), te::da::LoadProperties(), te::qt::widgets::GroupingWidget::onImportPushButtonClicked(), te::qt::widgets::DatapPropertiesWidget::onInputDataToolButtonTriggered(), te::sa::SpatialStatisticsDialog::onOkPushButtonClicked(), te::qt::widgets::SHP2PostGISDialog::onOkPushButtonClicked(), te::qt::widgets::DataPropertiesDialog::onOkPushButtonClicked(), te::qt::widgets::ROIManagerWidget::onPointPicked(), te::attributefill::RasterToVectorDialog::onRasterComboBoxChanged(), te::qt::widgets::DataSet2Layer::operator()(), te::da::DataSourceCatalog::remove(), te::graph::DataSourceGraphMetadata::removeEdgeProperty(), te::da::DataSourceCatalog::removeRef(), te::graph::DataSourceGraphMetadata::removeVertexProperty(), te::da::DataSourceCatalog::rename(), te::qt::widgets::DataSetTableView::retypeColumn(), te::vp::LineToPolygonMemory::run(), te::vp::PolygonToLineMemory::run(), te::vp::AggregationQuery::run(), te::vp::BufferQuery::run(), te::vp::IntersectionQuery::run(), te::vp::AggregationMemory::run(), te::attributefill::VectorToRaster::run(), te::attributefill::RasterToVector::run(), te::addressgeocoding::AddressGeocodingOp::run(), te::attributefill::VectorToVectorMemory::run(), te::serialize::xml::Save(), te::qt::widgets::DataSetOptionsWizardPage::set(), te::qt::widgets::PropertyConverterDialog::set(), te::attributefill::VectorToVectorDialog::setFunctionsByLayer(), and terralib4::TableDataSet::TableDataSet().
|
inlineinherited |
It returns the parent of this property, or NULL, if it doesn't have one.
Definition at line 168 of file Property.h.
Referenced by te::dt::CompositeProperty::add(), te::pgis::Transactor::addSequence(), te::da::DataSourceCatalog::checkSequenceDependency(), te::sqlite::Convert2SQLCreate(), te::da::DataSourceCatalog::dropDependentSequenceEntry(), te::da::DataSourceCatalog::dropDependentSequences(), te::ado::Transactor::dropProperty(), te::pgis::Transactor::getPropertyId(), and te::da::DataSourceCatalog::indexSequenceDependency().
|
inline |
It returns the total count of significant digits in the whole number, that is, the number of digits to both sides of the decimal point.
Definition at line 98 of file NumericProperty.h.
Referenced by te::pgis::SetColumnDef().
|
inline |
It returns the count of decimal digits in the fractional part, to the right of the decimal point.
Definition at line 111 of file NumericProperty.h.
Referenced by te::pgis::SetColumnDef().
|
inlineinherited |
It returns the property data type.
Definition at line 161 of file Property.h.
Referenced by te::ado::Transactor::addForeignKey(), te::ado::Transactor::addPrimaryKey(), te::mem::DataSource::addProperty(), te::ogr::Transactor::addProperty(), te::sqlite::DataSourceTransactor::addProperty(), te::ado::Transactor::addProperty(), terralib4::Transactor::addProperty(), te::pgis::Transactor::addProperty(), te::ado::Transactor::addUniqueKey(), te::ogr::Transactor::changePropertyDefinition(), te::graph::LayerRenderer::checkEdgeGeometryProperty(), te::da::DataSourceCatalog::checkSequenceDependency(), te::graph::LayerRenderer::checkVertexGeometryProperty(), te::qt::plugins::terralib4::TL4ConverterWizard::commit(), te::ogr::Convert2OGR(), te::da::CreateAdapter(), te::sqlite::DataSourceTransactor::createDataSet(), te::graph::DataSourceGraphMetadata::createGraphTableEdgeModel(), te::graph::DataSourceGraphMetadata::createVertexAttrTable(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::da::DataSourceCatalog::dropDependentSequenceEntry(), te::da::DataSourceCatalog::dropDependentSequences(), te::ado::Transactor::dropProperty(), te::qt::widgets::DataSetCategoryItem::fetchMore(), te::qt::widgets::DataSetGroupItem::fetchMore(), te::qt::widgets::DataSetAdapterWidget::fillDataSetTable(), te::dt::CompositeProperty::findFirstPropertyOfType(), te::sqlite::DataSourceCatalogLoader::getDataSetType(), te::da::GetEmptyOIDSet(), te::qt::widgets::WhereClauseWidget::getExpression(), te::da::GetFirstSpatialProperty(), te::vp::MultipartToSinglepart::getOutDst(), te::attributefill::VectorToVectorMemory::getOutputDataSetType(), te::pgis::Transactor::getProperties(), te::pgis::Transactor::getProperty(), te::pgis::Transactor::getPropertyId(), te::da::GetPropertyInfo(), te::sqlite::DataSourceCatalogLoader::getSpatialIndexes(), te::sqlite::GetSQLType(), te::pgis::GetSQLValue(), te::vp::IntersectionOp::getTabularProps(), te::da::DataSourceCatalog::indexSequenceDependency(), te::qt::widgets::ChartLayerWidget::listAttributes(), te::qt::widgets::GroupingWidget::listAttributes(), te::da::DataSetTypeConverter::needConverter(), te::qt::widgets::GroupingWidget::onImportPushButtonClicked(), te::sa::SpatialStatisticsDialog::onOkPushButtonClicked(), te::qt::widgets::DataSetTableView::retypeColumn(), te::attributefill::VectorToVectorMemory::run(), te::graph::DataSourceGraphMetadata::saveProperty(), te::vp::GeometricOpMemory::SetAggregByAttribute(), te::pgis::SetColumnDef(), and te::attributefill::VectorToVectorDialog::setFunctionsByLayer().
|
virtualinherited |
It checks if the Property "p" is associated to this property or any other parent.
This method can be used to ask if a given Property belongs to a more complex type (like: CompositeProperty or DataSetType).
p | The Property we are checking. |
Implements te::dt::Property.
Definition at line 80 of file SimpleProperty.cpp.
|
inlineinherited |
It returns true if the attribute is an autonumber, otherwise it returns false.
Definition at line 111 of file SimpleProperty.h.
Referenced by te::pgis::SetColumnDef().
|
inlineinherited |
It returns true if the attribute is required, otherwise it returns false.
Definition at line 97 of file SimpleProperty.h.
Referenced by te::sqlite::DataSourceTransactor::addProperty(), te::ado::Transactor::addProperty(), te::sqlite::Convert2SQLCreate(), and te::pgis::SetColumnDef().
te::dt::NumericProperty & te::dt::NumericProperty::operator= | ( | const NumericProperty & | rhs | ) |
Assignment operator.
rhs | The right-hand-side copy used to copy from. |
Definition at line 50 of file NumericProperty.cpp.
References m_precision, m_scale, and te::dt::SimpleProperty::operator=().
|
inlineinherited |
It tells if the property is an autonumber or not.
a | If true the property is marked as an autonumber (serial), otherwise it is not. |
Definition at line 118 of file SimpleProperty.h.
Referenced by te::pgis::Convert2TerraLib(), te::vp::IntersectionMemory::createDataSetType(), te::graph::DataSourceGraphMetadata::createGraphAttributesTable(), te::graph::DataSourceGraphMetadata::createGraphMetadataTable(), te::graph::DataSourceGraphMetadata::createGraphTableEdgeModel(), te::graph::DataSourceGraphMetadata::createVertexAttrTable(), getConvertedproperty(), te::vp::BufferOp::GetDataSetType(), te::vp::GeometricOp::GetDataSetType(), te::vp::IntersectionQuery::run(), and te::vp::AggregationQuery::run().
|
inlineinherited |
It sets the property name.
name | The new property name. |
Definition at line 154 of file Property.h.
|
inherited |
It sets the default value associated to the property, or NULL if none is associated.
d | The default value associated to the property, or NULL if none is associated. |
Definition at line 74 of file SimpleProperty.cpp.
|
inlineinherited |
It sets the property identifier.
id | A number used to identify the property. |
Definition at line 118 of file Property.h.
Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::sa::AddGraphEdgeAttribute(), te::sa::AddGraphVertexAttribute(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::graph::LDDGraphBuilder::build(), te::pgis::Transactor::createDataSet(), te::sa::SkaterOperation::createDataSetType(), te::sa::BayesGlobalOperation::createDataSetType(), te::sa::BayesLocalOperation::createDataSetType(), te::sa::KernelOperation::createDataSetType(), te::sa::GeneralizedProximityMatrix::createDataSetType(), te::sa::GPMConstructorAbstractStrategy::createDistanceAttribute(), te::graph::FlowGraphBuilder::createEdgeObjects(), te::graph::RAGGraphBuilder::createVertexObjects(), te::graph::FlowGraphBuilder::createVertexObjects(), te::sa::GPMWeightsAbstractStrategy::createWeightAttribute(), te::pgis::Transactor::getPropertyId(), and te::sa::SpatialWeightsExchanger::importFromGWT().
|
inlineinherited |
It sets the property name.
name | The new property name. |
Definition at line 137 of file Property.h.
Referenced by te::ogr::Transactor::createDataSet(), te::vp::IntersectionMemory::createDataSetType(), te::qt::widgets::DirectExchangerDialog::exchangeToDatabase(), terralib4::Transactor::getDataSetType(), te::qt::widgets::AddColumnDialog::getNewProperty(), te::attributefill::VectorToVectorMemory::getOutputDataSetType(), te::qt::widgets::PostGIS2SHPDialog::onOkPushButtonClicked(), te::qt::widgets::SHP2ADODialog::onOkPushButtonClicked(), te::qt::widgets::SHP2PostGISDialog::onOkPushButtonClicked(), te::stmem::Transactor::renameDataSet(), te::vp::IntersectionQuery::run(), and te::qt::widgets::DataSetOptionsWizardPage::set().
|
inlineinherited |
It associate this property to the informed parent.
p | Teh parent property. |
Definition at line 177 of file Property.h.
Referenced by te::dt::CompositeProperty::add(), te::graph::AddDeepAttribute::AddDeepAttribute(), te::sa::AddGraphEdgeAttribute(), te::sa::AddGraphVertexAttribute(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::dt::ArrayProperty::ArrayProperty(), te::graph::QueryGraphBuilder::build(), te::dt::CompositeProperty::copy(), te::sa::SkaterOperation::createDataSetType(), te::sa::BayesLocalOperation::createDataSetType(), te::sa::BayesGlobalOperation::createDataSetType(), te::sa::KernelOperation::createDataSetType(), te::sa::GeneralizedProximityMatrix::createDataSetType(), te::sa::GPMConstructorAbstractStrategy::createDistanceAttribute(), te::graph::FlowGraphBuilder::createEdgeObjects(), te::sa::MinimumSpanningTree::createGraph(), te::graph::DataSourceGraphMetadata::createGraphTableEdgeModel(), te::graph::DataSourceGraphMetadata::createVertexAttrTable(), te::graph::FlowGraphBuilder::createVertexObjects(), te::sa::GPMWeightsAbstractStrategy::createWeightAttribute(), te::vp::GeometricOp::GetDataSetType(), te::sa::SpatialWeightsExchanger::importFromGWT(), te::dt::ArrayProperty::operator=(), and te::dt::ArrayProperty::setElementType().
|
inline |
Sets the total count of significant digits in the whole number, that is, the number of digits to both sides of the decimal point.
Definition at line 104 of file NumericProperty.h.
Referenced by te::qt::widgets::NumericPropertyWidget::fillProperty().
|
inlineinherited |
It tells if the property is required or not.
r | If true the property is marked as required, otherwise it is not required. |
Definition at line 104 of file SimpleProperty.h.
Referenced by te::attributefill::VectorToVectorMemory::getOutputDataSetType(), and te::ado::Transactor::getProperties().
|
inline |
Sets the count of decimal digits in the fractional part, to the right of the decimal point.
Definition at line 116 of file NumericProperty.h.
Referenced by te::qt::widgets::NumericPropertyWidget::fillProperty().
|
protectedinherited |
The property's dataset name.
Definition at line 208 of file Property.h.
Referenced by te::dt::Property::operator=().
|
protectedinherited |
Default value.
Definition at line 164 of file SimpleProperty.h.
Referenced by te::dt::SimpleProperty::operator=(), and te::dt::SimpleProperty::SimpleProperty().
|
protectedinherited |
An identification number that can be used internally.
Definition at line 205 of file Property.h.
Referenced by te::dt::Property::operator=().
|
protectedinherited |
A flag that indicates if this is an autonumber or serial type.
Definition at line 163 of file SimpleProperty.h.
Referenced by te::dt::SimpleProperty::operator=().
|
protectedinherited |
This flag indicates if the attribute is required or not.
Definition at line 162 of file SimpleProperty.h.
Referenced by te::dt::SimpleProperty::operator=().
|
protectedinherited |
The property name.
Definition at line 207 of file Property.h.
Referenced by te::dt::Property::operator=().
|
protectedinherited |
The parent property type: it must be a CompositeProperty.
Definition at line 204 of file Property.h.
|
protected |
Total number of digits of a numeric value.
Definition at line 129 of file NumericProperty.h.
Referenced by operator=().
|
protected |
Number of digits for the right of the decimal point of a numeric value.
Definition at line 130 of file NumericProperty.h.
Referenced by operator=().
|
protectedinherited |
The property data type.
Definition at line 206 of file Property.h.
Referenced by te::dt::Property::operator=().