version 1.1, 2001/01/14 19:53:55
|
version 1.7, 2001/02/16 02:06:09
|
|
|
// Author: | // Author: |
// | // |
// $Log$ | // $Log$ |
// Revision 1.1 2001/01/14 19:53:55 mike |
// Revision 1.7 2001/02/16 02:06:09 mike |
// Initial revision |
// Renamed many classes and headers. |
|
// |
|
// Revision 1.6 2001/02/13 07:00:18 mike |
|
// Added partial createInstance() method to repository. |
|
// |
|
// Revision 1.5 2001/02/11 05:45:33 mike |
|
// Added case insensitive logic for files in Repository |
|
// |
|
// Revision 1.4 2001/01/31 08:20:51 mike |
|
// Added dispatcher framework. |
|
// Added enumerateInstanceNames. |
|
// |
|
// Revision 1.3 2001/01/28 04:11:03 mike |
|
// fixed qualifier resolution |
|
// |
|
// Revision 1.2 2001/01/25 02:12:05 mike |
|
// Added meta-qualifiers to LoadRepository program. |
|
// |
|
// Revision 1.1.1.1 2001/01/14 19:53:55 mike |
|
// Pegasus import |
// | // |
// | // |
//END_HISTORY | //END_HISTORY |
|
|
#include <Pegasus/Common/XmlReader.h> | #include <Pegasus/Common/XmlReader.h> |
#include <Pegasus/Common/XmlWriter.h> | #include <Pegasus/Common/XmlWriter.h> |
#include <Pegasus/Common/DeclContext.h> | #include <Pegasus/Common/DeclContext.h> |
|
#include <Pegasus/Common/DeclContext.h> |
#include "Repository.h" | #include "Repository.h" |
|
#include "InstanceIndexFile.h" |
| |
#define INDENT_XML_FILES | #define INDENT_XML_FILES |
| |
|
|
| |
Array<String> _GlobClassesDir( | Array<String> _GlobClassesDir( |
const String& path, | const String& path, |
const String& className, |
const String& className_, |
const String& superClassName) |
const String& superClassName_) |
{ | { |
|
String className = className_; |
|
String superClassName = superClassName_; |
Array<String> fileNames; | Array<String> fileNames; |
| |
if (!FileSystem::getDirectoryContents(path, fileNames)) | if (!FileSystem::getDirectoryContents(path, fileNames)) |
|
|
if (!FileSystem::isDirectory(path)) | if (!FileSystem::isDirectory(path)) |
throw CimException(CimException::INVALID_NAMESPACE); | throw CimException(CimException::INVALID_NAMESPACE); |
| |
path.append('/'); |
|
path.append(QUALIFIERS); | path.append(QUALIFIERS); |
path.append(qualifierName); | path.append(qualifierName); |
} | } |
| |
|
static void _MakeInstanceIndexPath( |
|
const String& root, |
|
const String& nameSpace, |
|
const String& className, |
|
String& path) |
|
{ |
|
const char INSTANCES[] = "/instances/"; |
|
_MakeNameSpacePath(root, nameSpace, path); |
|
|
|
if (!FileSystem::isDirectory(path)) |
|
throw CimException(CimException::INVALID_NAMESPACE); |
|
|
|
path.append(INSTANCES); |
|
path.append(className); |
|
path.append(".idx"); |
|
} |
|
|
|
static void _MakeInstancePath( |
|
const String& root, |
|
const String& nameSpace, |
|
const String& className, |
|
Uint32 index, |
|
String& path) |
|
{ |
|
const char INSTANCES[] = "/instances/"; |
|
_MakeNameSpacePath(root, nameSpace, path); |
|
|
|
if (!FileSystem::isDirectory(path)) |
|
throw CimException(CimException::INVALID_NAMESPACE); |
|
|
|
path.append(INSTANCES); |
|
path.append(className); |
|
path.append('.'); |
|
|
|
char buffer[32]; |
|
sprintf(buffer, "%d", index); |
|
path.append(buffer); |
|
} |
|
|
template<class Object> | template<class Object> |
void _LoadObject( | void _LoadObject( |
const String& path, | const String& path, |
Object& object) | Object& object) |
{ | { |
// Open the file: |
// Get the real path of the file: |
| |
Destroyer<char> destroyer(path.allocateCString()); |
String realPath; |
std::ifstream is(destroyer.getPointer()); |
|
| |
if (!is) |
if (!FileSystem::existsIgnoreCase(path, realPath)) |
throw CannotOpenFile(path); | throw CannotOpenFile(path); |
| |
// Load file into memory: | // Load file into memory: |
| |
Array<Sint8> data; | Array<Sint8> data; |
FileSystem::loadFileToMemory(data, path); |
FileSystem::loadFileToMemory(data, realPath); |
data.append('\0'); | data.append('\0'); |
| |
XmlParser parser((char*)data.getData()); | XmlParser parser((char*)data.getData()); |
|
|
| |
virtual ~RepositoryDeclContext(); | virtual ~RepositoryDeclContext(); |
| |
virtual QualifierDecl lookupQualifierDecl( |
virtual CIMQualifierDecl lookupQualifierDecl( |
const String& nameSpace, | const String& nameSpace, |
const String& qualifierName) const; | const String& qualifierName) const; |
| |
virtual ClassDecl lookupClassDecl( |
virtual CIMClass lookupClassDecl( |
const String& nameSpace, | const String& nameSpace, |
const String& className) const; | const String& className) const; |
| |
|
|
| |
} | } |
| |
QualifierDecl RepositoryDeclContext::lookupQualifierDecl( |
CIMQualifierDecl RepositoryDeclContext::lookupQualifierDecl( |
const String& nameSpace, | const String& nameSpace, |
const String& qualifierName) const | const String& qualifierName) const |
{ | { |
|
|
} | } |
catch (Exception&) | catch (Exception&) |
{ | { |
return QualifierDecl(); |
return CIMQualifierDecl(); |
} | } |
} | } |
| |
ClassDecl RepositoryDeclContext::lookupClassDecl( |
CIMClass RepositoryDeclContext::lookupClassDecl( |
const String& nameSpace, | const String& nameSpace, |
const String& className) const | const String& className) const |
{ | { |
|
|
} | } |
catch (Exception&) | catch (Exception&) |
{ | { |
return ClassDecl(); |
return CIMClass(); |
} | } |
} | } |
| |
|
|
| |
} | } |
| |
ClassDecl Repository::getClass( |
CIMClass Repository::getClass( |
const String& nameSpace, | const String& nameSpace, |
const String& className, | const String& className, |
Boolean localOnly, | Boolean localOnly, |
|
|
| |
// Load the class: | // Load the class: |
| |
ClassDecl classDecl; |
CIMClass classDecl; |
_LoadObject(path, classDecl); | _LoadObject(path, classDecl); |
| |
return ClassDecl(classDecl); |
return CIMClass(classDecl); |
} | } |
| |
InstanceDecl Repository::getInstance( |
CIMInstance Repository::getInstance( |
const String& nameSpace, | const String& nameSpace, |
const Reference& instanceName, |
const CIMReference& instanceName, |
Boolean localOnly, | Boolean localOnly, |
Boolean includeQualifiers, | Boolean includeQualifiers, |
Boolean includeClassOrigin, | Boolean includeClassOrigin, |
const Array<String>& propertyList) | const Array<String>& propertyList) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return InstanceDecl(); |
return CIMInstance(); |
} | } |
| |
void Repository::deleteClass( | void Repository::deleteClass( |
|
|
| |
void Repository::deleteInstance( | void Repository::deleteInstance( |
const String& nameSpace, | const String& nameSpace, |
const Reference& instanceName) |
const CIMReference& instanceName) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
} | } |
| |
void Repository::createClass( | void Repository::createClass( |
const String& nameSpace, | const String& nameSpace, |
ClassDecl& newClass) |
CIMClass& newClass) |
{ | { |
// Form the path to the class: | // Form the path to the class: |
| |
String path; | String path; |
const String& className = newClass.getClassName(); | const String& className = newClass.getClassName(); |
const String& superClassName = newClass.getSuperClassName(); | const String& superClassName = newClass.getSuperClassName(); |
_MakeNewClassPath(_root, nameSpace, className, superClassName, path); |
_MakeNewClassPath( |
|
_root, nameSpace, className, superClassName, path); |
| |
if (FileSystem::exists(path)) |
String realPath; |
|
|
|
if (FileSystem::existsIgnoreCase(path, realPath)) |
throw CimException(CimException::ALREADY_EXISTS); | throw CimException(CimException::ALREADY_EXISTS); |
|
else |
|
realPath = path; |
| |
// Validate the new class: | // Validate the new class: |
| |
#if 0 |
|
newClass.resolve(_context, nameSpace); | newClass.resolve(_context, nameSpace); |
#endif |
|
| |
// Save the class: | // Save the class: |
| |
_SaveObject(path, newClass); |
_SaveObject(realPath, newClass); |
} | } |
| |
void Repository::createInstance( | void Repository::createInstance( |
const String& nameSpace, | const String& nameSpace, |
const InstanceDecl& newInstance) |
CIMInstance& newInstance) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); |
// Form the reference to this instance: |
|
|
|
String instanceName; |
|
|
|
#if 0 |
|
// ATTN: fix this: |
|
CIMReference::referenceToInstanceName( |
|
newInstance.makeReference(), instanceName); |
|
#else |
|
instanceName = "MyClass.key1=123456"; |
|
#endif |
|
|
|
// Get the instance-name and create an entry |
|
|
|
String indexPath; |
|
|
|
_MakeInstanceIndexPath( |
|
_root, nameSpace, newInstance.getClassName(), indexPath); |
|
|
|
Uint32 index; |
|
|
|
if (!InstanceIndexFile::insert(indexPath, instanceName, index)) |
|
throw CimException(CimException::FAILED); |
|
|
|
// Save the instance to file: |
|
|
|
String path; |
|
|
|
_MakeInstancePath( |
|
_root, nameSpace, newInstance.getClassName(), index, path); |
|
|
|
newInstance.resolve(_context, nameSpace); |
|
|
|
_SaveObject(path, newInstance); |
} | } |
| |
void Repository::modifyClass( | void Repository::modifyClass( |
const String& nameSpace, | const String& nameSpace, |
ClassDecl& modifiedClass) |
CIMClass& modifiedClass) |
{ | { |
// ATTN: need lots of semantic checking here: | // ATTN: need lots of semantic checking here: |
| |
// Get the old class: | // Get the old class: |
| |
ClassDecl oldClass = getClass( |
CIMClass oldClass = getClass( |
nameSpace, modifiedClass.getClassName(), false, true, true); | nameSpace, modifiedClass.getClassName(), false, true, true); |
| |
// Disallow changing the name of the super-class: | // Disallow changing the name of the super-class: |
|
|
| |
void Repository::modifyInstance( | void Repository::modifyInstance( |
const String& nameSpace, | const String& nameSpace, |
const InstanceDecl& modifiedInstance) |
const CIMInstance& modifiedInstance) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
} | } |
| |
Array<ClassDecl> Repository::enumerateClasses( |
Array<CIMClass> Repository::enumerateClasses( |
const String& nameSpace, | const String& nameSpace, |
const String& className, | const String& className, |
Boolean deepInheritance, | Boolean deepInheritance, |
|
|
Array<String> classNames = | Array<String> classNames = |
enumerateClassNames(nameSpace, className, deepInheritance); | enumerateClassNames(nameSpace, className, deepInheritance); |
| |
Array<ClassDecl> result; |
Array<CIMClass> result; |
| |
for (Uint32 i = 0; i < classNames.getSize(); i++) | for (Uint32 i = 0; i < classNames.getSize(); i++) |
{ | { |
|
|
return Array<String>(); | return Array<String>(); |
} | } |
| |
Array<InstanceDecl> Repository::enumerateInstances( |
Array<CIMInstance> Repository::enumerateInstances( |
const String& nameSpace, | const String& nameSpace, |
const String& className, | const String& className, |
Boolean deepInheritance, | Boolean deepInheritance, |
|
|
const Array<String>& propertyList) | const Array<String>& propertyList) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Array<InstanceDecl>(); |
return Array<CIMInstance>(); |
} | } |
| |
Array<String> Repository::enumerateInstanceNames( |
Array<CIMReference> Repository::enumerateInstanceNames( |
const String& nameSpace, | const String& nameSpace, |
const String& className) | const String& className) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Array<String>(); |
return Array<CIMReference>(); |
} | } |
| |
Array<InstanceDecl> Repository::execQuery( |
Array<CIMInstance> Repository::execQuery( |
const String& queryLanguage, | const String& queryLanguage, |
const String& query) | const String& query) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Array<InstanceDecl>(); |
return Array<CIMInstance>(); |
} | } |
| |
Array<InstanceDecl> Repository::associators( |
Array<CIMInstance> Repository::associators( |
const String& nameSpace, | const String& nameSpace, |
const Reference& objectName, |
const CIMReference& objectName, |
const String& assocClass, | const String& assocClass, |
const String& resultClass, | const String& resultClass, |
const String& role, | const String& role, |
|
|
const Array<String>& propertyList) | const Array<String>& propertyList) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Array<InstanceDecl>(); |
return Array<CIMInstance>(); |
} | } |
| |
Array<Reference> Repository::associatorNames( |
Array<CIMReference> Repository::associatorNames( |
const String& nameSpace, | const String& nameSpace, |
const Reference& objectName, |
const CIMReference& objectName, |
const String& assocClass, | const String& assocClass, |
const String& resultClass, | const String& resultClass, |
const String& role, | const String& role, |
const String& resultRole) | const String& resultRole) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Array<Reference>(); |
return Array<CIMReference>(); |
} | } |
| |
Array<InstanceDecl> Repository::references( |
Array<CIMInstance> Repository::references( |
const String& nameSpace, | const String& nameSpace, |
const Reference& objectName, |
const CIMReference& objectName, |
const String& resultClass, | const String& resultClass, |
const String& role, | const String& role, |
Boolean includeQualifiers, | Boolean includeQualifiers, |
|
|
const Array<String>& propertyList) | const Array<String>& propertyList) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Array<InstanceDecl>(); |
return Array<CIMInstance>(); |
} | } |
| |
Array<Reference> Repository::referenceNames( |
Array<CIMReference> Repository::referenceNames( |
const String& nameSpace, | const String& nameSpace, |
const Reference& objectName, |
const CIMReference& objectName, |
const String& resultClass, | const String& resultClass, |
const String& role) | const String& role) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Array<Reference>(); |
return Array<CIMReference>(); |
} | } |
| |
Value Repository::getProperty( |
CIMValue Repository::getProperty( |
const String& nameSpace, | const String& nameSpace, |
const Reference& instanceName, |
const CIMReference& instanceName, |
const String& propertyName) | const String& propertyName) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Value(); |
return CIMValue(); |
} | } |
| |
void Repository::setProperty( | void Repository::setProperty( |
const String& nameSpace, | const String& nameSpace, |
const Reference& instanceName, |
const CIMReference& instanceName, |
const String& propertyName, | const String& propertyName, |
const Value& newValue) |
const CIMValue& newValue) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
} | } |
| |
QualifierDecl Repository::getQualifier( |
CIMQualifierDecl Repository::getQualifier( |
const String& nameSpace, | const String& nameSpace, |
const String& qualifierName) | const String& qualifierName) |
{ | { |
|
|
| |
// If it does not exist: | // If it does not exist: |
| |
if (!FileSystem::exists(path)) |
String realPath; |
|
|
|
if (!FileSystem::existsIgnoreCase(path, realPath)) |
throw CimException(CimException::NOT_FOUND); | throw CimException(CimException::NOT_FOUND); |
| |
// Load the qualifier: | // Load the qualifier: |
| |
QualifierDecl qualifierDecl; |
CIMQualifierDecl qualifierDecl; |
_LoadObject(path, qualifierDecl); |
_LoadObject(realPath, qualifierDecl); |
| |
return QualifierDecl(qualifierDecl); |
// Return the qualifier: |
|
|
|
return CIMQualifierDecl(qualifierDecl); |
} | } |
| |
void Repository::setQualifier( | void Repository::setQualifier( |
const String& nameSpace, | const String& nameSpace, |
const QualifierDecl& qualifierDecl) |
const CIMQualifierDecl& qualifierDecl) |
{ | { |
// Form the path of the qualifier: | // Form the path of the qualifier: |
| |
|
|
| |
// If the qualifier already exists, delete it: | // If the qualifier already exists, delete it: |
| |
if (FileSystem::exists(path)) |
String realPath; |
|
|
|
if (FileSystem::existsIgnoreCase(path, realPath)) |
{ | { |
if (!FileSystem::removeFile(path)) |
if (!FileSystem::removeFile(realPath)) |
throw FailedToRemoveDirectory(path); | throw FailedToRemoveDirectory(path); |
} | } |
|
else |
|
realPath = path; |
| |
// Write the qualifier to file: | // Write the qualifier to file: |
| |
_SaveObject(path, qualifierDecl); |
_SaveObject(realPath, qualifierDecl); |
} | } |
| |
void Repository::deleteQualifier( | void Repository::deleteQualifier( |
|
|
String path; | String path; |
_MakeQualfierPath(_root, nameSpace, qualifierName, path); | _MakeQualfierPath(_root, nameSpace, qualifierName, path); |
| |
if (!FileSystem::exists(path)) |
String realPath; |
|
|
|
if (!FileSystem::existsIgnoreCase(path, realPath)) |
throw CimException(CimException::NOT_FOUND); | throw CimException(CimException::NOT_FOUND); |
| |
if (!FileSystem::removeFile(path)) |
if (!FileSystem::removeFile(realPath)) |
throw FailedToRemoveFile(path); | throw FailedToRemoveFile(path); |
} | } |
| |
Array<QualifierDecl> Repository::enumerateQualifiers( |
Array<CIMQualifierDecl> Repository::enumerateQualifiers( |
const String& nameSpace) | const String& nameSpace) |
{ | { |
// Build the path to the qualifiers directory: | // Build the path to the qualifiers directory: |
|
|
| |
// Load each qualifier into the result array: | // Load each qualifier into the result array: |
| |
Array<QualifierDecl> result; |
Array<CIMQualifierDecl> result; |
| |
for (Uint32 i = 0, n = qualifierNames.getSize(); i < n; i++) | for (Uint32 i = 0, n = qualifierNames.getSize(); i < n; i++) |
{ | { |
QualifierDecl tmp = getQualifier(nameSpace, qualifierNames[i]); |
CIMQualifierDecl tmp = getQualifier(nameSpace, qualifierNames[i]); |
result.append(tmp); | result.append(tmp); |
} | } |
| |
return result; | return result; |
} | } |
| |
Value Repository::invokeMethod( |
CIMValue Repository::invokeMethod( |
const String& nameSpace, | const String& nameSpace, |
const Reference& instanceName, |
const CIMReference& instanceName, |
const String& methodName, | const String& methodName, |
const Array<Value>& inParameters, |
const Array<CIMValue>& inParameters, |
Array<Value>& outParameters) |
Array<CIMValue>& outParameters) |
{ | { |
throw CimException(CimException::NOT_SUPPORTED); | throw CimException(CimException::NOT_SUPPORTED); |
return Value(); |
return CIMValue(); |
} | } |
| |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
|
|
return result; | return result; |
} | } |
| |
|
// Recall flavor defaults: TOSUBCLASS | OVERRIDABLE |
|
|
|
void Repository::createMetaQualifiers(const String& nameSpace) |
|
{ |
|
// CIMQualifier CimType : string = null, |
|
// CIMScope(property, parameter) |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("cimtype", String(), |
|
CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier id : sint32 = null, |
|
// CIMScope(any), |
|
// CIMFlavor(toinstance) |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("id", Sint32(0), |
|
CIMScope::ANY, |
|
CIMFlavor::TOINSTANCE)); |
|
|
|
// CIMQualifier OctetString : boolean = false, CIMScope(property) |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("octetstring", false, |
|
CIMScope::PROPERTY)); |
|
|
|
// CIMQualifier Abstract : boolean = false, |
|
// CIMScope(class, association, indication), |
|
// CIMFlavor(disableoverride, restricted); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("abstract", false, |
|
CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION, |
|
CIMFlavor::NONE)); |
|
|
|
// CIMQualifier Aggregate : boolean = false, |
|
// CIMScope(reference), |
|
// CIMFlavor(disableoverride, tosubclass); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("aggregate", false, |
|
CIMScope::REFERENCE, CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Aggregation : boolean = false, |
|
// CIMScope(association), |
|
// CIMFlavor(disableoverride, tosubclass); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("aggregation", false, |
|
CIMScope::ASSOCIATION, CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Alias : string = null, |
|
// CIMScope(property, reference, method), |
|
// CIMFlavor(translatable); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("alias", String(), |
|
CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD, |
|
CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier ArrayType : string = "Bag", |
|
// CIMScope(property, parameter); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("arraytype", "Bag", |
|
CIMScope::PROPERTY | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier Association : boolean = false, |
|
// CIMScope(class, association), |
|
// CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("association", false, |
|
CIMScope::CLASS | CIMScope::ASSOCIATION, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier BitMap : string[], |
|
// CIMScope(property, method, parameter); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("bitmap", Array<String>(), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier BitValues : string[], |
|
// CIMScope(property, method, parameter), |
|
// CIMFlavor(Translatable); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("bitvalues", Array<String>(), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER, |
|
CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier Counter : boolean = false, |
|
// CIMScope(property, method, parameter); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("counter", false, |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier Delete : boolean = false, |
|
// CIMScope(association, reference); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("delete", false, |
|
CIMScope::ASSOCIATION | CIMScope::REFERENCE)); |
|
|
|
// CIMQualifier Description : string = null, |
|
// CIMScope(any), |
|
// CIMFlavor(translatable); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("description", String(), |
|
CIMScope::ANY, |
|
CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier DisplayName : string = null, |
|
// CIMScope(any), |
|
// CIMFlavor(translatable); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("displayname", String(), |
|
CIMScope::ANY, |
|
CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier Expensive : boolean = false, |
|
// CIMScope(property, reference, method, class, association); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("expensive", false, |
|
CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD | CIMScope::CLASS | |
|
CIMScope::ASSOCIATION)); |
|
|
|
// CIMQualifier Gauge : boolean = false, |
|
// CIMScope(property, method, parameter); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("gauge", false, |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier Ifdeleted : boolean = false, |
|
// CIMScope(association, reference); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("ifdeleted", false, |
|
CIMScope::ASSOCIATION | CIMScope::REFERENCE)); |
|
|
|
// CIMQualifier In : boolean = true, |
|
// CIMScope(parameter), |
|
// CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("in", true, |
|
CIMScope::PARAMETER, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Indication : boolean = false, |
|
// CIMScope(class, indication), |
|
// CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("indication", false, |
|
CIMScope::CLASS | CIMScope::INDICATION, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Invisible : boolean = false, |
|
// CIMScope(reference, association, class, property, method); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("invisible", false, |
|
CIMScope::REFERENCE | CIMScope::ASSOCIATION | CIMScope::CLASS | CIMScope::PROPERTY | |
|
CIMScope::METHOD)); |
|
|
|
// CIMQualifier Key : boolean = false, |
|
// CIMScope(property, reference), |
|
// CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("key", false, |
|
CIMScope::PROPERTY | CIMScope::REFERENCE, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Large : boolean = false, |
|
// CIMScope(property, class); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("large", false, |
|
CIMScope::PROPERTY | CIMScope::CLASS)); |
|
|
|
// CIMQualifier MappingStrings : string[], |
|
// CIMScope(class, property, association, indication, reference); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("mappingstrings", Array<String>(), |
|
CIMScope::CLASS | CIMScope::PROPERTY | CIMScope::ASSOCIATION | |
|
CIMScope::INDICATION | CIMScope::REFERENCE)); |
|
|
|
// CIMQualifier Max : uint32 = null, CIMScope(reference); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("max", Sint32(0), |
|
CIMScope::PROPERTY | CIMScope::REFERENCE)); |
|
|
|
// CIMQualifier MaxLen : uint32 = null, |
|
// CIMScope(property, method, parameter); |
|
|
|
#if 0 |
|
setQualifier(nameSpace, CIMQualifierDecl("maxlen", Uint32(0), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
#else |
|
setQualifier(nameSpace, CIMQualifierDecl("maxlen", Sint32(0), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
#endif |
|
|
|
// CIMQualifier MaxValue : sint64 = null, |
|
// CIMScope(property, method, parameter); |
|
// ATTN: XML schema requires sint32! |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("maxvalue", Sint32(0), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier Min : sint32 = null, CIMScope(reference); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("min", Sint32(0), |
|
CIMScope::REFERENCE)); |
|
|
|
// CIMQualifier MinValue : sint64 = null, |
|
// CIMScope(property, method, parameter); |
|
// ATTN: CIMType expected by XML spec is sint32! |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("minvalue", Sint32(0), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier ModelCorrespondence : string[], |
|
// CIMScope(property); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("modelcorrespondence", |
|
Array<String>(), |
|
CIMScope::PROPERTY)); |
|
|
|
// CIMQualifier NonLocal : string = null, |
|
// CIMScope(reference); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("nonlocal", String(), |
|
CIMScope::REFERENCE)); |
|
|
|
// CIMQualifier NullValue : string = null, |
|
// CIMScope(property), |
|
// CIMFlavor(tosubclass, disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("nullvalue", String(), |
|
CIMScope::PROPERTY, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Out : boolean = false, |
|
// CIMScope(parameter), |
|
// CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("out", false, |
|
CIMScope::PARAMETER, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Override : string = null, |
|
// CIMScope(property, method, reference), |
|
// CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("override", String(), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::REFERENCE, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Propagated : string = null, |
|
// CIMScope(property, reference), |
|
// CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("propagated", String(), |
|
CIMScope::PROPERTY | CIMScope::REFERENCE, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Provider : string = null, |
|
// CIMScope(any); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("provider", String(), |
|
CIMScope::ANY)); |
|
|
|
// CIMQualifier Read : boolean = true, CIMScope(property); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("read", true, |
|
CIMScope::PROPERTY)); |
|
|
|
// CIMQualifier Required : boolean = false, |
|
// CIMScope(property); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("required", false, |
|
CIMScope::PROPERTY)); |
|
|
|
// CIMQualifier Revision : string = null, |
|
// CIMScope(schema, class, association, indication), |
|
// CIMFlavor(translatable); |
|
// ATTN: No such scope as CIMScope::SCHEMA |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("revision", String(), |
|
CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION, |
|
CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier Schema : string = null, |
|
// CIMScope(property, method), |
|
// CIMFlavor(disableoverride, translatable); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("schema", String(), |
|
CIMScope::PROPERTY | CIMScope::METHOD, |
|
CIMFlavor::TOSUBCLASS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier Source : string = null, |
|
// CIMScope(class, association, indication); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("source", String(), |
|
CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION)); |
|
|
|
// CIMQualifier SourceType : string = null, |
|
// CIMScope(class, association, indication,reference); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("sourcetype", String(), |
|
CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope:: INDICATION | |
|
CIMScope::REFERENCE)); |
|
|
|
// CIMQualifier Static : boolean = false, |
|
// CIMScope(property, method), CIMFlavor(disableoverride); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("static", false, |
|
CIMScope::PROPERTY | CIMScope::METHOD, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Syntax : string = null, |
|
// CIMScope(property, reference, method, parameter); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("syntax", String(), |
|
CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier SyntaxType : string = null, |
|
// CIMScope(property, reference, method, parameter); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("syntaxtype", String(), |
|
CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier Terminal : boolean = false, |
|
// CIMScope(class); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("terminal", false, |
|
CIMScope::CLASS)); |
|
|
|
// CIMQualifier TriggerType : string = null, |
|
// CIMScope(class, property, reference, method, association, indication); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("triggertype", String(), |
|
CIMScope::CLASS | CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD | |
|
CIMScope::ASSOCIATION | CIMScope::INDICATION)); |
|
|
|
// CIMQualifier Units : string = null, |
|
// CIMScope(property, method, parameter), |
|
// CIMFlavor(translatable); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("units", String(), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER, |
|
CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier UnknownValues : string[], |
|
// CIMScope(property), |
|
// CIMFlavor(disableoverride, tosubclass); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("unknownvalues", Array<String>(), |
|
CIMScope::PROPERTY, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier UnsupportedValues : string[], |
|
// CIMScope(property), |
|
// CIMFlavor(disableoverride, tosubclass); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("unsupportedvalues", Array<String>(), |
|
CIMScope::PROPERTY, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier ValueMap : string[], |
|
// CIMScope(property, method, parameter); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("valuemap", Array<String>(), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER)); |
|
|
|
// CIMQualifier Values : string[], |
|
// CIMScope(property, method, parameter), |
|
// CIMFlavor(translatable); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("values", Array<String>(), |
|
CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER, |
|
CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier Version : string = null, |
|
// CIMScope(schema, class, association, indication), |
|
// CIMFlavor(translatable); |
|
// ATTN: No such scope as CIMScope::SCHEMA |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("version", String(), |
|
CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION, |
|
CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE)); |
|
|
|
// CIMQualifier Weak : boolean = false, |
|
// CIMScope(reference), |
|
// CIMFlavor(disableoverride, tosubclass); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("weak", false, |
|
CIMScope::REFERENCE, |
|
CIMFlavor::TOSUBCLASS)); |
|
|
|
// CIMQualifier Write : boolean = false, |
|
// CIMScope(property); |
|
|
|
setQualifier(nameSpace, CIMQualifierDecl("write", false, |
|
CIMScope::PROPERTY)); |
|
} |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |