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

# Provider.h

Go to the documentation of this file.

    00001 #ifndef _FDOPROVIDER_H_
    00002 #define _FDOPROVIDER_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  *
    00023  ***************************************************************************/
    00024
    00025 #ifdef _WIN32
    00026 #pragma once
    00027 #endif
    00028
    00029 // Include definitions
    00030 #include <string>
    00031 #include <FdoStd.h>
    00032 #include <Fdo/ClientServices/ClientServices.h>
    00033
    00034 /// \brief
    00035 /// Provides information about a feature provider, including name, description, library, and version information.
    00036 class FdoProvider : public FdoIDisposable
    00037 {
    00038     /// Instances of interface FdoProviderRegistry/FdoRegistryUtility/FdoProviderCollection
    00039     /// are responsible for the lifespan of FdoProvider
    00040     friend class FdoProviderRegistry;
    00041     friend class FdoRegistryUtility;
    00042     friend class FdoProviderCollection;
    00043
    00044 /// \cond DOXYGEN-IGNORE
    00045 protected:
    00046     /// Constructs a default instance of a FdoProvider.
    00047
    00048     FdoProvider();
    00049
    00050     FdoProvider(const wchar_t* name,
    00051                 const wchar_t* displayName,
    00052                 const wchar_t* description,
    00053                 const wchar_t* version,
    00054                 const wchar_t* fdoVersion,
    00055                 const wchar_t* libraryPath,
    00056                 bool managed);
    00057
    00058     /// Default destructor for FdoProvider.
    00059     virtual ~FdoProvider();
    00060
    00061     virtual void Dispose();
    00062
    00063     /// Sets the values of the provider.
    00064     virtual void Set(const wchar_t* name,
    00065                      const wchar_t* displayName,
    00066                      const wchar_t* description,
    00067                      const wchar_t* version,
    00068                      const wchar_t* fdoVersion,
    00069                      const wchar_t* libraryPath,
    00070                      bool managed);
    00071 /// \endcond
    00072 public:
    00073     /// \brief
    00074     /// Gets the unique name of the feature provider. This name should be of the form
    00075     /// [Company].[Provider].[Version].
    00076     ///
    00077     /// \return
    00078     /// Returns the name as a constant wchar_t*.
    00079     /// Throws an instance of FdoClientServicesException * if an error occurs.
    00080     ///
    00081     FDO_API virtual const wchar_t* GetName() const;
    00082
    00083     /// \brief
    00084     /// Gets a user friendly display name of the feature provider.
    00085     ///
    00086     /// \return
    00087     /// Returns the display name as a constant wchar_t*.
    00088     /// Throws an instance of FdoClientServicesException * if an error occurs.
    00089     ///
    00090     FDO_API virtual const wchar_t* GetDisplayName() const;
    00091
    00092     /// \brief
    00093     /// Gets a brief description of the feature provider.
    00094     ///
    00095     /// \return
    00096     /// Returns the description as a constant wchar_t*.
    00097     /// Throws an instance of FdoClientServicesException * if an error occurs.
    00098     ///
    00099     FDO_API virtual const wchar_t* GetDescription() const;
    00100
    00101     /// \brief
    00102     /// Gets the version of the feature provider. The version number string has the form
    00103     /// [VersionMajor].[VersionMinor].[BuildMajor].[BuildMinor].
    00104     ///
    00105     /// \return
    00106     /// Returns the version as a constant wchar_t*.
    00107     /// Throws an instance of FdoClientServicesException * if an error occurs.
    00108     ///
    00109     FDO_API virtual const wchar_t* GetVersion() const;
    00110
    00111     /// \brief
    00112     /// Gets the version of the feature data objects specification the feature provider conforms to.
    00113     /// The version number string has the form [VersionMajor].[VersionMinor].[BuildMajor].[BuildMinor].
    00114     ///
    00115     /// \return
    00116     /// Returns the Feature Data Objects version as a constant wchar_t*.
    00117     /// Throws an instance of FdoClientServicesException * if an error occurs.
    00118     ///
    00119     FDO_API virtual const wchar_t* GetFeatureDataObjectsVersion() const;
    00120
    00121     /// \brief
    00122     /// Gets the FULL library path + library name of the provider.
    00123     ///
    00124     /// \return
    00125     /// Returns the library path as a constant wchar_t*.
    00126     /// Throws an instance of FdoClientServicesException * if an error occurs.
    00127     ///
    00128     FDO_API virtual const wchar_t* GetLibraryPath() const;
    00129
    00130     /// \brief
    00131     /// Gets a boolean flag indicating if the provider is a managed or unmanaged provider.
    00132     ///
    00133     /// \return
    00134     /// Returns the managed state flag as a bool.
    00135     /// Throws an instance of FdoClientServicesException * if an error occurs.
    00136     ///
    00137     FDO_API virtual bool GetIsManaged() const;
    00138
    00139 private:
    00140     /// private data holding the data used to construct the object
    00141     std::wstring m_name;
    00142     std::wstring m_displayName;
    00143     std::wstring m_description;
    00144     std::wstring m_version;
    00145     std::wstring m_fdoVersion;
    00146     std::wstring m_libraryPath;
    00147     bool m_isManaged;
    00148 };
    00149 #endif
    00150
    00151

Please send us your comment about this page