- Main Page
- Related Pages
- Modules
- Classes
- Files

# IPropertyDictionary.h

Go to the documentation of this file.

    00001 #ifndef _IPROPERTYDICTIONARY_H_
    00002 #define _IPROPERTYDICTIONARY_H_
    00003 //
    00004
    00005 //
    00006 // Copyright (C) 2004-2006  Autodesk, Inc.
    00007 //
    00008 // This library is free software; you can redistribute it and/or
    00009 // modify it under the terms of version 2.1 of the GNU Lesser
    00010 // General Public License as published by the Free Software Foundation.
    00011 //
    00012 // This library is distributed in the hope that it will be useful,
    00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015 // Lesser General Public License for more details.
    00016 //
    00017 // You should have received a copy of the GNU Lesser General Public
    00018 // License along with this library; if not, write to the Free Software
    00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    00020 //
    00021
    00022 #ifdef _WIN32
    00023 #pragma once
    00024 #endif
    00025
    00026 #include <FdoStd.h>
    00027
    00028 /// \brief
    00029 /// The FdoIPropertyDictionary exposes a dictionary style interface
    00030 /// to the connection properties. The properties required to establish a connection
    00031 /// can be determined and their values can be set through this interface.
    00032 /// Modifying connection properties through this
    00033 /// interface dynamically modifies the connection string held by the connection
    00034 /// object. When the connection is in an open state, calling SetProperty on this
    00035 /// interface will result in an error.
    00036 class FdoIPropertyDictionary : public FdoIDisposable
    00037 {
    00038 public:
    00039     /// \brief
    00040     ///  Gets the names of all the properties that can appear in a connection string
    00041     /// for this feature provider as an array of Strings. The order of the property
    00042     /// names in the resulting array dictate the order in which they need to be
    00043     /// specified. This is especially important for the success of the
    00044     /// EnumeratePropertyValues method because properties that occur earlier in the array
    00045     /// may be required for successful enumeration of properties that appear later.
    00046     ///
    00047     /// \param count
    00048     /// Output the number of parameters
    00049     ///
    00050     /// \return
    00051     /// Returns the list of parameter names
    00052     ///
    00053     FDO_API virtual FdoString** GetPropertyNames(FdoInt32& count) = 0;
    00054
    00055     /// \brief
    00056     /// Gets the value of the specified property.
    00057     ///
    00058     /// \param name
    00059     /// Input the property name.
    00060     ///
    00061     /// \return
    00062     /// Returns the property value.
    00063     ///
    00064     FDO_API virtual FdoString* GetProperty(FdoString* name) = 0;
    00065
    00066     /// \brief
    00067     /// Sets the value of the specified property. An exception is thrown if the connection is currently open.
    00068     ///
    00069     /// \param name
    00070     /// Input the property name
    00071     /// \param value
    00072     /// Input the property value
    00073     ///
    00074     /// \return
    00075     /// Returns nothing
    00076     ///
    00077     FDO_API virtual void SetProperty(FdoString* name, FdoString* value) = 0;
    00078
    00079     /// \brief
    00080     /// Gets the default value for the specified property.
    00081     ///
    00082     /// \param name
    00083     /// Input the property name
    00084     ///
    00085     /// \return
    00086     /// Returns the property default value
    00087     ///
    00088     FDO_API virtual FdoString* GetPropertyDefault(FdoString* name) = 0;
    00089
    00090     /// \brief
    00091     /// Determines if the specified property is required.
    00092     ///
    00093     /// \param name
    00094     /// Input the property name
    00095     ///
    00096     /// \return
    00097     /// Returns true if the specified property is required
    00098     ///
    00099     FDO_API virtual bool IsPropertyRequired(FdoString* name) = 0;
    00100
    00101     /// \brief
    00102     ///  Indicates if the property is a password or other protected field
    00103     /// that should be kept secure.
    00104     ///
    00105     /// \param name
    00106     /// Input the property name.
    00107     ///
    00108     /// \return
    00109     /// Returns true if the property is a password or other protected field
    00110     /// that should be kept secure.
    00111     ///
    00112     FDO_API virtual bool IsPropertyProtected(FdoString* name) = 0;
    00113
    00114     /// \brief
    00115     /// Determines if the possible values for the specified property can be enumerated via the EnumeratePropertyValues method.
    00116     ///
    00117     /// \param name
    00118     /// Input the property name
    00119     ///
    00120     /// \return
    00121     /// Returns true if the possible values for the specified property can be enumerated.
    00122     ///
    00123     FDO_API virtual bool IsPropertyEnumerable(FdoString* name) = 0;
    00124
    00125     /// \brief
    00126     ///  Returns an array of possible values for the specified property.
    00127     ///
    00128     /// \param name
    00129     /// Input the property name.
    00130     /// \param count
    00131     /// Output the number of values.
    00132     ///
    00133     /// \return
    00134     /// Returns the list of values for this property.
    00135     ///
    00136     FDO_API virtual FdoString** EnumeratePropertyValues(FdoString* name, FdoInt32& count) = 0;
    00137
    00138     /// \brief
    00139     ///  Gets a localized name for the property (for NLS purposes).
    00140     ///
    00141     /// \param name
    00142     /// Input the property name.
    00143     ///
    00144     /// \return
    00145     /// Returns the localized name for the property (for NLS purposes).
    00146     ///
    00147     FDO_API virtual FdoString* GetLocalizedName(FdoString* name) = 0;
    00148
    00149     /// \brief
    00150     /// Determines if the specified property represents a file name.
    00151     ///
    00152     /// \param name
    00153     /// Input the property name
    00154     ///
    00155     /// \return
    00156     /// Returns true if the specified property is a file name
    00157     ///
    00158     FDO_API virtual bool IsPropertyFileName(FdoString* name) = 0;
    00159
    00160     /// \brief
    00161     /// Determines if the specified property represents a path name.
    00162     ///
    00163     /// \param name
    00164     /// Input the property name
    00165     ///
    00166     /// \return
    00167     /// Returns true if the specified property is a path name
    00168     ///
    00169     FDO_API virtual bool IsPropertyFilePath(FdoString* name) = 0;
    00170
    00171     /// \brief
    00172     /// Determines if the specified property represents a datastore name.
    00173     ///
    00174     /// \param name
    00175     /// Input the property name
    00176     ///
    00177     /// \return
    00178     /// Returns true if the specified property is a datastore name
    00179     ///
    00180     FDO_API virtual bool IsPropertyDatastoreName(FdoString* name) = 0;
    00181
    00182 };
    00183 #endif
    00184
    00185

Please send us your comment about this page