Changed print methods to take a stream instead of hardcoded cout
authorbob <bob>
Sun, 4 Mar 2001 21:57:34 +0000 (21:57 +0000)
committerbob <bob>
Sun, 4 Mar 2001 21:57:34 +0000 (21:57 +0000)
27 files changed:
src/Pegasus/Common/CIMClass.h
src/Pegasus/Common/CIMClassRep.cpp
src/Pegasus/Common/CIMClassRep.h
src/Pegasus/Common/CIMInstance.h
src/Pegasus/Common/CIMInstanceRep.cpp
src/Pegasus/Common/CIMInstanceRep.h
src/Pegasus/Common/CIMMethod.h
src/Pegasus/Common/CIMMethodRep.cpp
src/Pegasus/Common/CIMMethodRep.h
src/Pegasus/Common/CIMParameter.h
src/Pegasus/Common/CIMParameterRep.cpp
src/Pegasus/Common/CIMParameterRep.h
src/Pegasus/Common/CIMProperty.h
src/Pegasus/Common/CIMPropertyRep.cpp
src/Pegasus/Common/CIMPropertyRep.h
src/Pegasus/Common/CIMQualifier.h
src/Pegasus/Common/CIMQualifierDecl.h
src/Pegasus/Common/CIMQualifierDeclRep.cpp
src/Pegasus/Common/CIMQualifierDeclRep.h
src/Pegasus/Common/CIMQualifierList.cpp
src/Pegasus/Common/CIMQualifierList.h
src/Pegasus/Common/CIMQualifierRep.cpp
src/Pegasus/Common/CIMQualifierRep.h
src/Pegasus/Common/CIMReference.cpp
src/Pegasus/Common/CIMReference.h
src/Pegasus/Common/CIMValue.cpp
src/Pegasus/Common/CIMValue.h

index d22da5c91671ec87bebca2e46b642ebf75ae3133..09f283affe81643a8df97cd2d9ccd501e33133db 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMClass.h,v $
+// Revision 1.5  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.4  2001/02/26 10:13:24  karl
 // documentation changes
 //
@@ -398,11 +401,11 @@ public:
        _rep->toXml(out);
     }
 
-    /// CIMMethod print
-    void print() const
+    /// CIMMethod print 
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     /** CIMMethod identical -  Compares with another class
@@ -583,10 +586,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const ConstCIMClass& x) const
index 1c4231a3564662b07068a8ad6e14a374de5eb42f..2dcc407657c6b03ed7ce891049323dd085adedf0 100644 (file)
@@ -1,4 +1,4 @@
-//BEGIN_LICENSE
+///BEGIN_LICENSE
 //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 //
 // Author:
 //
 // $Log: CIMClassRep.cpp,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
+
 // Revision 1.3  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -447,12 +451,12 @@ void CIMClassRep::toXml(Array<Sint8>& out) const
     out << "</CLASS>\n";
 }
 
-void CIMClassRep::print() const
+void CIMClassRep::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    XmlWriter::indentedPrint(std::cout, tmp.getData(), 4);
+    XmlWriter::indentedPrint(os, tmp.getData(), 4);
     // cout << tmp.getData() << endl;
 }
 
index 3321c11ffd7164cb746d1cbf1954af32d9756da9..a4ebb0fc0a98b598a9ab5561cad4152a7c147865 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMClassRep.h,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.3  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -154,7 +157,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMClassRep* x) const;
 
index 09de210d650cee5a408211c361958afeae355dbd..5c436e2f90895c79b87d3025050e50c1d8426b55 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMInstance.h,v $
+// Revision 1.7  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.6  2001/02/27 09:32:35  karl
 // Document cleanup
 //
@@ -348,10 +351,10 @@ public:
     /**        CIMMethod
     
     */
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     /**        identical - Compares the CIMInstance with another CIMInstance
@@ -511,10 +514,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const ConstCIMInstance& x) const
index c109fe59e392ffa13bf71b2e0e49fb5ccc1f657c..56cf6138fdf8f52ba570c149fa8c5a5515cd08d6 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMInstanceRep.cpp,v $
+// Revision 1.5  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.4  2001/02/20 07:25:57  mike
 // Added basic create-instance in repository and in client.
 //
@@ -300,12 +303,12 @@ void CIMInstanceRep::toXml(Array<Sint8>& out) const
     out << "</INSTANCE>\n";
 }
 
-void CIMInstanceRep::print() const
+void CIMInstanceRep::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 String CIMInstanceRep::getInstanceName(const ConstCIMClass& cimClass) const
index 71ca81e7b30ce9d7696ef1ba63ad05581d444137..0676d95284056dd3733dbf4132a8ac6e6e502e5d 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMInstanceRep.h,v $
+// Revision 1.5  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.4  2001/02/20 07:25:57  mike
 // Added basic create-instance in repository and in client.
 //
@@ -122,7 +125,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMInstanceRep* x) const;
 
index ad5a1622a58e28dab7ac0b523f06f8575d28145f..64e5b8394c05efefeea4f3a26f9bca4abbb4c762 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMMethod.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -337,10 +340,10 @@ public:
        _rep->toXml(out);
     }
     /// method print - ATTN:
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
     /// CIMMethod identical - ATTN
     Boolean identical(const CIMConstMethod& x) const;
@@ -498,10 +501,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const CIMConstMethod& x) const
index 75a134775d1a9ed7096a5a3d8dd472dd6ddae073..a4cfd74161188c25a180611cefca479ea23588c6 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMMethodRep.cpp,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -211,12 +214,12 @@ void CIMMethodRep::toXml(Array<Sint8>& out) const
     out << "</METHOD>\n";
 }
 
-void CIMMethodRep::print() const
+void CIMMethodRep::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 CIMMethodRep::CIMMethodRep()
index a2ceda13f53caabc736e80c8214b31d2ffbc8440..10056aeca33b252871b041471bed7d4e50e48471 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMMethodRep.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -162,7 +165,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    virtual void print() const;
+    virtual void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMMethodRep* x) const;
 
index 3ce9a298e4bdfb4071ba41c69350372c8f9a9710..5894e6cde2e670b9e6642d2082d51261b48bb111 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMParameter.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -195,10 +198,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const CIMConstParameter& x) const;
@@ -343,10 +346,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const CIMConstParameter& x) const
index 20a3533004fc7df90e9ee7045d055707b122d191..34192e9207dff94aa7100f6ad816473048248c6c 100644 (file)
@@ -23,8 +23,8 @@
 // Author:
 //
 // $Log: CIMParameterRep.cpp,v $
-// Revision 1.1  2001/02/18 18:39:06  mike
-// new
+// Revision 1.2  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
 //
 // Revision 1.1  2001/02/16 02:07:06  mike
 // Renamed many classes and headers (using new CIM prefixes).
@@ -157,12 +157,12 @@ void CIMParameterRep::toXml(Array<Sint8>& out) const
     }
 }
 
-void CIMParameterRep::print() const 
+void CIMParameterRep::print(std::ostream &os) const 
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 Boolean CIMParameterRep::identical(const CIMParameterRep* x) const
index 073695223093937aec05a235630565979b7d7206..cb7135b486cdeddacaf384ecf80c391bc48d0b70 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMParameterRep.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -128,7 +131,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMParameterRep* x) const;
 
index 256889ca01aae9b917948cc9720b2a3a4de4b581..a57b1d101352564da5e8abb714c627c9dde0aec1 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMProperty.h,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.3  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -266,10 +269,10 @@ public:
     }
 
     /// mthod print -ATTN
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     /// CIMMethod identical - ATTN
@@ -436,10 +439,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const ConstCIMProperty& x) const
index 43981395808e74e7357bdb91ee06f6890e2a4f76..9e24b93f4605afec88a34392fec4c528b6833c04 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMPropertyRep.cpp,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.3  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -259,12 +262,12 @@ void CIMPropertyRep::toXml(Array<Sint8>& out) const
     }
 }
 
-void CIMPropertyRep::print() const
+void CIMPropertyRep::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 Boolean CIMPropertyRep::identical(const CIMPropertyRep* x) const
index ce34e82ef2400ab9040a6c82b5f0d61e5fcd1142..ce313e62db56c093567396f1e4764312835beb5d 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMPropertyRep.h,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.3  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -156,7 +159,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMPropertyRep* x) const;
 
index b141009dfc886bcfcddb7f1a091730e13aba59a0..ec51eda8f10d805e256f641681260d90f8f0421d 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifier.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -233,10 +236,10 @@ public:
     /**        CIMMethod
 
    */
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     /**        CIMMethod
@@ -376,10 +379,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const CIMConstQualifier& x) const
index 7d40d74987fcbfa1a1b1d5379f50e40539e0dd48..0e4445a830d8c042c623114818bf500d6cbf1444 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifierDecl.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -212,10 +215,10 @@ public:
     
     */
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
     /** CIMMethod
     
@@ -362,10 +365,10 @@ public:
        _rep->toXml(out);
     }
 
-    void print() const
+    void print(std::ostream &o=std::cout) const
     {
        _checkRep();
-       _rep->print();
+       _rep->print(o);
     }
 
     Boolean identical(const CIMConstQualifierDecl& x) const
index 461978af2fc8bf2a221dacf1f77c98f57ef909e8..cbee31a18eeab402b662859dff9b90db30cc1aeb 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifierDeclRep.cpp,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/26 04:33:28  mike
 // Fixed many places where cim names were be compared with operator==(String,String).
 // Changed all of these to use CIMName::equal()
@@ -122,12 +125,12 @@ void CIMQualifierDeclRep::toXml(Array<Sint8>& out) const
     out << "</QUALIFIER.DECLARATION>\n";
 }
 
-void CIMQualifierDeclRep::print() const
+void CIMQualifierDeclRep::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 CIMQualifierDeclRep::CIMQualifierDeclRep()
index 59457caf511deee8ab55497483c7473eef91174b..eb0bff8db2df96b83b67b08b8e569201eb2c124c 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifierDeclRep.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -123,7 +126,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMQualifierDeclRep* x) const;
 
index 89e79d2d751dcaff8b0c20d4d47fee161774c3f4..7a98be00f7f90f5a5e89deb12f8b3e737b038043 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifierList.cpp,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.3  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -219,12 +222,12 @@ void CIMQualifierList::toXml(Array<Sint8>& out) const
        _qualifiers[i].toXml(out);
 }
 
-void CIMQualifierList::print() const
+void CIMQualifierList::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 Boolean CIMQualifierList::identical(const CIMQualifierList& x) const
index 094417c743a885d9154d3817ac27d5f8a05d4bef..b9d840c3c2a54860bf2f32c259631e984be03907 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifierList.h,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.3  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -84,7 +87,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMQualifierList& x) const;
 
index a86282a4c23508eb4a8ea3d145669f4813247d51..14a8e9ccd0904e3ff9ca6d5cd065e6e4a43b9ff0 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifierRep.cpp,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/26 04:33:28  mike
 // Fixed many places where cim names were be compared with operator==(String,String).
 // Changed all of these to use CIMName::equal()
@@ -108,12 +111,12 @@ void CIMQualifierRep::toXml(Array<Sint8>& out) const
     out << "</QUALIFIER>\n";
 }
 
-void CIMQualifierRep::print() const
+void CIMQualifierRep::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 CIMQualifierRep::CIMQualifierRep()
index 1208be4887c4e4e46d3597c05c3f82e4c5457341..1b23eb10d454fc9d7b24c2def240a9f1d404bcf0 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMQualifierRep.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/19 01:47:16  mike
 // Renamed names of the form CIMConst to ConstCIM.
 //
@@ -121,7 +124,7 @@ public:
 
     void toXml(Array<Sint8>& out) const;
 
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     Boolean identical(const CIMQualifierRep* x) const;
 
index 10f25cd8fd641e13eaa15de6b44aa69d0e9c9311..e31e13846c605c728a1c57267e1672bef5339d84 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMReference.cpp,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/26 04:33:28  mike
 // Fixed many places where cim names were be compared with operator==(String,String).
 // Changed all of these to use CIMName::equal()
@@ -296,12 +299,12 @@ void CIMReference::toXml(Array<Sint8>& out) const
     out << "</VALUE.REFERENCE>\n";
 }
 
-void CIMReference::print() const
+void CIMReference::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 const char* KeyBinding::typeToString(CIMType type)
index b0038bd6d5e468394a9266edf06b34dc944f1fd1..35b8665754bfb0f057a055b1628b3c83c34244e4 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMReference.h,v $
+// Revision 1.4  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.3  2001/02/26 04:33:28  mike
 // Fixed many places where cim names were be compared with operator==(String,String).
 // Changed all of these to use CIMName::equal()
@@ -295,7 +298,7 @@ public:
     /** print() Creates and prints to stdout the XML representation for
        the CIM object path
     */
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
     ///  nameSpaceToXML - ATTN:
     void nameSpaceToXml(Array<Sint8>& out) const;
        /// localNameSpaceToXml - ATTN:
