📄 cimmethod.h
字号:
CIMConstMethod cm1(m1); </pre> @param x The CIMMethod object from which to construct a new CIMConstMethod object. */ CIMConstMethod(const CIMMethod& x); /** Constructs a CIMConstMethod object with the specified attributes. <p><b>Example:</b> <pre> CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); </pre> @param name CIMName defining the name for the method. @param type CIMType defining the method return type. @param classOrigin (optional) CIMName representing the class origin. Note that this should normally not be used. If not provided set to CIMName() (Null name). @param propagated Optional flag indicating whether the definition of the CIM Method is local to the CIM Class (respectively, Instance) in which it appears, or was propagated without modification from a superclass. Default is false. Note that this attribute is normally not set by CIM Clients but is used internally within the CIM Server. @exception UninitializedObjectException If the method name is null. */ CIMConstMethod( const CIMName& name, CIMType type, const CIMName& classOrigin = CIMName(), Boolean propagated = false); /** Destructs the CIMConstMethod object. */ ~CIMConstMethod(); /** Assigns the value of the specified CIMConstMethod object to this object, so that both objects refer to the same data copy. <p><b>Example:</b> <pre> CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); CIMConstMethod m2; m2 = m1; </pre> @param x The CIMConstMethod object from which to assign this CIMConstMethod object. @return A reference to this CIMConstMethod object. */ CIMConstMethod& operator=(const CIMConstMethod& x); /** Assigns the value of the specified CIMMethod object to this object, so that both objects refer to the same data copy. <p><b>Example:</b> <pre> CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); CIMConstMethod m2; m2 = m1; </pre> @param x The CIMMethod object from which to assign this CIMConstMethod object. @return A reference to this CIMConstMethod object. */ CIMConstMethod& operator=(const CIMMethod& x); /** Gets the name of the method. <p><b>Example:</b> <pre> CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); assert(m1.getName() == CIMName ("getHostName")); </pre> @return CIMName with the name of the method. @exception UninitializedObjectException If the object is not initialized. */ const CIMName& getName() const; /** Gets the method return type. <p><b>Example:</b> <pre> CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); assert(m1.getType() == CIMTYPE_STRING); </pre> @return A CIMType containing the method return type. @exception UninitializedObjectException If the object is not initialized. */ CIMType getType() const; /** Gets the class in which this method was defined. This information is normally available with methods that are part of a schema returned from a CIM Server. @return CIMName containing the classOrigin attribute. @exception UninitializedObjectException If the object is not initialized. */ const CIMName& getClassOrigin() const; /** Tests the propagated attribute of the object. The propagated attribute indicates whether this method was propagated from a higher-level class. Normally this attribute is set as part of defining a method in the context of a schema. It is set in methods retrieved from a CIM Server. @return True if method is propagated; otherwise, false. @exception UninitializedObjectException If the object is not initialized. */ Boolean getPropagated() const; /** Finds a qualifier by name. <p><b>Example:</b> <pre> CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); CIMConstMethod m2(m1); assert(m2.findQualifier(CIMName ("stuff")) != PEG_NOT_FOUND); </pre> @param name A CIMName specifying the name of the qualifier to be found. @return Index of the qualifier if found or PEG_NOT_FOUND if not found. @exception UninitializedObjectException If the object is not initialized. */ Uint32 findQualifier(const CIMName& name) const; /** Gets the qualifier at the specified index. <p><b>Example:</b> <pre> CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); CIMConstMethod m2(m1); Uint32 posQualifier = m2.findQualifier(CIMName ("stuff")); if (posQualifier != PEG_NOT_FOUND) { CIMQualifier q = m2.getQualifier(posQualifier); } </pre> @param index The index of the qualifier to be retrieved. @return The CIMConstQualifier at the specified index. @exception IndexOutOfBoundsException If the index is outside the range of qualifiers available for the CIMMethod. @exception UninitializedObjectException If the object is not initialized. */ CIMConstQualifier getQualifier(Uint32 index) const; /** Gets the number of qualifiers in the method. <p><b>Example:</b> <pre> CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); m1.addQualifier(CIMQualifier(CIMName ("stuff"), true)); m1.addQualifier(CIMQualifier(CIMName ("stuff2"), true)); CIMConstMethod m2(m1); assert(m2.getQualifierCount() == 2); </pre> @return An integer count of the CIMQualifiers in the CIMMethod. @exception UninitializedObjectException If the object is not initialized. */ Uint32 getQualifierCount() const; /** Finds a parameter by name. <p><b>Example:</b> <pre> Uint32 posParameter; posParameter = m1.findParameter(CIMName ("ipaddress")); if (posParameter != PEG_NOT_FOUND) ... </pre> @param name A CIMName specifying the name of the parameter to be found. @return Index of the parameter if found or PEG_NOT_FOUND if not found. @exception UninitializedObjectException If the object is not initialized. */ Uint32 findParameter(const CIMName& name) const; /** Gets the parameter at the specified index. <p><b>Example:</b> <pre> CIMConstParameter cp; Uint32 parameterIndex = m1.findParameter(CIMName ("ipaddress")); if (parameterIndex != PEG_NOT_FOUND) { cp = m1.getParameter(parameterIndex); } </pre> @param index The index of the parameter to be retrieved. @return The CIMConstParameter at the specified index. @exception IndexOutOfBoundsException If the index is outside the range of parameters available for the CIMMethod. @exception UninitializedObjectException If the object is not initialized. */ CIMConstParameter getParameter(Uint32 index) const; /** Gets the number of parameters in the method. @return An integer count of the CIMParameters in the CIMMethod. @exception UninitializedObjectException If the object is not initialized. */ Uint32 getParameterCount() const; /** Determines whether the object has been initialized. <p><b>Example:</b> <pre> CIMConstMethod m1; assert(m1.isUninitialized()); </pre> @return True if the object has not been initialized, false otherwise. */ Boolean isUninitialized() const; /** Compares the method with another method. <p><b>Example:</b> <pre> CIMConstMethod m1(CIMName ("getHostName"), CIMTYPE_STRING); CIMConstMethod m2(CIMName ("test"), CIMTYPE_STRING); assert(!m1.identical(m2)); </pre> @param x The CIMConstMethod to be compared. @return True if this method is identical to the one specified, false otherwise. @exception UninitializedObjectException If either of the objects is not initialized. */ Boolean identical(const CIMConstMethod& x) const; /** Makes a deep copy of the method. This creates a new copy of all the method attributes including parameters and qualifiers. @return A CIMMethod object with a separate copy of the CIMConstMethod object. @exception UninitializedObjectException If the object is not initialized. */ CIMMethod clone() const;private: void _checkRep() const; CIMMethodRep* _rep; friend class CIMMethod; friend class CIMMethodRep; friend class XmlWriter; friend class MofWriter;};#define PEGASUS_ARRAY_T CIMMethod# include <Pegasus/Common/ArrayInter.h>#undef PEGASUS_ARRAY_TPEGASUS_NAMESPACE_END#endif /* Pegasus_Method_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -