Loading [MathJax]/extensions/tex2jax.js
ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
core
base
src
TObjString.cxx
Go to the documentation of this file.
1
// @(#)root/base:$Id$
2
// Author: Fons Rademakers 12/11/95
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
/** \class TObjString
13
Collectable string class. This is a TObject containing a TString.
14
*/
15
16
#include "
TObjString.h
"
17
18
ClassImp
(
TObjString
)
19
20
////////////////////////////////////////////////////////////////////////////////
21
/// String compare the argument with this object.
22
23
Int_t
TObjString
::
Compare
(const
TObject
*obj)
const
24
{
25
if
(
this
== obj)
return
0;
26
if
(
TObjString::Class
() != obj->IsA())
return
-1;
27
return
fString.CompareTo(((
TObjString
*)obj)->fString);
28
}
29
30
////////////////////////////////////////////////////////////////////////////////
31
/// Return kTRUE if the argument has the same content as this object.
32
33
Bool_t
TObjString::IsEqual
(
const
TObject
*obj)
const
34
{
35
if
(
this
== obj)
return
kTRUE
;
36
if
(
TObjString::Class
() != obj->IsA())
return
kFALSE
;
37
return
fString
== ((
TObjString
*)obj)->fString;
38
}
TObjString
Collectable string class.
Definition:
TObjString.h:32
TObjString::IsEqual
Bool_t IsEqual(const TObject *obj) const
Return kTRUE if the argument has the same content as this object.
Definition:
TObjString.cxx:33
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
kFALSE
const Bool_t kFALSE
Definition:
Rtypes.h:92
Class
void Class()
Definition:
Class.C:29
TObjString::fString
TString fString
Definition:
TObjString.h:35
TObjString.h
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:279
TObject
Mother of all ROOT objects.
Definition:
TObject.h:58
Compare
Int_t Compare(const void *item1, const void *item2)
Definition:
TGListTree.cxx:2145
kTRUE
const Bool_t kTRUE
Definition:
Rtypes.h:91