NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Member Functions | List of all members
CPluginArg Class Reference

Represents ASN.1 type PluginArg defined in file gui_objects.asn

Search Toolkit Book for CPluginArg

#include <gui/objects/PluginArg.hpp>

+ Inheritance diagram for CPluginArg:
+ Collaboration diagram for CPluginArg:

Public Types

enum  EType {
  eNotSet , eBoolean , eProject , eDouble ,
  eInteger , eObject , eString , eSecretString ,
  eInputFile , eOutputFile , eAnySerialObject , eMaxArg
}
 enumerated list of types we support More...
 
typedef list< CConstRef< CPluginValue > > TValues
 typedefs for collections of argument types CPluginValue supports type-specific data retrieval of single entities and also wraps the necessary document More...
 
- Public Types inherited from CPluginArg_Base
enum class  E_memberIndex {
  e__allMandatory = 0 , e_name , e_desc , e_long_desc ,
  e_optional , e_default , e_hidden , e_data ,
  e_constraint
}
 
typedef string TName
 
typedef string TDesc
 
typedef string TLong_desc
 
typedef bool TOptional
 
typedef bool TDefault
 
typedef bool THidden
 
typedef C_Data TData
 
typedef list< CRef< CPluginValueConstraint > > TConstraint
 
typedef Tparent::CMemberIndex< E_memberIndex, 9 > TmemberIndex
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CPluginArg (void)
 constructor More...
 
 ~CPluginArg (void)
 destructor More...
 
EType GetType (void) const
 access the type for this argument More...
 
bool IsEmpty (void) const
 determine if this argument is empty (i.e., has all type information but no values) More...
 
void ClearObjects ()
 clear any objects from object-based arguments More...
 
const CGBProjectHandleGetProject (void) const
 accessors for specific sub-components in the event that the data type is list, NULL is returned More...
 
const CObjectGetObject (void) const
 
const stringGetObjectSubtype (void) const
 accessor for the object-specific type info in the event the data type is list, the type info for the first item is returned, as we guarantee that all items in a list will be equivalently typed More...
 
void SetBoolean (void)
 set this argument as an integer More...
 
void SetBoolean (bool arg)
 
void SetBoolean (const list< bool > &arg)
 
bool AsBoolean (void) const
 
void SetInteger (void)
 set this argument as an integer More...
 
void SetInteger (const string &arg)
 
void SetInteger (int arg)
 
void SetInteger (const list< int > &arg)
 
int AsInteger (void) const
 
void SetDouble (void)
 set this argument as a double More...
 
void SetDouble (const string &arg)
 
void SetDouble (double arg)
 
void SetDouble (const list< double > &arg)
 
double AsDouble (void) const
 
void SetString (void)
 set this argument as a string More...
 
void SetString (const string &arg)
 
void SetString (const list< string > &arg)
 
const stringAsString (void) const
 
void SetSecretString (void)
 set this argument as a secret string More...
 
void SetSecretString (const string &arg)
 
void SetSecretString (const list< string > &arg)
 
const stringAsSecretString (void) const
 
void SetInputFile (void)
 set this argument as an input file More...
 
void SetInputFile (const string &arg)
 
void SetInputFile (const list< string > &arg)
 
const stringAsInputFile (void) const
 
void SetOutputFile (void)
 set this argument as an output file More...
 
void SetOutputFile (const string &arg)
 
void SetOutputFile (const list< string > &arg)
 
const stringAsOutputFile (void) const
 
void SetProject (void)
 set this argument as a CGBProjectHandle More...
 
void SetProject (const CGBProjectHandle &arg)
 
void SetProject (const TValues &arg)
 
const CGBProjectHandleAsProject (void) const
 
void SetObject (const string &type)
 set this argument as a CObject. More...
 
void SetObject (const CTypeInfo *info=NULL)
 
void SetObject (const CObject &arg, const CGBProjectHandle *doc=NULL, const CDataHandle *dh=NULL)
 
void SetObject (const TValues &arg)
 
const CObjectAsObject (void) const
 
void SetList (void)
 insure that this argument can accept a list of its current type More...
 
void SetList (const TValues &values)
 
void AsList (TValues &values) const
 
- Public Member Functions inherited from CPluginArg_Base
 CPluginArg_Base (void)
 
virtual ~CPluginArg_Base (void)
 
 DECLARE_INTERNAL_TYPE_INFO ()
 
bool IsSetName (void) const
 Check if a value has been assigned to Name data member. More...
 
bool CanGetName (void) const
 Check if it is safe to call GetName method. More...
 
void ResetName (void)
 Reset Name data member. More...
 
const TNameGetName (void) const
 Get the Name member data. More...
 
void SetName (const TName &value)
 Assign a value to Name data member. More...
 
void SetName (TName &&value)
 
TNameSetName (void)
 Assign a value to Name data member. More...
 
bool IsSetDesc (void) const
 Check if a value has been assigned to Desc data member. More...
 
bool CanGetDesc (void) const
 Check if it is safe to call GetDesc method. More...
 
void ResetDesc (void)
 Reset Desc data member. More...
 
const TDescGetDesc (void) const
 Get the Desc member data. More...
 
void SetDesc (const TDesc &value)
 Assign a value to Desc data member. More...
 
void SetDesc (TDesc &&value)
 
TDescSetDesc (void)
 Assign a value to Desc data member. More...
 
bool IsSetLong_desc (void) const
 Check if a value has been assigned to Long_desc data member. More...
 
bool CanGetLong_desc (void) const
 Check if it is safe to call GetLong_desc method. More...
 
void ResetLong_desc (void)
 Reset Long_desc data member. More...
 
const TLong_descGetLong_desc (void) const
 Get the Long_desc member data. More...
 
void SetLong_desc (const TLong_desc &value)
 Assign a value to Long_desc data member. More...
 
void SetLong_desc (TLong_desc &&value)
 
TLong_descSetLong_desc (void)
 Assign a value to Long_desc data member. More...
 
bool IsSetOptional (void) const
 Check if a value has been assigned to Optional data member. More...
 
bool CanGetOptional (void) const
 Check if it is safe to call GetOptional method. More...
 
void ResetOptional (void)
 Reset Optional data member. More...
 
void SetDefaultOptional (void)
 Assign default value to Optional data member. More...
 
TOptional GetOptional (void) const
 Get the Optional member data. More...
 
void SetOptional (TOptional value)
 Assign a value to Optional data member. More...
 
TOptionalSetOptional (void)
 Assign a value to Optional data member. More...
 
bool IsSetDefault (void) const
 Check if a value has been assigned to Default data member. More...
 
bool CanGetDefault (void) const
 Check if it is safe to call GetDefault method. More...
 
void ResetDefault (void)
 Reset Default data member. More...
 
void SetDefaultDefault (void)
 Assign default value to Default data member. More...
 
TDefault GetDefault (void) const
 Get the Default member data. More...
 
void SetDefault (TDefault value)
 Assign a value to Default data member. More...
 
TDefaultSetDefault (void)
 Assign a value to Default data member. More...
 
bool IsSetHidden (void) const
 Check if a value has been assigned to Hidden data member. More...
 
bool CanGetHidden (void) const
 Check if it is safe to call GetHidden method. More...
 
void ResetHidden (void)
 Reset Hidden data member. More...
 
void SetDefaultHidden (void)
 Assign default value to Hidden data member. More...
 
THidden GetHidden (void) const
 Get the Hidden member data. More...
 
void SetHidden (THidden value)
 Assign a value to Hidden data member. More...
 
THiddenSetHidden (void)
 Assign a value to Hidden data member. More...
 
bool IsSetData (void) const
 Check if a value has been assigned to Data data member. More...
 
bool CanGetData (void) const
 Check if it is safe to call GetData method. More...
 
void ResetData (void)
 Reset Data data member. More...
 
const TDataGetData (void) const
 Get the Data member data. More...
 
void SetData (TData &value)
 Assign a value to Data data member. More...
 
TDataSetData (void)
 Assign a value to Data data member. More...
 
bool IsSetConstraint (void) const
 Check if a value has been assigned to Constraint data member. More...
 
bool CanGetConstraint (void) const
 Check if it is safe to call GetConstraint method. More...
 
void ResetConstraint (void)
 Reset Constraint data member. More...
 
const TConstraintGetConstraint (void) const
 Get the Constraint member data. More...
 
TConstraintSetConstraint (void)
 Assign a value to Constraint data member. More...
 
virtual void Reset (void)
 Reset the whole object. More...
 
- Public Member Functions inherited from CSerialObject
 CSerialObject (void)
 
virtual ~CSerialObject (void)
 
virtual const CTypeInfoGetThisTypeInfo (void) const =0
 
virtual void Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive)
 Set object to copy of another one. More...
 
