Chemical Data Processing Library Python API - Version 1.2.0
Public Member Functions | Properties | List of all members
CDPL.Chem.StringDataBlockEntry Class Reference

Represents a data item in the structure or reaction data block of a MDL SD- or RD-File data record (see [CTFILE]). More...

+ Inheritance diagram for CDPL.Chem.StringDataBlockEntry:

Public Member Functions

None __init__ ()
 Constructs a StringDataBlockEntry object with an empty data header and content.
 
None __init__ (StringDataBlockEntry entry)
 Initializes a copy of the StringDataBlockEntry instance entry. More...
 
None __init__ (str header, str data)
 Constructs a StringDataBlockEntry object with the specified data header and content. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
StringDataBlockEntry assign (StringDataBlockEntry entry)
 Replaces the current state of self with a copy of the state of the StringDataBlockEntry instance entry. More...
 
str getHeader ()
 Returns the data header. More...
 
None setHeader (str header)
 Sets the data header. More...
 
str getData ()
 Returns the stored data content. More...
 
None setData (str data)
 Sets the data content. More...
 
bool __eq__ (StringDataBlockEntry entry)
 Equality comparison operator. More...
 
bool __ne__ (StringDataBlockEntry entry)
 Inequality comparison operator. More...
 
bool __le__ (StringDataBlockEntry entry)
 Returns the result of the comparison operation self <= entry. More...
 
bool __ge__ (StringDataBlockEntry entry)
 Returns the result of the comparison operation self >= entry. More...
 
bool __lt__ (StringDataBlockEntry entry)
 Returns the result of the comparison operation self < entry. More...
 
bool __gt__ (StringDataBlockEntry entry)
 Returns the result of the comparison operation self > entry. More...
 

Properties

 objectID = property(getObjectID)
 
 header = property(getHeader, setHeader)
 
 data = property(getData, setData)
 

Detailed Description

Represents a data item in the structure or reaction data block of a MDL SD- or RD-File data record (see [CTFILE]).

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Chem.StringDataBlockEntry.__init__ ( StringDataBlockEntry  entry)

Initializes a copy of the StringDataBlockEntry instance entry.

Parameters
entryThe StringDataBlockEntry instance to copy.

◆ __init__() [2/2]

None CDPL.Chem.StringDataBlockEntry.__init__ ( str  header,
str  data 
)

Constructs a StringDataBlockEntry object with the specified data header and content.

Parameters
headerThe data header.
dataThe data content.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.StringDataBlockEntry.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python StringDataBlockEntry instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two StringDataBlockEntry instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ assign()

StringDataBlockEntry CDPL.Chem.StringDataBlockEntry.assign ( StringDataBlockEntry  entry)

Replaces the current state of self with a copy of the state of the StringDataBlockEntry instance entry.

Parameters
entryThe StringDataBlockEntry instance to copy.
Returns
self

◆ getHeader()

str CDPL.Chem.StringDataBlockEntry.getHeader ( )

Returns the data header.

Returns
The data header.

◆ setHeader()

None CDPL.Chem.StringDataBlockEntry.setHeader ( str  header)

Sets the data header.

Parameters
headerThe new data header.

◆ getData()

str CDPL.Chem.StringDataBlockEntry.getData ( )

Returns the stored data content.

Returns
The stored data content.

◆ setData()

None CDPL.Chem.StringDataBlockEntry.setData ( str  data)

Sets the data content.

Parameters
dataThe new data content.

◆ __eq__()

bool CDPL.Chem.StringDataBlockEntry.__eq__ ( StringDataBlockEntry  entry)

Equality comparison operator.

Parameters
entryThe other StringDataBlockEntry object to be compared with.
Returns
True if the data entry headers and values compare equal, and False otherwise.

◆ __ne__()

bool CDPL.Chem.StringDataBlockEntry.__ne__ ( StringDataBlockEntry  entry)

Inequality comparison operator.

The result is equivalent to !(self == entry).

Parameters
entryThe other StringDataBlockEntry object to be compared with.
Returns
True if the data headers and/or values compare non-equal, and False otherwise.
See also
eq()

◆ __le__()

bool CDPL.Chem.StringDataBlockEntry.__le__ ( StringDataBlockEntry  entry)

Returns the result of the comparison operation self <= entry.

Parameters
entryThe StringDataBlockEntry instance to be compared with.
Returns
The result of the comparison operation.

◆ __ge__()

bool CDPL.Chem.StringDataBlockEntry.__ge__ ( StringDataBlockEntry  entry)

Returns the result of the comparison operation self >= entry.

Parameters
entryThe StringDataBlockEntry instance to be compared with.
Returns
The result of the comparison operation.

◆ __lt__()

bool CDPL.Chem.StringDataBlockEntry.__lt__ ( StringDataBlockEntry  entry)

Returns the result of the comparison operation self < entry.

Parameters
entryThe StringDataBlockEntry instance to be compared with.
Returns
The result of the comparison operation.

◆ __gt__()

bool CDPL.Chem.StringDataBlockEntry.__gt__ ( StringDataBlockEntry  entry)

Returns the result of the comparison operation self > entry.

Parameters
entryThe StringDataBlockEntry instance to be compared with.
Returns
The result of the comparison operation.