Applies molecular reactions/transforms (OBChemTsfm class) read from a datafile. More...
#include <openbabel/optransform.h>
Public Types | |
| typedef const std::map < std::string, std::string > | OpMap |
| typedef std::map< const char *, OBPlugin *, CharPtrLess > | PluginMapType |
| 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 OpTransform * | MakeInstance (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 PluginMapType & | GetMap () const =0 |
Static Public Member Functions | |
| static std::string | OpOptions (OBBase *pOb) |
| static bool | DoOps (OBBase *pOb, OpMap *pOptions, OBConversion *pConv) |
| static OBPlugin * | GetPlugin (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 PluginMapType & | PluginMap () |
| static PluginMapType & | GetTypeMap (const char *PluginID) |
| static OBPlugin * | BaseFindType (PluginMapType &Map, const char *ID) |
Protected Attributes | |
| const char * | _id |
Applies molecular reactions/transforms (OBChemTsfm class) read from a datafile.
typedef const std::map<std::string, std::string> OpMap [inherited] |
typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited] |
| 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] |
| 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] |
| 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)