virtual bool Equals (const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
 Check if both objects contain the same values. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
void ThrowUnassigned (TMemberIndex index) const
 
void ThrowUnassigned (TMemberIndex index, const char *file_name, int file_line) const
 
bool HasNamespaceName (void) const
 Check if object data type has namespace name. More...
 
const stringGetNamespaceName (void) const
 Get namespace name. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (void) const
 Get namespace prefix. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Private Types

typedef CPluginArg_Base Tparent
 

Private Member Functions

 CPluginArg (const CPluginArg &value)
 Prohibit copy constructor and assignment operator. More...
 
CPluginArgoperator= (const CPluginArg &value)
 

Additional Inherited Members

- Static Public Member Functions inherited from CSerialObject
static void SetVerifyDataThread (ESerialVerifyData verify)
 
static void SetVerifyDataGlobal (ESerialVerifyData verify)
 
static string UnassignedString (void)
 
static CStringUTF8 UnassignedStringUTF8 (void)
 
static char UnassignedByte (void)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CSerialObject
static const char * ms_UnassignedStr = "<*unassigned*>"
 
static const char ms_UnassignedByte = char(0xcd)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Detailed Description

Definition at line 57 of file PluginArg.hpp.

Member Typedef Documentation

◆ Tparent

Definition at line 59 of file PluginArg.hpp.

◆ TValues

typedefs for collections of argument types CPluginValue supports type-specific data retrieval of single entities and also wraps the necessary document

Definition at line 92 of file PluginArg.hpp.

Member Enumeration Documentation

◆ EType

enumerated list of types we support

Enumerator
eNotSet 
eBoolean 
eProject 
eDouble 
eInteger 
eObject 
eString 
eSecretString 
eInputFile 
eOutputFile 
eAnySerialObject 

special type: could be any CSerialObject-derived object

eMaxArg 

this must be last!

Definition at line 69 of file PluginArg.hpp.

Constructor & Destructor Documentation

◆ CPluginArg() [1/2]

CPluginArg::CPluginArg ( void  )
inline

constructor

Definition at line 191 of file PluginArg.hpp.

◆ ~CPluginArg()

CPluginArg::~CPluginArg ( void  )

destructor

Definition at line 67 of file PluginArg.cpp.

◆ CPluginArg() [2/2]

CPluginArg::CPluginArg ( const CPluginArg value)
private

Prohibit copy constructor and assignment operator.

Member Function Documentation

◆ AsBoolean()

bool CPluginArg::AsBoolean ( void  ) const

◆ AsDouble()

double CPluginArg::AsDouble ( void  ) const

◆ AsInputFile()

const string & CPluginArg::AsInputFile ( void  ) const

◆ AsInteger()

int CPluginArg::AsInteger ( void  ) const

◆ AsList()

void CPluginArg::AsList ( TValues values) const

Definition at line 588 of file PluginArg.cpp.

References CPluginArg_Base::GetData(), ITERATE, and NCBI_THROW.

◆ AsObject()

const CObject & CPluginArg::AsObject ( void  ) const

◆ AsOutputFile()

const string & CPluginArg::AsOutputFile ( void  ) const

◆ AsProject()

const CGBProjectHandle & CPluginArg::AsProject ( void  ) const

◆ AsSecretString()

const string & CPluginArg::AsSecretString ( void  ) const

◆ AsString()

const string & CPluginArg::AsString ( void  ) const

◆ ClearObjects()

void CPluginArg::ClearObjects ( )

clear any objects from object-based arguments

Definition at line 151 of file PluginArg.cpp.

References eObject, eProject, CPluginArg_Base::GetData(), GetObjectSubtype(), GetType(), CPluginArg_Base::ResetData(), SetList(), SetObject(), and SetProject().

◆ GetObject()

const CObject * CPluginArg::GetObject ( void  ) const

◆ GetObjectSubtype()

const string & CPluginArg::GetObjectSubtype ( void  ) const

accessor for the object-specific type info in the event the data type is list, the type info for the first item is returned, as we guarantee that all items in a list will be equivalently typed

Definition at line 128 of file PluginArg.cpp.

References CPluginArg_Base::C_Data::GetArray(), CPluginArg_Base::GetData(), CPluginValue::GetObjectSubtype(), and CPluginArg_Base::C_Data::GetSingle().

Referenced by ClearObjects().

◆ GetProject()

const CGBProjectHandle * CPluginArg::GetProject ( void  ) const

accessors for specific sub-components in the event that the data type is list, NULL is returned

Definition at line 109 of file PluginArg.cpp.

References CPluginArg_Base::C_Data::GetArray(), CPluginArg_Base::GetData(), CPluginValue::GetProject(), and CPluginArg_Base::C_Data::GetSingle().

◆ GetType()

CPluginArg::EType CPluginArg::GetType ( void  ) const

◆ IsEmpty()

bool CPluginArg::IsEmpty ( void  ) const

determine if this argument is empty (i.e., has all type information but no values)

Definition at line 138 of file PluginArg.cpp.

◆ operator=()

CPluginArg& CPluginArg::operator= ( const CPluginArg value)
private

◆ SetBoolean() [1/3]

void CPluginArg::SetBoolean ( bool  arg)

◆ SetBoolean() [2/3]

void CPluginArg::SetBoolean ( const list< bool > &  arg)

◆ SetBoolean() [3/3]

void CPluginArg::SetBoolean ( void  )

◆ SetDouble() [1/4]

void CPluginArg::SetDouble ( const list< double > &  arg)

◆ SetDouble() [2/4]

void CPluginArg::SetDouble ( const string arg)

◆ SetDouble() [3/4]

void CPluginArg::SetDouble ( double  arg)

◆ SetDouble() [4/4]

void CPluginArg::SetDouble ( void  )

◆ SetInputFile() [1/3]

void CPluginArg::SetInputFile ( const list< string > &  arg)

◆ SetInputFile() [2/3]

void CPluginArg::SetInputFile ( const string arg)

◆ SetInputFile() [3/3]

void CPluginArg::SetInputFile ( void  )

◆ SetInteger() [1/4]

void CPluginArg::SetInteger ( const list< int > &  arg)

◆ SetInteger() [2/4]

void CPluginArg::SetInteger ( const string arg)

◆ SetInteger() [3/4]

void CPluginArg::SetInteger ( int  arg)

◆ SetInteger() [4/4]

void CPluginArg::SetInteger ( void  )

◆ SetList() [1/2]

void CPluginArg::SetList ( const TValues values)

◆ SetList() [2/2]

void CPluginArg::SetList ( void  )

insure that this argument can accept a list of its current type

Definition at line 567 of file PluginArg.cpp.

References CPluginArg_Base::GetData(), CPluginArg_Base::C_Data::Reset(), CPluginArg_Base::C_Data::SetArray(), CPluginArg_Base::SetData(), and rapidjson::value.

Referenced by ClearObjects().

◆ SetObject() [1/4]

void CPluginArg::SetObject ( const CObject arg,
const CGBProjectHandle doc = NULL,
const CDataHandle *  dh = NULL 
)

◆ SetObject() [2/4]

void CPluginArg::SetObject ( const CTypeInfo info = NULL)

◆ SetObject() [3/4]

void CPluginArg::SetObject ( const string type)

set this argument as a CObject.

There are multiple forms of this; we provide for the passing in of a CTypeInfo object that provides additional information, specifically about CSerialObject-derived objects

Definition at line 521 of file PluginArg.cpp.

References CPluginArg_Base::C_Data::Reset(), CPluginArg_Base::SetData(), CPluginValue::SetObject(), and CPluginArg_Base::C_Data::SetSingle().

Referenced by ClearObjects().

◆ SetObject() [4/4]

void CPluginArg::SetObject ( const TValues arg)

◆ SetOutputFile() [1/3]

void CPluginArg::SetOutputFile ( const list< string > &  arg)

◆ SetOutputFile() [2/3]

void CPluginArg::SetOutputFile ( const string arg)

◆ SetOutputFile() [3/3]

void CPluginArg::SetOutputFile ( void  )

◆ SetProject() [1/3]

void CPluginArg::SetProject ( const CGBProjectHandle arg)

◆ SetProject() [2/3]

void CPluginArg::SetProject ( const TValues arg)

◆ SetProject() [3/3]

void CPluginArg::SetProject ( void  )

◆ SetSecretString() [1/3]

void CPluginArg::SetSecretString ( const list< string > &  arg)

◆ SetSecretString() [2/3]

void CPluginArg::SetSecretString ( const string arg)

◆ SetSecretString() [3/3]

void CPluginArg::SetSecretString ( void  )

◆ SetString() [1/3]

void CPluginArg::SetString ( const list< string > &  arg)

◆ SetString() [2/3]

void CPluginArg::SetString ( const string arg)

◆ SetString() [3/3]

void CPluginArg::SetString ( void  )

The documentation for this class was generated from the following files:
Modified on Tue Apr 16 20:12:15 2024 by modify_doxy.py rev. 669887