index 0c6cd94186da6ca48279f51a6ebc471b4377392e..2dbe9972852848ccd195171dbf82d07163727da5 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMValue.cpp,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/26 04:33:28  mike
 // Fixed many places where cim names were be compared with operator==(String,String).
 // Changed all of these to use CIMName::equal()
@@ -758,12 +761,12 @@ void CIMValue::toXml(Array<Sint8>& out) const
     }
 }
 
-void CIMValue::print() const
+void CIMValue::print(std::ostream &os) const
 {
     Array<Sint8> tmp;
     toXml(tmp);
     tmp.append('\0');
-    std::cout << tmp.getData() << std::endl;
+    os << tmp.getData() << std::endl;
 }
 
 void CIMValue::set(Boolean x)
index cfc21d2594a2ccfca138657fdc2ce62a41af8645..f69338da2b4275f90895adcf3efbcdc27f2d8de2 100644 (file)
@@ -23,6 +23,9 @@
 // Author:
 //
 // $Log: CIMValue.h,v $
+// Revision 1.3  2001/03/04 21:57:34  bob
+// Changed print methods to take a stream instead of hardcoded cout
+//
 // Revision 1.2  2001/02/20 05:16:57  mike
 // Implemented CIMInstance::getInstanceName()
 //
@@ -330,7 +333,7 @@ public:
     void toXml(Array<Sint8>& out) const;
 
     /// CIMMethod print - ATTN
-    void print() const;
+    void print(std::ostream &o=std::cout) const;
 
     /// CIMMethod toString     - ATTN
     String toString() const;