FDO API Reference Feature Data Objects

Class.h

Go to the documentation of this file.
00001 #ifndef _CLASS_H_
00002 #define _CLASS_H_
00003 
00004 //
00005 // Copyright (C) 2004-2006  Autodesk, Inc.
00006 // 
00007 // This library is free software; you can redistribute it and/or
00008 // modify it under the terms of version 2.1 of the GNU Lesser
00009 // General Public License as published by the Free Software Foundation.
00010 // 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 // 
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 
00021 #ifdef _WIN32
00022 #pragma once
00023 #endif
00024 
00025 #include <FdoStd.h>
00026 #include <Fdo/Schema/ClassDefinition.h>
00027 #include <Fdo/Schema/ClassType.h>
00028 
00029 /// \brief
00030 /// The FdoClass class derives from FdoClassDefinition and can be used to represent any type of
00031 /// non-spatial data within a feature schema. Typically, classes are used in the
00032 /// feature schema to define complex properties of other feature types by
00033 /// containment. However, they can also be used at global scope and
00034 /// instances can be created, deleted, updated, and selected through FDO
00035 /// commands. The Class type does not pre-define any base properties.
00036 class FdoClass : public FdoClassDefinition
00037 {
00038 protected:
00039 /// \cond DOXYGEN-IGNORE
00040     /// Constructs a default instance of an FdoClass.
00041     FdoClass();
00042 
00043     /// Constructs an instance of an FdoClass using the specified arguments.
00044     FdoClass(FdoString* name, FdoString* description);
00045 
00046     virtual ~FdoClass();
00047 
00048     virtual void Dispose();
00049 /// \endcond
00050 
00051 public:
00052     /// \brief
00053     /// Constructs a default instance of an FdoClass.
00054     /// 
00055     /// \return
00056     /// Returns FdoClass
00057     /// 
00058     FDO_API static FdoClass* Create();
00059 
00060     /// \brief
00061     /// Constructs an instance of an FdoClass using the specified arguments.
00062     /// 
00063     /// \param name 
00064     /// Input name
00065     /// \param description 
00066     /// Input description
00067     /// 
00068     /// \return
00069     /// Returns FdoClass
00070     /// 
00071     FDO_API static FdoClass* Create(FdoString* name, FdoString* description);
00072 
00073     /// \brief
00074     /// Gets the concrete class type.
00075     /// 
00076     /// \return
00077     /// Returns class type
00078     /// 
00079     FDO_API virtual FdoClassType GetClassType();
00080 
00081 /// \cond DOXYGEN-IGNORE
00082     /// Public non-API functions for XML support
00083 
00084     /// Initialize this class from its XML attributes
00085     virtual void InitFromXml(const FdoString* classTypeName, FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
00086 
00087     /// Serializes this class to XML.
00088     virtual void _writeXml( FdoSchemaXmlContext* pContext );
00089 /// \endcond
00090 };
00091 
00092 /// \brief
00093 /// FdoClassP is a FdoPtr on FdoClass, provided for convenience.
00094 typedef FdoPtr<FdoClass> FdoClassP;
00095 
00096 #endif
00097 
00098 

Comments or suggestions? Send us feedback.