本文整理汇总了C++中FDO_SAFE_ADDREF函数的典型用法代码示例。如果您正苦于以下问题:C++ FDO_SAFE_ADDREF函数的具体用法?C++ FDO_SAFE_ADDREF怎么用?C++ FDO_SAFE_ADDREF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FDO_SAFE_ADDREF函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TRACE
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);
}
示例2: return
[!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);
}
示例3: SuperMapRaster
/// <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);
}
示例4: rdbi_vndr_info
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 );
}
示例5: FDO_SAFE_ADDREF
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));
}
示例6: if
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);
}
示例7: FDO_SAFE_ADDREF
FdoIdentifierCollection* FdoRdbmsSelectCommand::GetOrdering()
{
if( mOrderingIdentifiers == NULL )
mOrderingIdentifiers = FdoIdentifierCollection::Create();
return FDO_SAFE_ADDREF(mOrderingIdentifiers);
}
示例8: FDO_SAFE_ADDREF
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);
}
示例9: CHECKNULL
void MgSelectCommand::SetFilter(FdoFilter* value)
{
CHECKNULL((FdoISelect*)m_command, L"MgSelectCommand.SetFilter");
m_command->SetFilter(value);
m_filter = FDO_SAFE_ADDREF(value);
}
示例10: FDO_SAFE_ADDREF
void FdoXmlElementMapping::SetClassMapping(FdoXmlClassMapping* classMapping)
{
mClassMapping = FDO_SAFE_ADDREF(classMapping);
// Reference to class mapping is no longer dangling.
mClassName = L"";
mSchemaName = L"";
}
示例11: FDO_SAFE_ADDREF
FdoXmlReader* FdoXmlSpatialContextReader::GetXmlReader()
{
FdoXmlReader* pReader = mXmlReader;
FDO_SAFE_ADDREF( pReader );
return pReader;
}
示例12: FDO_SAFE_ADDREF
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();
}
示例13: ArcSDELockedObjectReader
///<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));
}
示例14: FDO_SAFE_ADDREF
ArcSDEDataStoreReader::ArcSDEDataStoreReader(ArcSDEConnection* connection)
{
mConnection = FDO_SAFE_ADDREF(connection);
mDataStoreIndex = -1;
// Grab the datastore list:
FdoPtr<FdoIConnectionInfo> connInfo = connection->GetConnectionInfo();
mConnProps = connInfo->GetConnectionProperties();
}
示例15: return
/// <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));
}