version 1.7, 2001/04/13 21:53:47
|
version 1.16, 2001/07/03 18:25:45
|
|
|
//BEGIN_LICENSE |
//%///////////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM |
// Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a |
// Permission is hereby granted, free of charge, to any person obtaining a copy |
// copy of this software and associated documentation files (the "Software"), |
// of this software and associated documentation files (the "Software"), to |
// to deal in the Software without restriction, including without limitation |
// deal in the Software without restriction, including without limitation the |
// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
// and/or sell copies of the Software, and to permit persons to whom the |
// sell copies of the Software, and to permit persons to whom the Software is |
// Software is furnished to do so, subject to the following conditions: |
// furnished to do so, subject to the following conditions: |
// | // |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
// DEALINGS IN THE SOFTWARE. |
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
// | // |
//END_LICENSE |
//============================================================================== |
//BEGIN_HISTORY |
|
// | // |
// Author: |
// Author: Mike Brasher (mbrasher@bmc.com) |
// | // |
// $Log$ |
// Modified By: |
// Revision 1.7 2001/04/13 21:53:47 karl |
|
// add get and set property |
|
// | // |
// Revision 1.6 2001/04/08 01:13:22 mike |
//%///////////////////////////////////////////////////////////////////////////// |
// Changed "ConstCIM" to "CIMConst" |
|
// |
|
// Revision 1.4 2001/02/20 07:25:57 mike |
|
// Added basic create-instance in repository and in client. |
|
// |
|
// Revision 1.3 2001/02/19 01:47:16 mike |
|
// Renamed names of the form CIMConst to CIMConst. |
|
// |
|
// Revision 1.2 2001/02/16 02:06:07 mike |
|
// Renamed many classes and headers. |
|
// |
|
// Revision 1.1.1.1 2001/01/14 19:53:33 mike |
|
// Pegasus import |
|
// |
|
// |
|
//END_HISTORY |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
// |
|
// XmlReader.h |
|
// |
|
//////////////////////////////////////////////////////////////////////////////// |
|
| |
#ifndef Pegasus_XmlReader_h | #ifndef Pegasus_XmlReader_h |
#define Pegasus_XmlReader_h | #define Pegasus_XmlReader_h |
|
|
class CIMProperty; | class CIMProperty; |
class CIMParameter; | class CIMParameter; |
class CIMMethod; | class CIMMethod; |
|
class CIMObject; |
|
class CIMObjectWithPath; |
| |
class PEGASUS_COMMON_LINKAGE XmlReader | class PEGASUS_COMMON_LINKAGE XmlReader |
{ | { |
|
|
CIMType type, | CIMType type, |
CIMValue& value); | CIMValue& value); |
| |
|
static Boolean getStringValueElement( |
|
XmlParser& parser, |
|
String& str, |
|
Boolean required); |
|
|
static CIMValue stringArrayToValue( | static CIMValue stringArrayToValue( |
Uint32 lineNumber, | Uint32 lineNumber, |
const Array<const char*>& array, | const Array<const char*>& array, |
|
|
String& className, | String& className, |
Boolean required = false); | Boolean required = false); |
| |
static KeyBinding::CIMType getValueTypeAttribute( |
static KeyBinding::Type getValueTypeAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* elementName); | const char* elementName); |
| |
static Boolean getKeyValueElement( | static Boolean getKeyValueElement( |
XmlParser& parser, | XmlParser& parser, |
KeyBinding::CIMType& type, |
KeyBinding::Type& type, |
String& value); | String& value); |
| |
static Boolean getKeyBindingElement( | static Boolean getKeyBindingElement( |
XmlParser& parser, | XmlParser& parser, |
String& name, | String& name, |
String& value, | String& value, |
KeyBinding::CIMType& type); |
KeyBinding::Type& type); |
| |
static Boolean getInstanceNameElement( | static Boolean getInstanceNameElement( |
XmlParser& parser, | XmlParser& parser, |
String& className, | String& className, |
Array<KeyBinding>& keyBindings); | Array<KeyBinding>& keyBindings); |
| |
|
static Boolean getInstanceNameElement( |
|
XmlParser& parser, |
|
CIMReference& instanceName); |
|
|
static Boolean getInstancePathElement( | static Boolean getInstancePathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& reference); | CIMReference& reference); |
|
|
XmlParser& parser, | XmlParser& parser, |
CIMInstance& cimInstance); | CIMInstance& cimInstance); |
| |
static void getObject(XmlParser& parser, CIMClass& x) |
static void getObject(XmlParser& parser, CIMClass& x); |
{ |
|
if (!getClassElement(parser, x)) |
|
{ |
|
throw XmlValidationError(parser.getLine(), |
|
"expected CLASS element"); |
|
} |
|
} |
|
| |
static void getObject(XmlParser& parser, CIMInstance& x) |
static void getObject(XmlParser& parser, CIMInstance& x); |
{ |
|
if (!getInstanceElement(parser, x)) |
|
{ |
|
throw XmlValidationError(parser.getLine(), |
|
"expected INSTANCE element"); |
|
} |
|
} |
|
| |
static void getObject(XmlParser& parser, CIMQualifierDecl& x) |
static void getObject(XmlParser& parser, CIMQualifierDecl& x); |
{ |
|
if (!getQualifierDeclElement(parser, x)) |
|
{ |
|
throw XmlValidationError(parser.getLine(), |
|
"expected QUALIFIER.DECLARATION element"); |
|
} |
|
} |
|
| |
static Boolean getMessageStartTag( | static Boolean getMessageStartTag( |
XmlParser& parser, | XmlParser& parser, |
Uint32& id, |
String& id, |
const char*& protocolVersion); | const char*& protocolVersion); |
| |
static Boolean getIMethodCallStartTag( | static Boolean getIMethodCallStartTag( |
|
|
const char*& description, | const char*& description, |
Boolean required = false); | Boolean required = false); |
| |
|
static Boolean getObjectWithPath( |
|
XmlParser& parser, |
|
CIMObjectWithPath& objectWithPath); |
|
|
|
static Boolean getObjectNameElement( |
|
XmlParser& parser, |
|
CIMReference& objectName); |
|
|
|
static Boolean getObjectPathElement( |
|
XmlParser& parser, |
|
CIMReference& objectPath); |
|
|
private: | private: |
| |
XmlReader() | XmlReader() |