Open Babel  3.0
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
OpTransform Class Referenceabstract

#include <openbabel/optransform.h>

Inheritance diagram for OpTransform:
OBOp OBPlugin

Public Types

typedef const std::map< std::string, std::string > OpMap
 
typedef std::map< const char *, OBPlugin *, CharPtrLessPluginMapType
 
typedef PluginMapType::const_iterator PluginIterator
 

Public Member Functions

 OpTransform (const char *ID, const char *filename, const char *descr)
 
 ~OpTransform ()
 
virtual const char * Description ()
 
virtual bool WorksWith (OBBase *pOb) const
 
virtual bool Do (OBBase *pOb, const char *OptionText=NULL, OpMap *pOptions=NULL, OBConversion *pConv=NULL)
 
virtual OpTransformMakeInstance (const std::vector< std::string > &textlines)
 
virtual const char * TypeID ()
 
virtual bool ProcessVec (std::vector< OBBase *> &)
 
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
 
virtual void Init ()
 
const char * GetID () const
 
virtual PluginMapTypeGetMap () const =0
 

Static Public Member Functions

static std::string OpOptions (OBBase *pOb)
 
static bool DoOps (OBBase *pOb, OpMap *pOptions, OBConversion *pConv)
 
static OBPluginGetPlugin (const char *Type, const char *ID)
 
static bool ListAsVector (const char *PluginID, const char *param, std::vector< std::string > &vlist)
 
static void List (const char *PluginID, const char *param=NULL, std::ostream *os=&std::cout)
 
static std::string ListAsString (const char *PluginID, const char *param=NULL)
 
static std::string FirstLine (const char *txt)
 
static PluginIterator Begin (const char *PluginID)
 
static PluginIterator End (const char *PluginID)
 
static void LoadAllPlugins ()
 

Static Protected Member Functions

static PluginMapTypePluginMap ()
 
static PluginMapTypeGetTypeMap (const char *PluginID)
 
static OBPluginBaseFindType (PluginMapType &Map, const char *ID)
 

Protected Attributes

const char * _id
 

Static Protected Attributes

static int AllPluginsLoaded = 0
 

Detailed Description

Applies molecular reactions/transforms (OBChemTsfm class) read from a datafile.

Since
version 2.2

Member Typedef Documentation

◆ OpMap

typedef const std::map<std::string, std::string> OpMap
inherited

Constructor & Destructor Documentation

◆ OpTransform()

OpTransform ( const char *  ID,
const char *  filename,
const char *  descr 
)
inline

constructor. Each instance provides an ID, a datafile and a description.

Referenced by OpTransform::MakeInstance().

◆ ~OpTransform()

~OpTransform ( )
inline

Member Function Documentation

◆ Description()

virtual const char* Description ( )
virtual

Required description of a sub-type.

Reimplemented from OBPlugin.

Referenced by OpTransform::~OpTransform().

◆ WorksWith()

virtual bool WorksWith ( OBBase pOb) const
inlinevirtual

Checks that this op is being applied to the right kind of object(OBMol)

Implements OBOp.

◆ Do()

virtual bool Do ( OBBase pOb,
const char *  OptionText = NULL,
OpMap pOptions = NULL,
OBConversion pConv = NULL 
)
virtual

Carries out the transform.

Implements OBOp.

Referenced by OpTransform::WorksWith().

◆ MakeInstance()

virtual OpTransform* MakeInstance ( const std::vector< std::string > &  )
inlinevirtual

Make a new instance of the class. See OpTransform, OBGroupContrib, SmartsDescriptor classes for derived versions. Usually, the first parameter is the classname, the next three are parameters(ID, filename, description) for a constructor, and the rest data.

Reimplemented from OBPlugin.

◆ TypeID()

virtual const char* TypeID ( )
inlinevirtualinherited

Provides the name of this kind of plugin. Use -L "ops" to list from commandline.

Reimplemented from OBPlugin.

◆ ProcessVec()

virtual bool ProcessVec ( std::vector< OBBase *> &  )
inlinevirtualinherited

Do something with an array of objects. Used a a callback routine in OpSort, etc.

◆ OpOptions()

static std::string OpOptions ( OBBase pOb)
inlinestaticinherited
Returns
string describing options, for display with -H and to make checkboxes in GUI

◆ DoOps()

static bool DoOps ( OBBase pOb,
OpMap pOptions,
OBConversion pConv 
)
inlinestaticinherited

Call Do() of all the OBOps whose ID is a key in the map. Called from DoTransformations(). The map has general options like -x or –multicharoption The key is the option name and the value, if any, is text which follows the option name. In some cases, there may be several parameters, space separated)

Returns
false indicating object should not be output, if any Do() returns false

The documentation for this class was generated from the following file: