41 #ifndef GUI_OBJECTS_PLUGINVALUE_BASE_HPP
42 #define GUI_OBJECTS_PLUGINVALUE_BASE_HPP
55 #ifndef BEGIN_objects_SCOPE
56 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
57 # define END_objects_SCOPE END_SCOPE(objects)
115 virtual void Reset(
void);
118 virtual void ResetSelection(
void);
124 E_Choice Which(
void)
const;
130 void CheckSelected(E_Choice index)
const;
136 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
144 static string SelectionName(E_Choice index);
183 bool IsInteger(
void)
const;
210 bool IsDouble(
void)
const;
216 const TDouble& GetDouble(
void)
const;
237 bool IsString(
void)
const;
243 const TString& GetString(
void)
const;
264 bool IsSecret_string(
void)
const;
291 bool IsInput_file(
void)
const;
318 bool IsOutput_file(
void)
const;
345 bool IsBoolean(
void)
const;
351 const TBoolean& GetBoolean(
void)
const;
372 bool IsProject(
void)
const;
398 bool IsDataHandle(
void)
const;
424 bool IsObject(
void)
const;
430 const TObject& GetObject(
void)
const;
453 static const char*
const sm_SelectionNames[];
456 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
namespace ncbi::objects::
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIOBJECTS_EXPORT
DECLARE_INTERNAL_TYPE_INFO()
bool IsBoolean(void) const
Check if variant Boolean is selected.
bool IsDouble(void) const
Check if variant Double is selected.
TOutput_file & SetOutput_file(void)
Select the variant.
NCBI_NS_NCBI::CSerialObject * m_object
const TInteger & GetInteger(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool IsSecret_string(void) const
Check if variant Secret_string is selected.
bool IsInput_file(void) const
Check if variant Input_file is selected.
const TDouble & GetDouble(void) const
Get the variant data.
bool IsObject(void) const
Check if variant Object is selected.
E_Choice Which(void) const
Which variant is currently selected.
const TString & GetString(void) const
Get the variant data.
const TSecret_string & GetSecret_string(void) const
Get the variant data.
TSecret_string & SetSecret_string(void)
Select the variant.
bool IsProject(void) const
Check if variant Project is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
bool IsString(void) const
Check if variant String is selected.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
TBoolean & SetBoolean(void)
Select the variant.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
CPluginValue_Base(const CPluginValue_Base &)
TString & SetString(void)
Select the variant.
const TInput_file & GetInput_file(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
CPluginValue_Base & operator=(const CPluginValue_Base &)
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
TInput_file & SetInput_file(void)
Select the variant.
TDouble & SetDouble(void)
Select the variant.
const TBoolean & GetBoolean(void) const
Get the variant data.
const TOutput_file & GetOutput_file(void) const
Get the variant data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsOutput_file(void) const
Check if variant Output_file is selected.
TInteger & SetInteger(void)
Select the variant.
bool IsDataHandle(void) const
Check if variant DataHandle is selected.
bool IsInteger(void) const
Check if variant Integer is selected.
CPluginObject TDataHandle
@ e_not_set
No variant selected.
Defines to provide correct exporting from DLLs in Windows.
CProject * GetProject(wxTreeCtrl &treeCtrl, const CItem &item)
const GenericPointer< typename T::ValueType > T2 value
static bool SetInteger(wxSpinCtrl *spinctrl, int value)
static bool GetInteger(wxSpinCtrl *spinctrl, int *value)