# CreateClass CIM Operation

The `CreateClass` method creates a single CIM Class for the target Namespace where the ClassName input parameter defines the name of the class to be created.

NameSpace String that defines the target namespace. See NameSpace Operations for more information

ClassName Defines the name of the Class to be created. See Enumerate Class Names for a list of classes that already exist

SuperClass Name of the class that the new class inherits from

PropertyName1 PropertyValue1 String

PropertyName2 PropertyValue2 String

PropertyName3 PropertyValue3 Integer

The `createClass` method creates a single CIM Class in the target Namespace. The Class MUST NOT already exist. The NewClass input parameter defines the new Class. The proposed definition MUST be a correct Class definition according to the CIM specification. In processing the creation of the new Class, the following rules MUST be conformed to by the CIM Server: Any CLASSORIGIN and PROPAGATED attributes in the NewClass MUST be ignored by the Server. If the new Class has no Superclass, the NewClass parameter defines a new base Class. The Server MUST ensure that all Properties and Methods of the new Class have a CLASSORIGIN attribute whose value is the name of the new Class. If the new Class has a Superclass, the NewClass parameter defines a new Subclass of that Superclass. The Superclass MUST exist. The Server MUST ensure that:

- Any Properties, Methods or Qualifiers in the Subclass not defined in the Superclass are created as new elements of the Subclass. In particular the Server MUST set the CLASSORIGIN attribute on the new Properties and Methods to the name of the Subclass, and ensure that all other Properties and Methods preserve their CLASSORIGIN attribute value from that defined in the Superclass If a Property is defined in the Superclass and in the Subclass, the value assigned to that property in the Subclass (including NULL) becomes the default value of the property for the Subclass. If a Property or Method of the Superclass is not specified in the Subclass, then that Property or Method is inherited without modification by the Subclass
- Any Qualifiers defined in the Superclass with a TOSUBCLASS attribute value of true MUST appear in the resulting Subclass. Qualifiers in the Superclass with a TOSUBCLASS attribute value of false MUST NOT be propagated to the Subclass . Any Qualifier propagated from the Superclass cannot be modified in the Subclass if the OVERRIDABLE attribute of that Qualifier was set to false in the Superclass. It is a Client error to specify such a Qualifier in the NewClass with a different definition to that in the Superclass (where definition encompasses the name, type and flavor attribute settings of the <QUALIFIER> element, and the value of the Qualifier).

@param NameSpace The NameSpace parameter is a string that defines the target namespace \Ref{NAMESPACE} @parm NewClass The NewClass input parameter defines the new Class. @return If successful, the specified Class MUST have been created by the CIM Server. If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Class already exists)
- CIM_ERR_INVALID_SUPERCLASS (the putative CIM Class declares a non-existent superclass)
- CIM_ERR_FAILED (some other unspecified error occurred)

        virtual void createClass(

    		const String& nameSpace,
    		ClassDecl& newClass) = 0;