FdoIStreamReader* SuperMapRaster::GetStreamReader () { TRACE(_T("调用 SuperMapRaster::GetStreamReader()... \n")); FdoPtr<FdoIStreamReader> streamReader = new SuperMapStreamReader(m_pDatasetRaster, FDO_SAFE_ADDREF(m_dataModel.p)); return FDO_SAFE_ADDREF(streamReader.p); }
[!output PREFIX]ApplySchemaCommand::[!output PREFIX]ApplySchemaCommand (FdoIConnection *connection) : [!output PREFIX]Command<FdoIApplySchema> (connection) { } /** Do not implement the copy constructor. **/ //[!output PREFIX]ApplySchemaCommand::[!output PREFIX]ApplySchemaCommand (const [!output PREFIX]ApplySchemaCommand &right) { } [!output PREFIX]ApplySchemaCommand::~[!output PREFIX]ApplySchemaCommand (void) { } /** Do not implement the assignment operator. **/ //[!output PREFIX]ApplySchemaCommand & operator= (const [!output PREFIX]ApplySchemaCommand &right); ///<summary>Gets the schema to create.</summary> /// <returns>Returns the schema that would be created.</returns> FdoFeatureSchema* [!output PREFIX]ApplySchemaCommand::GetFeatureSchema () { return (FDO_SAFE_ADDREF (mSchema.p)); } ///<summary>Sets the schema to create.</summary> /// <param name="value">Input the definition of the schema to create.</param> /// <returns>Returns nothing</returns> void [!output PREFIX]ApplySchemaCommand::SetFeatureSchema (FdoFeatureSchema* value) { mSchema = FDO_SAFE_ADDREF (value); }
/// <summary>Gets the raster object of the specified property. /// Because no conversion is performed, the property must be /// of Raster type; otherwise, an exception is thrown.</summary> /// <param name="propertyName">Input the property name.</param> /// <returns>Returns the raster object.</returns> FdoIRaster* SuperMapFeatureReader::GetRaster (FdoString* identifier) { if(NULL == m_pDatasetRaster || NULL == identifier) { return NULL; } FdoPtr<FdoIRaster> rv = new SuperMapRaster(m_pDatasetRaster, FDO_SAFE_ADDREF(m_ClassDef.p)); return FDO_SAFE_ADDREF(rv.p); }
FdoPtr<FdoSmPhRdDbObjectReader> FdoSmPhOdbcOwner::CreateDbObjectReader( FdoStringP dbObject) const { FdoSmPhOdbcOwner* pOwner = (FdoSmPhOdbcOwner*) this; FdoSmPhOdbcMgrP mgr = pOwner->GetManager()->SmartCast<FdoSmPhOdbcMgr>(); rdbi_vndr_info_def info; rdbi_vndr_info( mgr->GetRdbiContext(), &info ); if( info.dbversion == RDBI_DBVERSION_ODBC_ORACLE ) return new FdoSmPhRdOraOdbcDbObjectReader( FDO_SAFE_ADDREF(pOwner), dbObject ); else return new FdoSmPhRdOdbcDbObjectReader( FDO_SAFE_ADDREF(pOwner), dbObject ); }
FdoDataPropertyDefinitionCollection* GwsBinaryFeatureWriter::FindIDProps(FdoClassDefinition* fc) { FdoPtr <FdoDataPropertyDefinitionCollection> idpdc = fc->GetIdentityProperties(); FdoPtr<FdoClassDefinition> base = FDO_SAFE_ADDREF(fc); //go up class hierarchy to find base class (it has the identity properties) while ((base = base->GetBaseClass()) != NULL) idpdc = base->GetIdentityProperties(); if (idpdc->GetCount() == 0) return NULL; return (FDO_SAFE_ADDREF (idpdc.p)); }
FdoExpressionEngineFunctionCollection* FdoRdbmsSelectCommand::GetUserDefinedFunctions( FdoSmLpSpatialContextCollection *scColl, FdoClassDefinition *classDef ) { // Length2D and Area2D require to pass in the 'geodetic' flag. // Check the associated coordinate system. In case it is geodetic, create a custom function. FdoPtr<FdoExpressionEngineFunctionCollection> userDefinedFunctions; if (classDef->GetClassType() == FdoClassType_FeatureClass) { FdoPtr<FdoGeometricPropertyDefinition> gpd = ((FdoFeatureClass*)classDef)->GetGeometryProperty(); if ( gpd ) { FdoStringP scname = gpd->GetSpatialContextAssociation(); if ( scname.GetLength() != 0 ) { FdoSmLpSpatialContextP sc = scColl->FindItem( scname ); FdoStringP wkt = sc->GetCoordinateSystemWkt(); if ( wkt.Contains( L"PROJCS" ) ) ; // do nothing else if ( wkt.Contains( L"GEOGCS" ) ) { userDefinedFunctions = FdoExpressionEngineFunctionCollection::Create(); userDefinedFunctions->Add( FdoFunctionLength2D::Create(true)); userDefinedFunctions->Add( FdoFunctionArea2D::Create(true)); } } } } return FDO_SAFE_ADDREF(userDefinedFunctions.p); }
FdoIdentifierCollection* FdoRdbmsSelectCommand::GetOrdering() { if( mOrderingIdentifiers == NULL ) mOrderingIdentifiers = FdoIdentifierCollection::Create(); return FDO_SAFE_ADDREF(mOrderingIdentifiers); }
FdoFunctionDefinition* ExpressionFunctionArgb::GetFunctionDefinition() { if (!m_functionDefinition) { STRING funcDesc = MgUtil::GetResourceMessage(MgResources::Stylization, L"MgFunctionARGB_Description"); STRING aValDesc = MgUtil::GetResourceMessage(MgResources::Stylization, L"MgFunctionARGB_AValueDescription"); STRING rValDesc = MgUtil::GetResourceMessage(MgResources::Stylization, L"MgFunctionARGB_RValueDescription"); STRING gValDesc = MgUtil::GetResourceMessage(MgResources::Stylization, L"MgFunctionARGB_GValueDescription"); STRING bValDesc = MgUtil::GetResourceMessage(MgResources::Stylization, L"MgFunctionARGB_BValueDescription"); FdoPtr<FdoArgumentDefinition> arg1 = FdoArgumentDefinition::Create(L"aValue", aValDesc.c_str(), FdoDataType_Int32); // NOXLATE FdoPtr<FdoArgumentDefinition> arg2 = FdoArgumentDefinition::Create(L"rValue", rValDesc.c_str(), FdoDataType_Int32); // NOXLATE FdoPtr<FdoArgumentDefinition> arg3 = FdoArgumentDefinition::Create(L"gValue", gValDesc.c_str(), FdoDataType_Int32); // NOXLATE FdoPtr<FdoArgumentDefinition> arg4 = FdoArgumentDefinition::Create(L"bValue", bValDesc.c_str(), FdoDataType_Int32); // NOXLATE FdoPtr<FdoArgumentDefinitionCollection> args = FdoArgumentDefinitionCollection::Create(); args->Add(arg1); args->Add(arg2); args->Add(arg3); args->Add(arg4); m_functionDefinition = FdoFunctionDefinition::Create(L"ARGB", // NOXLATE funcDesc.c_str(), FdoDataType_Int32, args, FdoFunctionCategoryType_String, false); } return FDO_SAFE_ADDREF(m_functionDefinition); }
void MgSelectCommand::SetFilter(FdoFilter* value) { CHECKNULL((FdoISelect*)m_command, L"MgSelectCommand.SetFilter"); m_command->SetFilter(value); m_filter = FDO_SAFE_ADDREF(value); }
FdoByteArray* SuperMapRaster::GetBounds () { TRACE(_T("调用 SuperMapRaster::GetBounds()... \n")); FdoPtr<FdoByteArray> ret; FdoPtr<FdoIEnvelope> envelope; //包围盒 if( NULL != m_pDatasetRaster ) { UGC::UGRect2D recBound = m_pDatasetRaster->GetBounds(); TRACE(_T("调用 SuperMapRaster::GetBounds()...left=[%f],bottom=[%f],top=[%f],right=[%f] \n"), recBound.left, recBound.bottom, recBound.top, recBound.right); FdoFgfGeometryFactory *pFactory = FdoFgfGeometryFactory::GetInstance(); if( NULL != pFactory ) { envelope = pFactory->CreateEnvelopeXY(recBound.left, recBound.bottom, recBound.right, recBound.top); FdoPtr<FdoIGeometry> geometry = pFactory->CreateGeometry(envelope); ret = pFactory->GetFgf(geometry.p); } } return FDO_SAFE_ADDREF(ret.p); }
void FdoXmlElementMapping::SetClassMapping(FdoXmlClassMapping* classMapping) { mClassMapping = FDO_SAFE_ADDREF(classMapping); // Reference to class mapping is no longer dangling. mClassName = L""; mSchemaName = L""; }
FdoXmlReader* FdoXmlSpatialContextReader::GetXmlReader() { FdoXmlReader* pReader = mXmlReader; FDO_SAFE_ADDREF( pReader ); return pReader; }
FdoXmlSpatialContextReader::FdoXmlSpatialContextReader( FdoXmlReader* reader, FdoXmlSpatialContextFlags* flags ) { mXmlReader = FDO_SAFE_ADDREF(reader); if ( flags ) mXmlFlags = FDO_SAFE_ADDREF(flags); else mXmlFlags = FdoXmlSpatialContextFlags::Create(); // Initialize the reader handler mSCHandler = FdoXmlSCReadHandler::Create(); mSCHandler->mFirst = false; mSCHandler->Setup( mXmlFlags ); }
MgdSqlDataReader::MgdSqlDataReader(MgdFeatureConnection* conn, FdoISQLDataReader* reader) { m_reader = FDO_SAFE_ADDREF(reader); m_connection = SAFE_ADDREF(conn); // The reader takes ownership of the FDO connection m_connection->OwnReader(); }
///<summary>Executes the GetLockedObjects command, returning an FdoILockedObjectReader.</summary> /// <returns>Returns FdoILockedObjectReade.r</returns> FdoILockedObjectReader* ArcSDEGetLockedObjectsCommand::Execute () { FdoPtr<ArcSDEConnection> connection; CHAR user_name[SE_MAX_OWNER_LEN]; FdoStringP user_str; CHAR* user; LONG result; SE_REGINFO *registrations; LONG count; CHAR table_name[SE_QUALIFIED_TABLE_NAME]; LONG number; LONG *ids; FdoPtr<ArcSDELockedObjectReader> ret; // verify the connection connection = static_cast<ArcSDEConnection*>(GetConnection ()); if (connection == NULL) throw FdoException::Create (NlsMsgGet (ARCSDE_CONNECTION_NOT_ESTABLISHED, "Connection not established.")); // establish an empty locked object reader ret = new ArcSDELockedObjectReader (connection); // get the user name if (NULL == GetLockOwner () || (0 == wcscmp (L"", GetLockOwner ()))) { result = SE_connection_get_user_name (connection->GetConnection (), user_name); handle_sde_err<FdoCommandException> (connection->GetConnection (), result, __FILE__, __LINE__, ARCSDE_USER_UNKNOWN, "Cannot determine current user."); user = user_name; } else { user_str = mLockOwner.Upper(); #ifdef SDE_UNICODE user = (CHAR*)sde_cstwc(user_str); #else sde_wide_to_multibyte (user, (FdoString*)user_str); #endif } // process the list of registered arcsde tables, checking for locks by user (or not) // Read all registered arcsde tables, adding user locks on the rows to the FdoILockedObjectReader connection->GetArcSDERegistrationList(®istrations, &count); for (int i = 0; i < count; i++) { if (SE_reginfo_allow_rowlocks (registrations[i])) { result = SE_reginfo_get_table_name (registrations[i], table_name); handle_sde_err<FdoCommandException> (connection->GetConnection(), result, __FILE__, __LINE__, ARCSDE_REGISTRATION_INFO_ITEM, "Table registration info item '%1$ls' could not be retrieved.", L"table_name"); result = SE_table_get_rowlocks_by_user (connection->GetConnection(), table_name, user, &number, &ids); handle_sde_err<FdoCommandException>(connection->GetConnection(), result, __FILE__, __LINE__, ARCSDE_GET_ROW_LOCK_LIST_FAILED, "Failed to get the row lock list."); for (int j = 0; j < number; j++) ret->AddIdentity (table_name, ids[j]); SE_table_free_rowlocks_list (number, ids, NULL); } } return (FDO_SAFE_ADDREF (ret.p)); }
ArcSDEDataStoreReader::ArcSDEDataStoreReader(ArcSDEConnection* connection) { mConnection = FDO_SAFE_ADDREF(connection); mDataStoreIndex = -1; // Grab the datastore list: FdoPtr<FdoIConnectionInfo> connInfo = connection->GetConnectionInfo(); mConnProps = connInfo->GetConnectionProperties(); }
/// <summary>Returns a collection of FdoFunctionDefinition objects the feature provider supports within expressions.</summary> /// <returns>Returns the collection of function definitions</returns> FdoFunctionDefinitionCollection* ArcSDEExpressionCapabilities::GetFunctions() { if (NULL == m_supportedFunctions) { m_supportedFunctions = FdoExpressionEngine::GetStandardFunctions(); } return (FDO_SAFE_ADDREF (m_supportedFunctions.p)); }
FdoSmPhColumnP FdoSmPhPostGisColumn::GetBaseColumn() { if ( !mBaseColumn ) { FdoSmPhDbObjectP parent = FDO_SAFE_ADDREF( (FdoSmPhDbObject*)(FdoSmPhDbElement*)(GetParent()) ); mBaseColumn = GetBaseColumn( parent ); } return mBaseColumn; }
FdoRdbmsOvClassDefinition* FdoSqlServerOvPropertyMappingRelation::CreateInternalClass( bool attach ) { FdoSqlServerOvClassP internalClass = FdoSqlServerOvClassDefinition::Create(); if ( attach ) SetInternalClass( internalClass ); return FDO_SAFE_ADDREF(internalClass.p); }
FdoException* FdoException::GetRootCause() { FdoException* pRoot = NULL; if (m_cause != NULL) pRoot = m_cause->GetRootCause(); else pRoot = FDO_SAFE_ADDREF(this); return pRoot; }
FdoPtr<FdoSmPhRdColumnReader> FdoSmPhPostGisOwner::CreateColumnReader(FdoStringsP objectNames) const { FdoSmPhPostGisOwner* thisOwner = NULL; thisOwner = const_cast<FdoSmPhPostGisOwner*>(this); FDO_SAFE_ADDREF(thisOwner); FdoSmPhRdPostGisColumnReader* reader = NULL; reader = new FdoSmPhRdPostGisColumnReader(thisOwner, objectNames); return reader; }
///<summary>Sets the name of the schema to destroy as a string.</summary> /// <param name="value">Input the name of the schema to destroy</param> /// <returns>Returns nothing</returns> void ArcSDEDestroySchemaCommand::SetSchemaName (FdoString* value) { FDO_SAFE_RELEASE(mSchemaName); mSchemaName = NULL; if (value != NULL) { FdoPtr<FdoIdentifier> name = FdoIdentifier::Create (value); mSchemaName = name; FDO_SAFE_ADDREF(mSchemaName); } }
FdoDataValue* SuperMapRaster::GetNullPixelValue () { TRACE(_T("调用 SuperMapRaster::GetNullPixelValue()... \n")); FdoPtr<FdoDataValue> val; if( NULL != m_pDatasetRaster ) { double noValue = m_pDatasetRaster->GetNoValue(); val = FdoDoubleValue::Create(noValue); } return FDO_SAFE_ADDREF(val.p); }
FdoPtr<FdoSmPhRdColumnReader> FdoSmPhPostGisOwner::CreateColumnReader() const { FdoSmPhPostGisOwner* thisOwner = NULL; thisOwner = const_cast<FdoSmPhPostGisOwner*>(this); FDO_SAFE_ADDREF(thisOwner); FdoSmPhRdPostGisColumnReader* reader = NULL; reader = new FdoSmPhRdPostGisColumnReader(thisOwner, (FdoSmPhDbObject*) NULL); return reader; }
FdoPtr<FdoSmPhRdDbObjectReader> FdoSmPhPostGisOwner::CreateDbObjectReader( FdoStringP dbObject) const { FdoSmPhPostGisOwner* thisOwner = NULL; thisOwner = const_cast<FdoSmPhPostGisOwner*>(this); FDO_SAFE_ADDREF(thisOwner); FdoSmPhRdPostGisDbObjectReader* reader = NULL; reader = new FdoSmPhRdPostGisDbObjectReader(thisOwner, dbObject); return reader; }
FdoPtr<FdoSmPhRdConstraintReader> FdoSmPhPostGisOwner::CreateConstraintReader( FdoStringP constraintName) const { FdoSmPhPostGisOwner* thisOwner = NULL; thisOwner = const_cast<FdoSmPhPostGisOwner*>(this); FDO_SAFE_ADDREF(thisOwner); FdoSmPhRdPostGisConstraintReader* reader = NULL; reader = new FdoSmPhRdPostGisConstraintReader(thisOwner, constraintName); return reader; }
FdoPtr<FdoSmPhRdColumnReader> FdoSmPhPostGisOwner::CreateColumnReader( FdoSmPhRdTableJoinP join) const { FdoSmPhPostGisOwner* thisOwner = NULL; thisOwner = const_cast<FdoSmPhPostGisOwner*>(this); FDO_SAFE_ADDREF(thisOwner); FdoSmPhRdPostGisColumnReader* reader = NULL; reader = new FdoSmPhRdPostGisColumnReader(thisOwner, join); return reader; }
// Given a GML URI name, return the LogicalPhysical schema object, which contains the // Feature Schema and corresponding Schema Mapping set. // Returns NULL if the schema is not present. FdoXmlLpSchema* FdoXmlSchemaManager::UriToSchema( FdoString* schemaUri ) { FdoXmlLpSchemaCollection* lpSchemas = _schemas(); FdoInt32 count = lpSchemas->GetCount(); FdoPtr<FdoXmlLpSchema> lpSchema; for (int i = 0; i < count; i++) { lpSchema = lpSchemas->GetItem(i); FdoPtr<FdoXmlSchemaMapping> mapping = lpSchema->GetMappings(); if (wcscmp(mapping->GetTargetNamespace(), schemaUri) == 0) break; lpSchema = NULL; } return FDO_SAFE_ADDREF(lpSchema.p); }
FdoPtr<FdoSmPhRdBaseObjectReader> FdoSmPhOdbcOwner::CreateBaseObjectReader() const { FdoSmPhOdbcOwner* pOwner = (FdoSmPhOdbcOwner*) this; FdoSmPhOdbcMgrP mgr = pOwner->GetManager()->SmartCast<FdoSmPhOdbcMgr>(); rdbi_vndr_info_def info; rdbi_vndr_info( mgr->GetRdbiContext(), &info ); // The Oracle primary key reader use bulk load to load all the primary keys. if( info.dbversion == RDBI_DBVERSION_ODBC_ORACLE ) return new FdoSmPhRdOdbcOraBaseObjectReader( FDO_SAFE_ADDREF(pOwner) ); else return (FdoSmPhRdBaseObjectReader *)NULL; }
void SuperMapRaster::SetDataModel (FdoRasterDataModel* datamodel) { TRACE(_T("调用 SuperMapRaster::SetDataModel()... \n")); if (datamodel == NULL || !m_bNull) { return; } FdoPtr<SuperMapRasterCapabilities> rasterCap = new SuperMapRasterCapabilities(); if (!rasterCap->SupportsDataModel(datamodel)) { return; } m_dataModel = FDO_SAFE_ADDREF(datamodel); }