OW_MOFGrammar.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2001-2004 Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Vintela, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
00029 *******************************************************************************/
00030 
00035 #ifndef OW_MOF_GRAMMAR_HPP_INCLUDE_GUARD_
00036 #define OW_MOF_GRAMMAR_HPP_INCLUDE_GUARD_
00037 #include "OW_config.h"
00038 #include "OW_String.hpp"
00039 #include "OW_List.hpp"
00040 #include "OW_AutoPtr.hpp"
00041 #include "OW_MOFVisitor.hpp"
00042 #include "OW_MOFLineInfo.hpp"
00043 
00044 #ifdef OW_WIN32
00045 #pragma warning (push)
00046 #pragma warning (disable: 4251)
00047 #endif
00048 
00049 // The classes and functions defined in this file are not meant for general
00050 // use, they are internal implementation details.  They may change at any time.
00051 
00052 namespace OW_NAMESPACE
00053 {
00054 
00055 namespace MOF
00056 {
00057 
00058 class OW_MOF_API Initializer
00059 {
00060 public:
00061    virtual ~Initializer() {}
00062    virtual void Accept( Visitor * ) const = 0;
00063 };
00064 class OW_MOF_API Flavor
00065 {
00066 public:
00067    Flavor( const String *pNewFlavor, const LineInfo& li )
00068    : pFlavor(pNewFlavor)
00069    , theLineInfo(li)
00070    {}
00071    virtual ~Flavor(){}
00072    
00073    void Accept( Visitor *pV ) const { pV->VisitFlavor( this ); }
00074 
00075    AutoPtr< const String > pFlavor;
00076    LineInfo theLineInfo;
00077 };
00078 class OW_MOF_API QualifierParameter
00079 {
00080 public:
00081    virtual ~QualifierParameter() {}
00082    virtual void Accept( Visitor * ) const = 0;
00083 };
00084 class OW_MOF_API ConstantValue
00085 {
00086 public:
00087    virtual ~ConstantValue() {}
00088    virtual void Accept( Visitor * ) const = 0;
00089 };
00090 class OW_MOF_API ArrayInitializer
00091 {
00092 public:
00093    ArrayInitializer( List< ConstantValue * >* pNewConstantValue )
00094       : pConstantValue(pNewConstantValue)
00095    {}
00096    virtual ~ArrayInitializer()
00097    {
00098       while (pConstantValue.get() && !pConstantValue->empty())
00099       {
00100          delete pConstantValue->front();
00101        pConstantValue->pop_front();
00102       }
00103    }
00104    void Accept( Visitor *pV ) const { pV->VisitArrayInitializer( this ); }
00105    AutoPtr< List< ConstantValue * > > pConstantValue;
00106 };
00107 class OW_MOF_API QualifierParameterArrayInitializer : public QualifierParameter
00108 {
00109 public:
00110    QualifierParameterArrayInitializer(
00111       const ArrayInitializer* pNewArrayInitializer,
00112       const LineInfo& li )
00113       : pArrayInitializer(pNewArrayInitializer)
00114       , theLineInfo(li)
00115    {}
00116    virtual ~QualifierParameterArrayInitializer(){}
00117    void Accept( Visitor *pV ) const
00118    {
00119       pV->VisitQualifierParameterArrayInitializer( this );
00120    }
00121    
00122    AutoPtr< const ArrayInitializer > pArrayInitializer;
00123    LineInfo theLineInfo;
00124 };
00125 class OW_MOF_API QualifierParameterConstantValue : public QualifierParameter
00126 {
00127 public:
00128    QualifierParameterConstantValue( const ConstantValue* pNewConstantValue,
00129       const LineInfo& li )
00130       : pConstantValue(pNewConstantValue)
00131       , theLineInfo(li)
00132    {}
00133    virtual ~QualifierParameterConstantValue(){}
00134    void Accept( Visitor *pV ) const
00135    {
00136       pV->VisitQualifierParameterConstantValue( this );
00137    }
00138    
00139    AutoPtr< const ConstantValue > pConstantValue;
00140    LineInfo theLineInfo;
00141 };
00142 class OW_MOF_API QualifierName
00143 {
00144 public:
00145    QualifierName( const String* pNewQualifierName )
00146       : pQualifierName(pNewQualifierName)
00147    {}
00148    virtual ~QualifierName() {}
00149    void Accept( Visitor *pV ) const { pV->VisitQualifierName( this ); }
00150    AutoPtr< const String > pQualifierName;
00151 };
00152 class OW_MOF_API Qualifier
00153 {
00154 public:
00155    Qualifier( const QualifierName* pNewQualifierName,
00156       const QualifierParameter* pNewQualifierParameter,
00157       List< Flavor * >* pNewFlavor,
00158       const LineInfo& li )
00159       : pQualifierName(pNewQualifierName)
00160       , pQualifierParameter(pNewQualifierParameter)
00161       , pFlavor(pNewFlavor)
00162       , theLineInfo(li)
00163    {}
00164    virtual ~Qualifier()
00165    {
00166       while (pFlavor.get() && !pFlavor->empty())
00167       {
00168          delete pFlavor->front();
00169        pFlavor->pop_front();
00170       }
00171    }
00172    void Accept( Visitor *pV ) const { pV->VisitQualifier( this ); }
00173    
00174    AutoPtr< const QualifierName > pQualifierName;
00175    AutoPtr< const QualifierParameter > pQualifierParameter;
00176    AutoPtr< List< Flavor * > > pFlavor;
00177    LineInfo theLineInfo;
00178 };
00179 class OW_MOF_API DefaultValue
00180 {
00181 public:
00182    DefaultValue( const Initializer* pNewInitializer)
00183       : pInitializer(pNewInitializer)
00184    {}
00185    virtual ~DefaultValue(){}
00186    void Accept( Visitor *pV ) const { pV->VisitDefaultValue( this ); }
00187    AutoPtr< const Initializer > pInitializer;
00188 };
00189 class OW_MOF_API ValueInitializer
00190 {
00191 public:
00192    ValueInitializer( List< Qualifier * >* pNewQualifier,
00193       const String* pNewValueInitializer,
00194       const DefaultValue* pNewDefaultValue )
00195       : pQualifier(pNewQualifier)
00196       , pValueInitializer(pNewValueInitializer)
00197       , pDefaultValue(pNewDefaultValue)
00198    {}
00199    virtual ~ValueInitializer()
00200    {
00201       while (pQualifier.get() && !pQualifier->empty())
00202       {
00203          delete pQualifier->front();
00204          pQualifier->pop_front();
00205       }
00206    }
00207    void Accept( Visitor *pV ) const { pV->VisitValueInitializer( this ); }
00208    AutoPtr< List< Qualifier * > > pQualifier;
00209    AutoPtr< const String > pValueInitializer;
00210    AutoPtr< const DefaultValue > pDefaultValue;
00211 };
00212 class OW_MOF_API PropertyName
00213 {
00214 public:
00215    PropertyName( const String* pNewPropertyName )
00216       : pPropertyName(pNewPropertyName)
00217    {}
00218    virtual ~PropertyName() {}
00219    void Accept( Visitor *pV ) const { pV->VisitPropertyName( this ); }
00220    AutoPtr< const String > pPropertyName;
00221 };
00222 class OW_MOF_API ClassName
00223 {
00224 public:
00225    ClassName( const String* pNewClassName )
00226       : pClassName(pNewClassName)
00227    {}
00228    virtual ~ClassName(){}
00229    void Accept( Visitor *pV ) const { pV->VisitClassName( this ); }
00230    AutoPtr< const String > pClassName;
00231 };
00232 class OW_MOF_API AliasIdentifier
00233 {
00234 public:
00235    AliasIdentifier( const String* pNewAliasIdentifier, LineInfo li )
00236       : pAliasIdentifier(pNewAliasIdentifier)
00237       , theLineInfo(li)
00238    {}
00239    virtual ~AliasIdentifier(){}
00240    void Accept( Visitor *pV ) const { pV->VisitAliasIdentifier( this ); }
00241    AutoPtr< const String > pAliasIdentifier;
00242    LineInfo theLineInfo;
00243 };
00244 class OW_MOF_API Alias
00245 {
00246 public:
00247    Alias( const AliasIdentifier* pNewAliasIdentifier )
00248       : pAliasIdentifier(pNewAliasIdentifier)
00249    {}
00250    virtual ~Alias(){}
00251    void Accept( Visitor *pV ) const { pV->VisitAlias( this ); }
00252    AutoPtr< const AliasIdentifier > pAliasIdentifier;
00253 };
00254 class OW_MOF_API InstanceDeclaration
00255 {
00256 public:
00257    InstanceDeclaration(
00258       List< Qualifier * >* pNewQualifier,
00259       const ClassName* pNewClassName,
00260       const Alias* pNewAlias,
00261       List< ValueInitializer * >* pNewValueInitializer,
00262       const LineInfo& li)
00263       : pQualifier(pNewQualifier)
00264       , pClassName(pNewClassName)
00265       , pAlias(pNewAlias)
00266       , pValueInitializer(pNewValueInitializer)
00267       , theLineInfo(li)
00268    {}
00269    virtual ~InstanceDeclaration()
00270    {
00271       while (pQualifier.get() && !pQualifier->empty())
00272       {
00273          delete pQualifier->front();
00274          pQualifier->pop_front();
00275       }
00276       while (pValueInitializer.get() && !pValueInitializer->empty())
00277       {
00278          delete pValueInitializer->front();
00279          pValueInitializer->pop_front();
00280       }
00281    }
00282    void Accept( Visitor *pV ) const { pV->VisitInstanceDeclaration( this ); }
00283    
00284    AutoPtr< List< Qualifier * > > pQualifier;
00285    AutoPtr< const ClassName > pClassName;
00286    AutoPtr< const Alias > pAlias;
00287    AutoPtr< List< ValueInitializer * > > pValueInitializer;
00288     LineInfo theLineInfo;
00289 };
00290 class OW_MOF_API DefaultFlavor
00291 {
00292 public:
00293    DefaultFlavor( List< Flavor * >* pNewFlavor )
00294       : pFlavor(pNewFlavor)
00295    {}
00296    virtual ~DefaultFlavor()
00297    {
00298       while (pFlavor.get() && !pFlavor->empty())
00299       {
00300          delete pFlavor->front();
00301          pFlavor->pop_front();
00302       }
00303    }
00304    void Accept( Visitor *pV ) const { pV->VisitDefaultFlavor( this ); }
00305    
00306    AutoPtr< List< Flavor * > > pFlavor;
00307 };
00308 class OW_MOF_API MetaElement
00309 {
00310 public:
00311    MetaElement( const String* pNewMetaElement, const LineInfo& li )
00312       : pMetaElement(pNewMetaElement)
00313       , theLineInfo(li)
00314    {}
00315    virtual ~MetaElement(){}
00316    void Accept( Visitor *pV ) const { pV->VisitMetaElement( this ); }
00317    AutoPtr< const String > pMetaElement;
00318    LineInfo theLineInfo;
00319 };
00320 class OW_MOF_API Scope
00321 {
00322 public:
00323    Scope( List< MetaElement * >* pNewMetaElement )
00324       : pMetaElement(pNewMetaElement)
00325    {}
00326    virtual ~Scope()
00327    {
00328       while (pMetaElement.get() && !pMetaElement->empty())
00329       {
00330          delete pMetaElement->front();
00331          pMetaElement->pop_front();
00332       }
00333    }
00334    void Accept( Visitor *pV ) const { pV->VisitScope( this ); }
00335    
00336    AutoPtr< List< MetaElement * > > pMetaElement;
00337 };
00338 class OW_MOF_API DataType
00339 {
00340 public:
00341    DataType( const String* pNewDataType )
00342       : pDataType(pNewDataType)
00343    {}
00344    virtual ~DataType(){}
00345    void Accept( Visitor *pV ) const { pV->VisitDataType( this ); }
00346    AutoPtr< const String > pDataType;
00347 };
00348 class OW_MOF_API IntegerValue
00349 {
00350 public:
00351    virtual ~IntegerValue() {}
00352    virtual void Accept( Visitor * ) const = 0;
00353 };
00354 class OW_MOF_API Array
00355 {
00356 public:
00357    Array( const IntegerValue* pNewArray )
00358       : pArray(pNewArray)
00359    {}
00360    virtual ~Array(){}
00361    void Accept( Visitor *pV ) const { pV->VisitArray( this ); }
00362    AutoPtr< const IntegerValue > pArray;
00363 };
00364 class OW_MOF_API QualifierType
00365 {
00366 public:
00367    QualifierType( const DataType* pNewDataType,
00368       const Array* pNewArray,
00369       const DefaultValue* pNewDefaultValue )
00370       : pDataType(pNewDataType)
00371       , pArray(pNewArray)
00372       , pDefaultValue(pNewDefaultValue)
00373    {}
00374    virtual ~QualifierType(){}
00375    void Accept( Visitor *pV ) const { pV->VisitQualifierType( this ); }
00376    
00377    AutoPtr< const DataType > pDataType;
00378    AutoPtr< const Array > pArray;
00379    AutoPtr< const DefaultValue > pDefaultValue;
00380 };
00381    
00382 class OW_MOF_API QualifierDeclaration
00383 {
00384 public:
00385    QualifierDeclaration(
00386       const QualifierName* pNewQualifierName,
00387       const QualifierType* pNewQualifierType,
00388       const Scope* pNewScope,
00389       const DefaultFlavor* pNewDefaultFlavor,
00390       const LineInfo& li)
00391       : pQualifierName(pNewQualifierName)
00392       , pQualifierType(pNewQualifierType)
00393       , pScope(pNewScope)
00394       , pDefaultFlavor(pNewDefaultFlavor)
00395       , theLineInfo(li)
00396    {}
00397    virtual ~QualifierDeclaration(){}
00398    void Accept( Visitor *pV ) const { pV->VisitQualifierDeclaration( this ); }
00399    AutoPtr< const QualifierName > pQualifierName;
00400    AutoPtr< const QualifierType > pQualifierType;
00401    AutoPtr< const Scope > pScope;
00402    AutoPtr< const DefaultFlavor > pDefaultFlavor;
00403    LineInfo theLineInfo;
00404 };
00405 class OW_MOF_API ReferenceName
00406 {
00407 public:
00408    ReferenceName( const String* pNewReferenceName )
00409       : pReferenceName(pNewReferenceName)
00410    {}
00411    virtual ~ReferenceName(){}
00412    void Accept( Visitor *pV ) const { pV->VisitReferenceName( this ); }
00413    AutoPtr< const String > pReferenceName;
00414 };
00415 class OW_MOF_API IntegerValueBinaryValue : public IntegerValue
00416 {
00417 public:
00418    IntegerValueBinaryValue( const String* pNewBinaryValue )
00419       : pBinaryValue(pNewBinaryValue)
00420    {}
00421    virtual ~IntegerValueBinaryValue(){}
00422    virtual void Accept(Visitor *pV) const
00423    {
00424       pV->VisitIntegerValueBinaryValue( this );
00425    }
00426    AutoPtr< const String > pBinaryValue;
00427 };
00428 class OW_MOF_API IntegerValueOctalValue : public IntegerValue
00429 {
00430 public:
00431    IntegerValueOctalValue( const String* pNewOctalValue )
00432       : pOctalValue(pNewOctalValue)
00433    {}
00434    virtual ~IntegerValueOctalValue(){}
00435    virtual void Accept(Visitor *pV) const
00436    {
00437       pV->VisitIntegerValueOctalValue( this );
00438    }
00439    AutoPtr< const String > pOctalValue;
00440 };
00441 class OW_MOF_API IntegerValueDecimalValue : public IntegerValue
00442 {
00443 public:
00444    IntegerValueDecimalValue( const String* pNewDecimalValue )
00445       : pDecimalValue(pNewDecimalValue)
00446    {}
00447    virtual ~IntegerValueDecimalValue(){}
00448    virtual void Accept(Visitor *pV) const
00449    {
00450       pV->VisitIntegerValueDecimalValue( this );
00451    }
00452    AutoPtr< const String > pDecimalValue;
00453 };
00454 class OW_MOF_API IntegerValueHexValue : public IntegerValue
00455 {
00456 public:
00457    IntegerValueHexValue( const String* pNewHexValue )
00458       : pHexValue(pNewHexValue)
00459    {}
00460    virtual ~IntegerValueHexValue(){}
00461    virtual void Accept(Visitor *pV) const
00462    {
00463       pV->VisitIntegerValueHexValue( this );
00464    }
00465    AutoPtr< const String > pHexValue;
00466 };
00467 class OW_MOF_API ConstantValueIntegerValue : public ConstantValue
00468 {
00469 public:
00470    ConstantValueIntegerValue( const IntegerValue* pNewIntegerValue )
00471       : pIntegerValue(pNewIntegerValue)
00472    {}
00473    virtual ~ConstantValueIntegerValue(){}
00474    virtual void Accept(Visitor *pV) const
00475    {
00476       pV->VisitConstantValueIntegerValue( this );
00477    }
00478    AutoPtr< const IntegerValue > pIntegerValue;
00479 };
00480 class OW_MOF_API ConstantValueFloatValue : public ConstantValue
00481 {
00482 public:
00483    ConstantValueFloatValue( const String* pNewFloatValue )
00484       : pFloatValue(pNewFloatValue)
00485    {}
00486    virtual ~ConstantValueFloatValue(){}
00487    virtual void Accept(Visitor *pV) const
00488    {
00489       pV->VisitConstantValueFloatValue( this );
00490    }
00491    AutoPtr< const String > pFloatValue;
00492 };
00493 class OW_MOF_API ConstantValueCharValue : public ConstantValue
00494 {
00495 public:
00496    ConstantValueCharValue( const String* pNewCharValue )
00497       : pCharValue(pNewCharValue)
00498    {}
00499    virtual ~ConstantValueCharValue(){}
00500    virtual void Accept(Visitor *pV) const
00501    {
00502       pV->VisitConstantValueCharValue( this );
00503    }
00504    AutoPtr< const String > pCharValue;
00505 };
00506 class OW_MOF_API ConstantValueStringValue : public ConstantValue
00507 {
00508 public:
00509    ConstantValueStringValue( const String* pNewStringValue )
00510       : pStringValue(pNewStringValue)
00511    {}
00512    virtual ~ConstantValueStringValue(){}
00513    virtual void Accept(Visitor *pV) const
00514    {
00515       pV->VisitConstantValueStringValue( this );
00516    }
00517    AutoPtr< const String > pStringValue;
00518 };
00519 class OW_MOF_API ConstantValueBooleanValue : public ConstantValue
00520 {
00521 public:
00522    ConstantValueBooleanValue( const String* pNewBooleanValue )
00523       : pBooleanValue(pNewBooleanValue)
00524    {}
00525    virtual ~ConstantValueBooleanValue(){}
00526    virtual void Accept(Visitor *pV) const
00527    {
00528       pV->VisitConstantValueBooleanValue( this );
00529    }
00530    AutoPtr< const String > pBooleanValue;
00531 };
00532 class OW_MOF_API ConstantValueNullValue : public ConstantValue
00533 {
00534 public:
00535    ConstantValueNullValue( const String* pNewNullValue )
00536       : pNullValue(pNewNullValue)
00537    {}
00538    virtual ~ConstantValueNullValue(){}
00539    virtual void Accept(Visitor *pV) const
00540    {
00541       pV->VisitConstantValueNullValue( this );
00542    }
00543    AutoPtr< const String > pNullValue;
00544 };
00545 class OW_MOF_API ObjectHandle
00546 {
00547 public:
00548    ObjectHandle( const String* pNewObjectHandle )
00549       : pObjectHandle(pNewObjectHandle)
00550    {}
00551    virtual ~ObjectHandle(){}
00552    void Accept( Visitor *pV ) const { pV->VisitObjectHandle( this ); }
00553    AutoPtr< const String > pObjectHandle;
00554 };
00555 class OW_MOF_API ReferenceInitializer
00556 {
00557 public:
00558    virtual ~ReferenceInitializer() {}
00559    virtual void Accept( Visitor * ) const = 0;
00560 };
00561 class OW_MOF_API ReferenceInitializerAliasIdentifier : public ReferenceInitializer
00562 {
00563 public:
00564    ReferenceInitializerAliasIdentifier(
00565       const AliasIdentifier * pNewAliasIdentifier)
00566       : pAliasIdentifier(pNewAliasIdentifier)
00567    {}
00568    virtual ~ReferenceInitializerAliasIdentifier(){}
00569    void Accept( Visitor *pV ) const
00570    {
00571       pV->VisitReferenceInitializerAliasIdentifier( this );
00572    }
00573    
00574    AutoPtr< const AliasIdentifier > pAliasIdentifier;
00575 };
00576 class OW_MOF_API ReferenceInitializerObjectHandle : public ReferenceInitializer
00577 {
00578 public:
00579    ReferenceInitializerObjectHandle( const ObjectHandle* pNewObjectHandle )
00580       : pObjectHandle(pNewObjectHandle)
00581    {}
00582    virtual ~ReferenceInitializerObjectHandle(){}
00583    void Accept( Visitor *pV ) const
00584    {
00585       pV->VisitReferenceInitializerObjectHandle( this );
00586    }
00587    AutoPtr< const ObjectHandle > pObjectHandle;
00588 };
00589 class OW_MOF_API InitializerReferenceInitializer : public Initializer
00590 {
00591 public:
00592    InitializerReferenceInitializer(
00593       const ReferenceInitializer* pNewReferenceInitializer)
00594       : pReferenceInitializer(pNewReferenceInitializer)
00595    {}
00596    virtual ~InitializerReferenceInitializer(){}
00597    void Accept( Visitor *pV ) const
00598    {
00599       pV->VisitInitializerReferenceInitializer( this );
00600    }
00601    AutoPtr< const ReferenceInitializer > pReferenceInitializer;
00602 };    
00603 class OW_MOF_API InitializerArrayInitializer : public Initializer
00604 {
00605 public:
00606    InitializerArrayInitializer( const ArrayInitializer* pNewArrayInitializer)
00607       : pArrayInitializer(pNewArrayInitializer)
00608    {}
00609    virtual ~InitializerArrayInitializer(){}
00610    void Accept( Visitor *pV ) const
00611    {
00612       pV->VisitInitializerArrayInitializer( this );
00613    }
00614    AutoPtr< const ArrayInitializer > pArrayInitializer;
00615 };    
00616 class OW_MOF_API InitializerConstantValue : public Initializer
00617 {
00618 public:
00619    InitializerConstantValue( const ConstantValue *pNewConstantValue )
00620       : pConstantValue(pNewConstantValue)
00621    {}
00622    virtual ~InitializerConstantValue(){}
00623    void Accept( Visitor *pV ) const
00624    {
00625       pV->VisitInitializerConstantValue( this );
00626    }
00627    AutoPtr< const ConstantValue > pConstantValue;
00628 };    
00629 class OW_MOF_API ParameterName
00630 {
00631 public:
00632    ParameterName( const String* pNewParameterName )
00633       : pParameterName(pNewParameterName)
00634    {}
00635    virtual ~ParameterName(){}
00636    void Accept( Visitor *pV ) const { pV->VisitParameterName( this ); }
00637    AutoPtr< const String > pParameterName;
00638 };
00639 class OW_MOF_API Parameter
00640 {
00641 public:
00642    virtual ~Parameter() {}
00643    virtual void Accept( Visitor * ) const = 0;
00644 };
00645 class OW_MOF_API ObjectRef
00646 {
00647 public:
00648    ObjectRef( const ClassName* pNewClassName )
00649       : pClassName(pNewClassName)
00650    {}
00651    virtual ~ObjectRef(){}
00652    void Accept( Visitor *pV ) const { pV->VisitObjectRef( this ); }
00653    AutoPtr< const ClassName > pClassName;
00654 };
00655 class OW_MOF_API ParameterObjectRef : public Parameter
00656 {
00657 public:
00658    ParameterObjectRef(
00659       List< Qualifier * >* pNewQualifier,
00660       const ObjectRef* pNewObjectRef,
00661       const ParameterName* pNewParameterName,
00662       const Array* pNewArray )
00663       : pQualifier(pNewQualifier)
00664       , pObjectRef(pNewObjectRef)
00665       , pParameterName(pNewParameterName)
00666       , pArray(pNewArray)
00667    {}
00668    virtual ~ParameterObjectRef()
00669    {
00670       while (pQualifier.get() && !pQualifier->empty())
00671       {
00672          delete pQualifier->front();
00673          pQualifier->pop_front();
00674       }
00675    }
00676    void Accept( Visitor *pV ) const { pV->VisitParameterObjectRef( this ); }
00677    AutoPtr< List< Qualifier * > > pQualifier;
00678    AutoPtr< const ObjectRef > pObjectRef;
00679    AutoPtr< const ParameterName > pParameterName;
00680    AutoPtr< const Array > pArray;   
00681 };
00682 class OW_MOF_API ParameterDataType : public Parameter
00683 {
00684 public:
00685    ParameterDataType(
00686       List< Qualifier * >* pNewQualifier,
00687       const DataType* pNewDataType,
00688       const ParameterName* pNewParameterName,
00689       const Array* pNewArray )
00690       : pQualifier(pNewQualifier)
00691       , pDataType(pNewDataType)
00692       , pParameterName(pNewParameterName)
00693       , pArray(pNewArray)
00694    {}
00695    virtual ~ParameterDataType()
00696    {
00697       while (pQualifier.get() && !pQualifier->empty())
00698       {
00699          delete pQualifier->front();
00700          pQualifier->pop_front();
00701       }
00702    }
00703    void Accept( Visitor *pV ) const { pV->VisitParameterDataType( this ); }
00704    AutoPtr< List< Qualifier * > > pQualifier;
00705    AutoPtr< const DataType > pDataType;
00706    AutoPtr< const ParameterName > pParameterName;
00707    AutoPtr< const Array > pArray;   
00708 };
00709 class OW_MOF_API MethodName
00710 {
00711 public:
00712    MethodName( const String* pNewMethodName )
00713       : pMethodName(pNewMethodName)
00714    {}
00715    virtual ~MethodName(){}
00716    void Accept( Visitor *pV ) const { pV->VisitMethodName( this ); }
00717    AutoPtr< const String > pMethodName;
00718 };
00719 class OW_MOF_API MethodDeclaration
00720 {
00721 public:
00722    MethodDeclaration(
00723       List< Qualifier * >* pNewQualifier,
00724       const DataType* pNewDataType,
00725       const MethodName* pNewMethodName,
00726       List< Parameter * >* pNewParameter )
00727       : pQualifier(pNewQualifier)
00728       , pDataType(pNewDataType)
00729       , pMethodName(pNewMethodName)
00730       , pParameter(pNewParameter)
00731    {}
00732    virtual ~MethodDeclaration()
00733    {
00734       while (pQualifier.get() && !pQualifier->empty())
00735       {
00736          delete pQualifier->front();
00737          pQualifier->pop_front();
00738       }
00739       while (pParameter.get() && !pParameter->empty())
00740       {
00741          delete pParameter->front();
00742          pParameter->pop_front();
00743       }
00744    }
00745    void Accept( Visitor *pV ) const { pV->VisitMethodDeclaration( this ); }
00746    
00747    AutoPtr< List< Qualifier * > > pQualifier;
00748    AutoPtr< const DataType > pDataType;
00749    AutoPtr< const MethodName > pMethodName;
00750    AutoPtr< List< Parameter * > > pParameter;
00751 };
00752 class OW_MOF_API ReferenceDeclaration
00753 {
00754 public:
00755    ReferenceDeclaration(
00756       List< Qualifier * >* pNewQualifier,
00757       const ObjectRef* pNewObjectRef,
00758       const ReferenceName* pNewReferenceName,
00759       const DefaultValue* pNewDefaultValue )
00760       : pQualifier(pNewQualifier)
00761       , pObjectRef(pNewObjectRef)
00762       , pReferenceName(pNewReferenceName)
00763       , pDefaultValue(pNewDefaultValue)
00764    {}
00765    virtual ~ReferenceDeclaration()
00766    {
00767       while (pQualifier.get() && !pQualifier->empty())
00768       {
00769          delete pQualifier->front();
00770          pQualifier->pop_front();
00771       }
00772    }
00773    void Accept( Visitor *pV ) const { pV->VisitReferenceDeclaration( this ); }
00774    
00775    AutoPtr< List< Qualifier * > > pQualifier;
00776    AutoPtr< const ObjectRef > pObjectRef;
00777    AutoPtr< const ReferenceName > pReferenceName;
00778    AutoPtr< const DefaultValue > pDefaultValue;
00779 };
00780 class OW_MOF_API PropertyDeclaration
00781 {
00782 public:
00783    PropertyDeclaration(
00784       List< Qualifier * >* pNewQualifier,
00785       const DataType* pNewDataType,
00786       const PropertyName* pNewPropertyName,
00787       const Array* pNewArray,
00788       const DefaultValue* pNewDefaultValue,
00789       const LineInfo& li)
00790       : pQualifier(pNewQualifier)
00791       , pDataType(pNewDataType)
00792       , pPropertyName(pNewPropertyName)
00793       , pArray(pNewArray)
00794       , pDefaultValue(pNewDefaultValue)
00795       , theLineInfo(li)
00796    {}
00797    virtual ~PropertyDeclaration()
00798    {
00799       while (pQualifier.get() && !pQualifier->empty())
00800       {
00801          delete pQualifier->front();
00802          pQualifier->pop_front();
00803       }
00804    }
00805    void Accept( Visitor *pV ) const { pV->VisitPropertyDeclaration( this ); }
00806    AutoPtr< List< Qualifier * > > pQualifier;
00807    AutoPtr< const DataType > pDataType;
00808    AutoPtr< const PropertyName > pPropertyName;
00809    AutoPtr< const Array > pArray;
00810    AutoPtr< const DefaultValue > pDefaultValue;
00811    LineInfo theLineInfo;
00812 };
00813 class OW_MOF_API AssociationFeature
00814 {
00815 public:
00816    virtual ~AssociationFeature() {}
00817    virtual void Accept( Visitor * ) const = 0;
00818 };
00819 class OW_MOF_API ClassFeature
00820 {
00821 public:
00822    virtual ~ClassFeature() {}
00823    virtual void Accept( Visitor * ) const = 0;
00824 };
00825 class OW_MOF_API AssociationFeatureClassFeature : public AssociationFeature
00826 {
00827 public:
00828    AssociationFeatureClassFeature( const ClassFeature* pNewClassFeature )
00829       : pClassFeature(pNewClassFeature)
00830    {}
00831    virtual ~AssociationFeatureClassFeature(){}
00832    void Accept( Visitor *pV ) const
00833    {
00834       pV->VisitAssociationFeatureClassFeature( this );
00835    }
00836    
00837    AutoPtr< const ClassFeature > pClassFeature;
00838 };
00839 class OW_MOF_API ClassFeatureMethodDeclaration : public ClassFeature
00840 {
00841 public:
00842    ClassFeatureMethodDeclaration(
00843       const MethodDeclaration* pNewMethodDeclaration )
00844       : pMethodDeclaration(pNewMethodDeclaration)
00845    {}
00846    virtual ~ClassFeatureMethodDeclaration(){}
00847    void Accept( Visitor *pV ) const
00848    {
00849       pV->VisitClassFeatureMethodDeclaration( this );
00850    }
00851    
00852    AutoPtr< const MethodDeclaration > pMethodDeclaration;
00853 };
00854 class OW_MOF_API ClassFeaturePropertyDeclaration : public ClassFeature
00855 {
00856 public:
00857    ClassFeaturePropertyDeclaration(
00858       const PropertyDeclaration* pNewPropertyDeclaration )
00859       : pPropertyDeclaration(pNewPropertyDeclaration)
00860    {}
00861    virtual ~ClassFeaturePropertyDeclaration(){}
00862    void Accept( Visitor *pV ) const
00863    {
00864       pV->VisitClassFeaturePropertyDeclaration( this );
00865    }
00866    
00867    AutoPtr< const PropertyDeclaration > pPropertyDeclaration;
00868 };
00869 /* Note: This should be in AssociationFeature, but I found some MOF files
00870    that use this in ClassFeature */
00871 class OW_MOF_API ClassFeatureReferenceDeclaration : public ClassFeature
00872 {
00873 public:
00874    ClassFeatureReferenceDeclaration(
00875       const ReferenceDeclaration* pNewReferenceDeclaration )
00876       : pReferenceDeclaration(pNewReferenceDeclaration)
00877    {}
00878    virtual ~ClassFeatureReferenceDeclaration(){}
00879    void Accept( Visitor *pV ) const
00880    {
00881       pV->VisitClassFeatureReferenceDeclaration( this );
00882    }
00883    
00884    AutoPtr< const ReferenceDeclaration > pReferenceDeclaration;
00885 };
00886 class OW_MOF_API SuperClass
00887 {
00888 public:
00889    SuperClass( const ClassName* pNewClassName )
00890       : pClassName(pNewClassName)
00891    {}
00892    virtual ~SuperClass(){}
00893    void Accept( Visitor *pV ) const { pV->VisitSuperClass( this ); }
00894    
00895    AutoPtr< const ClassName > pClassName;
00896 };
00897 class OW_MOF_API IndicDeclaration
00898 {
00899 public:
00900    IndicDeclaration(
00901       List< Qualifier * >* pNewQualifier,
00902       const ClassName* pNewClassName,
00903       const Alias* pNewAlias,
00904       const SuperClass* pNewSuperClass,
00905       List< ClassFeature * >* pNewClassFeature,
00906       const LineInfo& li)
00907       : pQualifier(pNewQualifier)
00908       , pClassName(pNewClassName)
00909       , pAlias(pNewAlias)
00910       , pSuperClass(pNewSuperClass)
00911       , pClassFeature(pNewClassFeature)
00912       , theLineInfo(li)
00913    {}
00914    virtual ~IndicDeclaration()
00915    {
00916       while (pQualifier.get() && !pQualifier->empty())
00917       {
00918          delete pQualifier->front();
00919          pQualifier->pop_front();
00920       }
00921       while (pClassFeature.get() && !pClassFeature->empty())
00922       {
00923          delete pClassFeature->front();
00924          pClassFeature->pop_front();
00925       }
00926    }
00927    void Accept( Visitor *pV ) const { pV->VisitIndicDeclaration( this ); }
00928    
00929    AutoPtr< List< Qualifier * > > pQualifier;
00930    AutoPtr< const ClassName > pClassName;
00931    AutoPtr< const Alias > pAlias;
00932    AutoPtr< const SuperClass > pSuperClass;
00933    AutoPtr< List< ClassFeature * > > pClassFeature;
00934    LineInfo theLineInfo;
00935 };
00936 class OW_MOF_API AssocDeclaration
00937 {
00938 public:
00939    AssocDeclaration(
00940       List< Qualifier * >* pNewQualifier,
00941       const ClassName* pNewClassName,
00942       const Alias* pNewAlias,
00943       const SuperClass* pNewSuperClass,
00944       List< AssociationFeature * >* pNewAssociationFeature,
00945       const LineInfo& li )
00946       : pQualifier(pNewQualifier)
00947       , pClassName(pNewClassName)
00948       , pAlias(pNewAlias)
00949       , pSuperClass(pNewSuperClass)
00950       , pAssociationFeature(pNewAssociationFeature)
00951       , theLineInfo(li)
00952    {}
00953    virtual ~AssocDeclaration()
00954    {
00955       while (pQualifier.get() && !pQualifier->empty())
00956       {
00957          delete pQualifier->front();
00958          pQualifier->pop_front();
00959       }
00960       while (pAssociationFeature.get() && !pAssociationFeature->empty())
00961       {
00962          delete pAssociationFeature->front();
00963          pAssociationFeature->pop_front();
00964       }
00965    }
00966    void Accept( Visitor *pV ) const { pV->VisitAssocDeclaration( this ); }
00967    
00968    AutoPtr< List< Qualifier * > > pQualifier;
00969    AutoPtr< const ClassName > pClassName;
00970    AutoPtr< const Alias > pAlias;
00971    AutoPtr< const SuperClass > pSuperClass;
00972    AutoPtr< List< AssociationFeature * > > pAssociationFeature;
00973    LineInfo theLineInfo;
00974 };
00975 class OW_MOF_API ClassDeclaration
00976 {
00977 public:
00978    ClassDeclaration(
00979       List< Qualifier * >* pNewQualifier,
00980       const ClassName* pNewClassName,
00981       const Alias* pNewAlias,
00982       const SuperClass* pNewSuperClass,
00983       List< ClassFeature * >* pNewClassFeature,
00984       const LineInfo& li )
00985       : pQualifier(pNewQualifier)
00986       , pClassName(pNewClassName)
00987       , pAlias(pNewAlias)
00988       , pSuperClass(pNewSuperClass)
00989       , pClassFeature(pNewClassFeature)
00990       , theLineInfo(li)
00991    {}
00992    virtual ~ClassDeclaration()
00993    {
00994       while (pQualifier.get() && !pQualifier->empty())
00995       {
00996          delete pQualifier->front();
00997          pQualifier->pop_front();
00998       }
00999       while (pClassFeature.get() && !pClassFeature->empty())
01000       {
01001          delete pClassFeature->front();
01002          pClassFeature->pop_front();
01003       }
01004    }
01005    void Accept( Visitor *pV ) const { pV->VisitClassDeclaration( this ); }
01006    
01007    AutoPtr< List< Qualifier * > > pQualifier;
01008    AutoPtr< const ClassName > pClassName;
01009    AutoPtr< const Alias > pAlias;
01010    AutoPtr< const SuperClass > pSuperClass;
01011    AutoPtr< List< ClassFeature * > > pClassFeature;
01012    LineInfo theLineInfo;
01013 };
01014 class OW_MOF_API PragmaParameter
01015 {
01016 public:
01017    PragmaParameter( const String* pNewPragmaParameter )
01018       : pPragmaParameter(pNewPragmaParameter)
01019    {}
01020    virtual ~PragmaParameter(){}
01021    void Accept( Visitor *pV ) const { pV->VisitPragmaParameter( this ); }
01022    AutoPtr< const String > pPragmaParameter;
01023 };
01024 class OW_MOF_API PragmaName
01025 {
01026 public:
01027    PragmaName( const String* pNewPragmaName )
01028       : pPragmaName(pNewPragmaName)
01029    {}
01030    virtual ~PragmaName(){}
01031    void Accept( Visitor *pV ) const { pV->VisitPragmaName( this ); }
01032    AutoPtr< const String > pPragmaName;
01033 };
01034 class OW_MOF_API CompilerDirective
01035 {
01036 public:
01037    CompilerDirective(
01038       const PragmaName* pNewPragmaName,
01039       const PragmaParameter* pNewPragmaParameter,
01040       const LineInfo& li)
01041       : pPragmaName(pNewPragmaName)
01042       , pPragmaParameter(pNewPragmaParameter)
01043       , theLineInfo(li)
01044    {}
01045    virtual ~CompilerDirective(){}
01046    void Accept( Visitor *pV ) const { pV->VisitCompilerDirective( this ); }
01047    
01048    AutoPtr< const PragmaName > pPragmaName;
01049    AutoPtr< const PragmaParameter > pPragmaParameter;
01050    LineInfo theLineInfo;
01051 };
01052 class OW_MOF_API MOFProduction {
01053 public:
01054    virtual ~MOFProduction() {}
01055    virtual void Accept( Visitor * ) const = 0;
01056 };
01057 class OW_MOF_API MOFProductionInstanceDeclaration : public MOFProduction
01058 {
01059 public:
01060    MOFProductionInstanceDeclaration(
01061       const InstanceDeclaration* pNewInstanceDeclaration )
01062       : pInstanceDeclaration(pNewInstanceDeclaration)
01063    {}
01064    virtual ~MOFProductionInstanceDeclaration(){}
01065    void Accept( Visitor *pV ) const
01066    {
01067       pV->VisitMOFProductionInstanceDeclaration( this );
01068    }
01069    
01070    AutoPtr< const InstanceDeclaration > pInstanceDeclaration;
01071 };
01072 class OW_MOF_API MOFProductionQualifierDeclaration : public MOFProduction
01073 {
01074 public:
01075    MOFProductionQualifierDeclaration(
01076       const QualifierDeclaration* pNewQualifierDeclaration )
01077       : pQualifierDeclaration(pNewQualifierDeclaration)
01078    {}
01079    virtual ~MOFProductionQualifierDeclaration(){}
01080    void Accept( Visitor *pV ) const
01081    {
01082       pV->VisitMOFProductionQualifierDeclaration( this );
01083    }
01084    
01085    AutoPtr< const QualifierDeclaration > pQualifierDeclaration;
01086 };
01087 class OW_MOF_API MOFProductionIndicDeclaration : public MOFProduction
01088 {
01089 public:
01090    MOFProductionIndicDeclaration(
01091       const IndicDeclaration* pNewIndicDeclaration )
01092       : pIndicDeclaration(pNewIndicDeclaration)
01093    {}
01094    virtual ~MOFProductionIndicDeclaration() {}
01095    void Accept( Visitor *pV ) const
01096    {
01097       pV->VisitMOFProductionIndicDeclaration( this );
01098    }
01099    
01100    AutoPtr< const IndicDeclaration > pIndicDeclaration;
01101 };
01102 class OW_MOF_API MOFProductionAssocDeclaration : public MOFProduction
01103 {
01104 public:
01105    MOFProductionAssocDeclaration(
01106       const AssocDeclaration* pNewAssocDeclaration )
01107       : pAssocDeclaration(pNewAssocDeclaration)
01108    {}
01109    virtual ~MOFProductionAssocDeclaration(){}
01110    void Accept( Visitor *pV ) const
01111    {
01112       pV->VisitMOFProductionAssocDeclaration( this );
01113    }
01114    
01115    AutoPtr< const AssocDeclaration > pAssocDeclaration;
01116 };
01117 class OW_MOF_API MOFProductionClassDeclaration : public MOFProduction
01118 {
01119 public:
01120    MOFProductionClassDeclaration(
01121       const ClassDeclaration* pNewClassDeclaration )
01122       : pClassDeclaration(pNewClassDeclaration)
01123    {}
01124    virtual ~MOFProductionClassDeclaration() {}
01125    void Accept( Visitor *pV ) const
01126    {
01127       pV->VisitMOFProductionClassDeclaration( this );
01128    }
01129    
01130    AutoPtr< const ClassDeclaration > pClassDeclaration;
01131 };
01132 class OW_MOF_API MOFProductionCompilerDirective : public MOFProduction
01133 {
01134 public:
01135    MOFProductionCompilerDirective(
01136       const CompilerDirective* pNewCompilerDirective )
01137       : pCompilerDirective(pNewCompilerDirective)
01138    {}
01139    virtual ~MOFProductionCompilerDirective() {}
01140    void Accept( Visitor *pV ) const
01141    {
01142       pV->VisitMOFProductionCompilerDirective( this );
01143    }
01144    AutoPtr< const CompilerDirective > pCompilerDirective;
01145 };
01146 class OW_MOF_API MOFSpecification {
01147 public:
01148    MOFSpecification( List< MOFProduction * >* pNewMOFProduction )
01149       : pMOFProduction(pNewMOFProduction)
01150    {}
01151    virtual ~MOFSpecification()
01152    {
01153       while (pMOFProduction.get() && !pMOFProduction->empty())
01154       {
01155          delete pMOFProduction->front();
01156          pMOFProduction->pop_front();
01157       }
01158    }
01159    void Accept( Visitor *pV ) const { pV->VisitMOFSpecification( this ); }
01160    
01161    AutoPtr< List< MOFProduction * > > pMOFProduction;
01162 };
01163 
01164 } // end namespace MOF
01165 } // end namespace OW_NAMESPACE
01166 
01167 #ifdef OW_WIN32
01168 #pragma warning (pop)
01169 #endif
01170 
01171 #endif

Generated on Thu Feb 9 08:48:07 2006 for openwbem by  doxygen 1.4.6