OpTransform Class Reference

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

#include <openbabel/optransform.h>

Inheritance diagram for OpTransform:

List of all members.

Public Types

typedef const std::map
< std::string, std::string > 
typedef std::map< const char
*, OBPlugin *, CharPtrLess

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 Protected Member Functions

static PluginMapTypePluginMap ()
static void LoadAllPlugins ()
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.

version 2.2

Member Typedef Documentation

typedef const std::map<std::string, std::string> OpMap [inherited]
typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

Constructor & Destructor Documentation

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 (  )  [inline]

Member Function Documentation

virtual const char* Description (  )  [virtual]

Required description of a sub-type.

Reimplemented from OBPlugin.

virtual bool WorksWith ( OBBase pOb  )  const [inline, virtual]

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

Implements OBOp.

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

Carries out the transform.

Implements OBOp.

virtual OpTransform* MakeInstance ( const std::vector< std::string > &   )  [inline, virtual]

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.

virtual const char* TypeID (  )  [inline, virtual, inherited]

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

Reimplemented from OBPlugin.

virtual bool ProcessVec ( std::vector< OBBase * > &   )  [inline, virtual, inherited]

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

static std::string OpOptions ( OBBase pOb  )  [inline, static, inherited]
string describing options, for display with -H and to make checkboxes in GUI

Referenced by OBMol::ClassDescription().

static bool DoOps ( OBBase pOb,
OpMap pOptions,
OBConversion pConv 
) [inline, static, inherited]

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)

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

Referenced by OBMol::DoTransformations().

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines