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

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

Search Toolkit Book for CPluginValue

#include <gui/objects/PluginValue.hpp>

+ Inheritance diagram for CPluginValue:
+ Collaboration diagram for CPluginValue:

Public Member Functions

 CPluginValue (void)
 default constructor More...
 
 CPluginValue (int i)
 conversion constructors More...
 
 CPluginValue (double d)
 
 CPluginValue (bool b)
 
 CPluginValue (const string &str)
 
 CPluginValue (const CGBProjectHandle &doc)
 
 CPluginValue (const CObject &obj, const CGBProjectHandle *doc=NULL, const CDataHandle *dh=NULL)
 
 CPluginValue (const CTypeInfo *info)
 
 ~CPluginValue (void)
 destructor More...
 
void Print (CNcbiOstream &ostr) const
 Print a copy of the value stored to the output stream. More...
 
bool IsEmpty (void) const
 determine if this argument has an empty value More...
 
const CGBProjectHandleGetProject (void) const
 Special accessor for the implied or actual document. More...
 
const CObjectGetObject (void) const
 Special accessor for the stored object. More...
 
const stringGetObjectSubtype (void) const
 Special accessor for any named object subtype. More...
 
bool AsBoolean (void) const
 
int AsInteger (void) const
 
double AsDouble (void) const
 
const stringAsString (void) const
 
const stringAsSecretString (void) const
 
const stringAsInputFile (void) const
 
const stringAsOutputFile (void) const
 
const CGBProjectHandleAsProject (void) const
 
const CObjectAsObject (void) const
 
const stringSetInteger ()
 type-specific setters More...
 
void SetInteger (const string &str)
 
void SetInteger (int val)
 
const stringSetDouble ()
 
void SetDouble (const string &str)
 
void SetDouble (double val)
 
const stringSetBoolean ()
 
void SetBoolean (const string &str)
 
void SetBoolean (bool val)
 
void SetProject (void)
 setters for object arguments More...
 
void SetProject (const CGBProjectHandle &doc)
 
void SetObject (const CObject &obj, const CGBProjectHandle *doc=NULL, const CDataHandle *dh=NULL)
 
void SetObject (const CTypeInfo *info=NULL)
 
void SetObject (const string &subtype)
 
- Public Member Functions inherited from CPluginValue_Base
 CPluginValue_Base (void)
 
virtual ~CPluginValue_Base (void)
 
 DECLARE_INTERNAL_TYPE_INFO ()
 
virtual void Reset (void)
 Reset the whole object. More...
 
virtual void ResetSelection (void)
 Reset the selection (set it to e_not_set). More...
 
E_Choice Which (void) const
 Which variant is currently selected. More...
 
void CheckSelected (E_Choice index) const
 Verify selection, throw exception if it differs from the expected. More...
 
void ThrowInvalidSelection (E_Choice index) const
 Throw 'InvalidSelection' exception. More...
 
void Select (E_Choice index, EResetVariant reset=eDoResetVariant)
 Select the requested variant if needed. More...
 
void Select (E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
 Select the requested variant if needed, allocating CObject variants from memory pool. More...
 
bool IsInteger (void) const
 Check if variant Integer is selected. More...
 
const TIntegerGetInteger (void) const
 Get the variant data. More...
 
TIntegerSetInteger (void)
 Select the variant. More...
 
void SetInteger (const TInteger &value)
 Select the variant and set its data. More...
 
bool IsDouble (void) const
 Check if variant Double is selected. More...
 
const TDoubleGetDouble (void) const
 Get the variant data. More...
 
TDoubleSetDouble (void)
 Select the variant. More...
 
void SetDouble (const TDouble &value)
 Select the variant and set its data. More...
 
bool IsString (void) const
 Check if variant String is selected. More...
 
const TStringGetString (void) const
 Get the variant data. More...
 
TStringSetString (void)
 Select the variant. More...
 
void SetString (const TString &value)
 Select the variant and set its data. More...
 
bool IsSecret_string (void) const
 Check if variant Secret_string is selected. More...
 
const TSecret_stringGetSecret_string (void) const
 Get the variant data. More...
 
TSecret_stringSetSecret_string (void)
 Select the variant. More...
 
void SetSecret_string (const TSecret_string &value)
 Select the variant and set its data. More...
 
bool IsInput_file (void) const
 Check if variant Input_file is selected. More...
 
const TInput_fileGetInput_file (void) const
 Get the variant data. More...
 
TInput_fileSetInput_file (void)
 Select the variant. More...
 
void SetInput_file (const TInput_file &value)
 Select the variant and set its data. More...
 
bool IsOutput_file (void) const
 Check if variant Output_file is selected. More...
 
const TOutput_fileGetOutput_file (void) const
 Get the variant data. More...
 
TOutput_fileSetOutput_file (void)
 Select the variant. More...
 
void SetOutput_file (const TOutput_file &value)
 Select the variant and set its data. More...
 
bool IsBoolean (void) const
 Check if variant Boolean is selected. More...
 
const TBooleanGetBoolean (void) const
 Get the variant data. More...
 
TBooleanSetBoolean (void)
 Select the variant. More...
 
void SetBoolean (const TBoolean &value)
 Select the variant and set its data. More...
 
bool IsProject (void) const
 Check if variant Project is selected. More...
 
const TProjectGetProject (void) const
 Get the variant data. More...
 
TProjectSetProject (void)
 Select the variant. More...
 
void SetProject (TProject &value)
 Select the variant and set its data. More...
 
bool IsDataHandle (void) const
 Check if variant DataHandle is selected. More...
 
const TDataHandleGetDataHandle (void) const
 Get the variant data. More...
 
TDataHandleSetDataHandle (void)
 Select the variant. More...
 
void SetDataHandle (TDataHandle &value)
 Select the variant and set its data. More...
 
bool IsObject (void) const
 Check if variant Object is selected. More...
 
const TObjectGetObject (void) const
 Get the variant data. More...
 
TObjectSetObject (void)
 Select the variant. More...
 
void SetObject (TObject &value)
 Select the variant and set its data. 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 CPluginValue_Base Tparent
 

Private Member Functions

 CPluginValue (const CPluginValue &value)
 Prohibit copy constructor and assignment operator. More...
 
CPluginValueoperator= (const CPluginValue &value)
 

Additional Inherited Members

- Public Types inherited from CPluginValue_Base
enum  E_Choice {
  e_not_set = 0 , e_Integer , e_Double , e_String ,
  e_Secret_string , e_Input_file , e_Output_file , e_Boolean ,
  e_Project , e_DataHandle , e_Object
}
 Choice variants. More...
 
enum  E_ChoiceStopper { e_MaxChoice = 11 }
 Maximum+1 value of the choice variant enumerator. More...
 
typedef string TInteger
 
typedef string TDouble
 
typedef string TString
 
typedef string TSecret_string
 
typedef string TInput_file
 
typedef string TOutput_file
 
typedef string TBoolean
 
typedef CPluginObject TProject
 
typedef CPluginObject TDataHandle
 
typedef CPluginObject TObject
 
- 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...
 
- Static Public Member Functions inherited from CPluginValue_Base
static string SelectionName (E_Choice index)
 Retrieve selection name (for diagnostic purposes). More...
 
- 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 PluginValue.hpp.

Member Typedef Documentation

◆ Tparent

Definition at line 60 of file PluginValue.hpp.

Constructor & Destructor Documentation

◆ CPluginValue() [1/9]

CPluginValue::CPluginValue ( void  )

default constructor

Definition at line 57 of file PluginValue.cpp.

◆ CPluginValue() [2/9]

CPluginValue::CPluginValue ( int  i)

conversion constructors

Definition at line 62 of file PluginValue.cpp.

References SetInteger(), and val.

◆ CPluginValue() [3/9]

CPluginValue::CPluginValue ( double  d)

Definition at line 68 of file PluginValue.cpp.

References SetDouble(), and val.

◆ CPluginValue() [4/9]

CPluginValue::CPluginValue ( bool  b)

Definition at line 74 of file PluginValue.cpp.

References SetBoolean(), and val.

◆ CPluginValue() [5/9]

CPluginValue::CPluginValue ( const string str)

Definition at line 80 of file PluginValue.cpp.

References CPluginValue_Base::SetString(), and str().

◆ CPluginValue() [6/9]

CPluginValue::CPluginValue ( const CGBProjectHandle doc)

Definition at line 86 of file PluginValue.cpp.

References SetProject().

◆ CPluginValue() [7/9]

CPluginValue::CPluginValue ( const CObject obj,
const CGBProjectHandle doc = NULL,
const CDataHandle *  dh = NULL 
)

Definition at line 92 of file PluginValue.cpp.

References CPluginValue_Base::SetObject().

◆ CPluginValue() [8/9]

CPluginValue::CPluginValue ( const CTypeInfo info)

Definition at line 100 of file PluginValue.cpp.

References info, and CPluginValue_Base::SetObject().

◆ ~CPluginValue()

CPluginValue::~CPluginValue ( void  )

destructor

Definition at line 107 of file PluginValue.cpp.

◆ CPluginValue() [9/9]

CPluginValue::CPluginValue ( const CPluginValue value)
private

Prohibit copy constructor and assignment operator.

Member Function Documentation

◆ AsBoolean()

bool CPluginValue::AsBoolean ( void  ) const

◆ AsDouble()

double CPluginValue::AsDouble ( void  ) const

◆ AsInputFile()

const string & CPluginValue::AsInputFile ( void  ) const

◆ AsInteger()

int CPluginValue::AsInteger ( void  ) const

◆ AsObject()

const CObject & CPluginValue::AsObject ( void  ) const

Definition at line 403 of file PluginValue.cpp.

References GetObject(), CPluginValue_Base::IsObject(), and NCBI_THROW.

Referenced by CPluginArg::AsObject().

◆ AsOutputFile()

const string & CPluginValue::AsOutputFile ( void  ) const

◆ AsProject()

const CGBProjectHandle & CPluginValue::AsProject ( void  ) const

Definition at line 389 of file PluginValue.cpp.

References GetProject(), CPluginValue_Base::IsProject(), and NCBI_THROW.

Referenced by CPluginArg::AsProject().

◆ AsSecretString()

const string & CPluginValue::AsSecretString ( void  ) const

◆ AsString()

const string & CPluginValue::AsString ( void  ) const

◆ GetObject()

const CObject * CPluginValue::GetObject ( void  ) const
inline

◆ GetObjectSubtype()

const string & CPluginValue::GetObjectSubtype ( void  ) const

◆ GetProject()

const CGBProjectHandle * CPluginValue::GetProject ( void  ) const
inline

◆ IsEmpty()

bool CPluginValue::IsEmpty ( void  ) const

◆ operator=()

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

◆ Print()

void CPluginValue::Print ( CNcbiOstream ostr) const

◆ SetBoolean() [1/3]

const string & CPluginValue::SetBoolean ( void  )

Definition at line 184 of file PluginValue.cpp.

References CPluginValue_Base::SetBoolean().

Referenced by CPluginValue(), and CPluginArg::SetBoolean().

◆ SetBoolean() [2/3]

void CPluginValue::SetBoolean ( bool  val)

Definition at line 196 of file PluginValue.cpp.

References NStr::BoolToString(), CPluginValue_Base::SetBoolean(), and val.

◆ SetBoolean() [3/3]

void CPluginValue::SetBoolean ( const string str)

Definition at line 190 of file PluginValue.cpp.

References CPluginValue_Base::SetBoolean(), and val.

◆ SetDouble() [1/3]

const string & CPluginValue::SetDouble ( void  )

Definition at line 166 of file PluginValue.cpp.

References CPluginValue_Base::SetDouble().

Referenced by CPluginValue(), and CPluginArg::SetDouble().

◆ SetDouble() [2/3]

void CPluginValue::SetDouble ( const string str)

Definition at line 172 of file PluginValue.cpp.

References CPluginValue_Base::SetDouble(), and val.

◆ SetDouble() [3/3]

void CPluginValue::SetDouble ( double  val)

Definition at line 178 of file PluginValue.cpp.

References NStr::DoubleToString(), CPluginValue_Base::SetDouble(), and val.

◆ SetInteger() [1/3]

const string & CPluginValue::SetInteger ( void  )

type-specific setters

Definition at line 148 of file PluginValue.cpp.

References CPluginValue_Base::SetInteger().

Referenced by CPluginValue(), and CPluginArg::SetInteger().

◆ SetInteger() [2/3]

void CPluginValue::SetInteger ( const string str)

Definition at line 154 of file PluginValue.cpp.

References CPluginValue_Base::SetInteger(), and val.

◆ SetInteger() [3/3]

void CPluginValue::SetInteger ( int  val)

Definition at line 160 of file PluginValue.cpp.

References NStr::IntToString(), CPluginValue_Base::SetInteger(), and val.

◆ SetObject() [1/3]

void CPluginValue::SetObject ( const CObject obj,
const CGBProjectHandle doc = NULL,
const CDataHandle *  dh = NULL 
)

◆ SetObject() [2/3]

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

Definition at line 222 of file PluginValue.cpp.

References info, CPluginObject::SetObject(), and CPluginValue_Base::SetObject().

◆ SetObject() [3/3]

void CPluginValue::SetObject ( const string subtype)

Definition at line 215 of file PluginValue.cpp.

References CPluginObject::SetObject(), and CPluginValue_Base::SetObject().

◆ SetProject() [1/2]

void CPluginValue::SetProject ( const CGBProjectHandle doc)

◆ SetProject() [2/2]

void CPluginValue::SetProject ( void  )

setters for object arguments

Definition at line 236 of file PluginValue.cpp.

References NULL, CPluginObject::SetProject(), and CPluginValue_Base::SetProject().

Referenced by CPluginValue(), and CPluginArg::SetProject().


The documentation for this class was generated from the following files:
Modified on Sat May 25 14:21:58 2024 by modify_doxy.py rev. 669887