version 1.18, 2002/08/17 00:59:36
|
version 1.26, 2006/11/10 18:14:57
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) |
|
// |
|
// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include "CIMFlavor.h" | #include "CIMFlavor.h" |
|
|
const CIMFlavor CIMFlavor::DEFAULTS = OVERRIDABLE + TOSUBCLASS; | const CIMFlavor CIMFlavor::DEFAULTS = OVERRIDABLE + TOSUBCLASS; |
// ATTN: P1 KS 24 March 2002 Change here to make TOINSTANCE part of the defaults | // ATTN: P1 KS 24 March 2002 Change here to make TOINSTANCE part of the defaults |
//const CIMFlavor CIMFlavor::DEFAULTS = OVERRIDABLE + TOSUBCLASS + TOINSTANCE; | //const CIMFlavor CIMFlavor::DEFAULTS = OVERRIDABLE + TOSUBCLASS + TOINSTANCE; |
const CIMFlavor CIMFlavor::ALL = |
|
OVERRIDABLE + TOSUBCLASS + TOINSTANCE + TRANSLATABLE + |
|
DISABLEOVERRIDE + RESTRICTED; |
|
| |
| |
CIMFlavor::CIMFlavor () | CIMFlavor::CIMFlavor () |
|
|
| |
Boolean CIMFlavor::hasFlavor (const CIMFlavor & flavor) const | Boolean CIMFlavor::hasFlavor (const CIMFlavor & flavor) const |
{ | { |
return ((this->cimFlavor & flavor.cimFlavor) == flavor.cimFlavor) ? |
return (this->cimFlavor & flavor.cimFlavor) == flavor.cimFlavor; |
true : false; |
|
} | } |
| |
Boolean CIMFlavor::equal (const CIMFlavor & flavor) const | Boolean CIMFlavor::equal (const CIMFlavor & flavor) const |
{ | { |
return (this->cimFlavor == flavor.cimFlavor) ? true : false; |
return this->cimFlavor == flavor.cimFlavor; |
} | } |
| |
CIMFlavor CIMFlavor::operator+ (const CIMFlavor & flavor) const | CIMFlavor CIMFlavor::operator+ (const CIMFlavor & flavor) const |
|
|
String tmp; | String tmp; |
| |
if (this->hasFlavor (CIMFlavor::OVERRIDABLE)) | if (this->hasFlavor (CIMFlavor::OVERRIDABLE)) |
tmp += "OVERRIDABLE "; |
tmp.append("OVERRIDABLE "); |
| |
if (this->hasFlavor (CIMFlavor::TOSUBCLASS)) | if (this->hasFlavor (CIMFlavor::TOSUBCLASS)) |
tmp += "TOSUBCLASS "; |
tmp.append("TOSUBCLASS "); |
| |
if (this->hasFlavor (CIMFlavor::TOINSTANCE)) | if (this->hasFlavor (CIMFlavor::TOINSTANCE)) |
tmp += "TOINSTANCE "; |
tmp.append("TOINSTANCE "); |
| |
if (this->hasFlavor (CIMFlavor::TRANSLATABLE)) | if (this->hasFlavor (CIMFlavor::TRANSLATABLE)) |
tmp += "TRANSLATABLE "; |
tmp.append("TRANSLATABLE "); |
| |
if (this->hasFlavor (CIMFlavor::DISABLEOVERRIDE)) | if (this->hasFlavor (CIMFlavor::DISABLEOVERRIDE)) |
tmp += "DISABLEOVERRIDE "; |
tmp.append("DISABLEOVERRIDE "); |
| |
if (this->hasFlavor (CIMFlavor::RESTRICTED)) | if (this->hasFlavor (CIMFlavor::RESTRICTED)) |
tmp += "RESTRICTED "; |
tmp.append("RESTRICTED "); |
| |
if (tmp.size ()) | if (tmp.size ()) |
tmp.remove (tmp.size () - 1); | tmp.remove (tmp.size () - 1); |