NCBI C++ ToolKit
macro_rep.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_OBJUTILS___MACRO_REP__HPP
2 #define GUI_OBJUTILS___MACRO_REP__HPP
3 
4 /* $Id: macro_rep.hpp 46450 2021-05-18 20:34:59Z asztalos $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Anatoly Osipov
30  *
31  * File Description: Macro representation
32  *
33  */
34 
35 /// @file macro_bin_rep.hpp
36 /// Macro representation
37 
38 #include <corelib/ncbistl.hpp>
39 #include <corelib/ncbistd.hpp>
40 
42 #include <util/range.hpp>
43 #include <gui/gui_export.h>
45 
46 /** @addtogroup GUI_MACRO_SCRIPTS_UTIL
47  *
48  * @{
49  */
50 
52 BEGIN_SCOPE(macro)
53 
54 /// Abstract interface for variable representation
55 ///
57 {
58 public:
59  /// Constructor & destructor
60  IMacroVar(const string& var_name) : m_VarName(var_name) {}
61  virtual ~IMacroVar() {};
62 
63  /// Fill in IQueryMacroUserObject-derived node
64  /// Return true if successful
65  bool GetNodeValue(IQueryMacroUserObject& v) const;
66  /// Get the name of stored variable
67  const string& GetName() const { return m_VarName; }
68  /// Returns true is the variable can be resolved via GUI
69  virtual bool IsGUIResolvable() const = 0;
70  /// Sets GUI resolved value
71  virtual bool SetGUIResolvedValue(const string& new_value) = 0;
72  /// Prints variable
73  virtual void Print(CNcbiOstream& os) const
74  {
75  os << m_VarName << " = <" << x_GetValue().AsString() << ">" << endl;
76  }
77  string GetGUIResolvedValue() {return x_GetValue().AsString();}
78 protected:
79  /// Name of variable
80  string m_VarName;
81 
82  /// Type of stored value (not the type of variable)
83  enum EValueType {
84  eValueTypeString = 0,
88  eValueTypeNotSet
89  };
90 
91  /// Variable value storage structure
92  struct SValue
93  {
94  SValue(const string& str);
95  SValue(Int8 val);
96  SValue(bool val);
97  SValue(double val);
98 
99  const string& AsString() const { return m_String; }
100  void Reset(void);
101 
102  void Set(const string& str);
103  void Set(Int8 val);
104  void Set(double val);
105  void Set(bool val);
106 
107  string m_String;
109  bool m_Bool;
110  double m_Double;
111 
113  private:
114  void x_WriteAsString(void)
115  {
116  switch (m_Type) {
117  case eValueTypeInt:
118  m_String = NStr::Int8ToString(m_Int);
119  break;
120  case eValueTypeFloat:
121  m_String = NStr::DoubleToString(m_Double);
122  break;
123  case eValueTypeBool:
124  m_String = (m_Bool) ? "true" : "false";
125  break;
126  case eValueTypeString:
127  default:
128  break;
129  }
130  }
131  };
132 private:
133  /// Gets the variable value from derived classes
134  virtual SValue x_GetValue() const = 0;
135 };
136 
137 /// derived classes for representation of specific variable types.
138 
139 /// Class for simple variable representation (i.e. name = "value")
140 ///
142 {
143 public:
144  // Constructors
145  CMacroVarSimple(const string& name, bool value) : IMacroVar(name), m_Value(value) {}
146  CMacroVarSimple(const string& name, Int8 value) : IMacroVar(name), m_Value(value) {}
147  CMacroVarSimple(const string& name, const string& value) : IMacroVar(name), m_Value(value) {}
148  CMacroVarSimple(const string& name, double value) : IMacroVar(name), m_Value(value) {}
149 
150  /// Destructor
151  virtual ~CMacroVarSimple() {}
152 
153  /// Returns true is the variable can be resolved via GUI
154  virtual bool IsGUIResolvable() const { return false; }
155  /// Sets GUI resolved value
156  virtual bool SetGUIResolvedValue(const string& new_value) { return false; }
157 
158 private:
159  /// Gets the variable value
160  virtual SValue x_GetValue() const { return m_Value; };
161 
162  /// Value of the variable
164 };
165 
166 /// Class for "ask" variable representation (i.e. name = %default value%)
167 ///
168 /// If the variable is resolved through the GUI, the class can hold the resolved value.
170 {
171 public:
172  /// Constructor
173  CMacroVarAsk(const string& name, const string& def_value);
174  /// Destructor
175  virtual ~CMacroVarAsk() {};
176 
177  // /// Sets the value of variable after interaction with user
178  // void SetValue(const string& Value);
179 
180  /// Returns true is the variable can be resolved via GUI
181  virtual bool IsGUIResolvable() const { return true; }
182  /// Sets GUI resolved value
183  virtual bool SetGUIResolvedValue(const string& new_value);
184  /// Get default value
185  const string& GetDefaultValue() const { return m_DefaultValue.AsString(); }
186  /// Prints variable
187  virtual void Print(CNcbiOstream& os) const;
188 
189 private:
190  /// Gets the variable value
191  virtual SValue x_GetValue() const { return m_NewValue; }
192 
193  void x_ParseString(const string& str, bool new_value = false);
194 
195  /// Default value of "ask" variable
197  /// User defined value of "ask" variable
199 };
200 
201 /// Class for "choice" variable representation (i.e. name = {"choice value 1", "choice value 2"})
202 ///
203 /// If the variable is resolved through the GUI, the class can hold the resolved value.
205 {
206 public:
207  /// Constructor
208  CMacroVarChoice(const string& name) : IMacroVar(name), m_Selection(0) {}
209  /// Destructor
210  virtual ~CMacroVarChoice() {};
211 
212  // Functions add "choice" variable values
213  void AddChoiceBool(bool value) { m_Choices.push_back(SValue(value)); }
214  void AddChoiceInt(Int8 value) { m_Choices.push_back(SValue(value)); }
215  void AddChoiceFloat(double value) { m_Choices.push_back(SValue(value)); }
216  void AddChoiceString(const string& value) { m_Choices.push_back(SValue(value)); }
217 
218  /// Returns true is the variable can be resolved via GUI
219  virtual bool IsGUIResolvable() const { return true; }
220  /// Sets GUI resolved value
221  virtual bool SetGUIResolvedValue(const string& new_value);
222  /// Get functions for stored choices
223  const string* GetFirstChoice();
224  const string* GetNextChoice();
225  /// Prints variable
226  virtual void Print(CNcbiOstream& os) const;
227 
228 private:
229  /// Returns the variable value
230  virtual SValue x_GetValue() const;
231 
232  /// Storage for "choice" variable values
233  vector<SValue> m_Choices;
234  /// User defined selection of choice value
235  size_t m_Selection;
236 
237 private:
238  /// Internal state for get choices functions
240 };
241 
242 
243 /// Class for parsed macro representation
244 ///
245 /// stores internal binary macro representation and
246 /// implements an interface for access to:
247 /// Macro name
248 /// Macro title (description) - optional
249 ///....Set of variables
250 ///....“foreach” selector - optional
251 ///....Which-clause tree
252 ///....Do-clause tree
254 {
255 public:
256  /// Typedef vector of variables
257  typedef list<IMacroVar*> TVariables;
258  /// Typedef vector of blocks of variables
259  typedef list<TVariables> TVarBlocks;
260 
261  /// Name for top level function
262  static const string m_TopFuncName;
263 public:
264  /// Constructor
265  CMacroRep(CQueryExec* exec=NULL);
266  /// Destructor
267  ~CMacroRep();
268 
269  /// Output class content to NcbiCout
270  void Print(CNcbiOstream& os) const;
271 
272  // Set of building functions to be called during parsing
273 
274  /// Set the name of the macro
275  void SetName(const string& name) { m_Name = name; }
276  /// Set the title of the macro
277  void SetTitle(const string& title) { m_Title = title; }
278 
279  void AddMetaKeywords(const string& keyWords)
280  {
281  if (m_KeyWords.empty())
282  m_KeyWords = keyWords;
283  else {
284  m_KeyWords += ",";
285  m_KeyWords += keyWords;
286  }
287  }
288 
289  const string& GetMetaKeywords() const { return m_KeyWords; }
290 
291  /// Set the new variable block
292  void SetNewVarBlock() { ++m_NumOfVarBlocks; }
293 
294  // Functions for setting variables' names and values
295  void SetVarInt(const string& name, Int8 value);
296  void SetVarFloat(const string& name, double value);
297  void SetVarBool(const string& name, bool value);
298  void SetVarString(const string& name, const string& value);
299 
300  void SetVarAsk(const string& name, const string& value);
301 
302  void SetVarChoiceName(const string& name);
303  void SetVarChoiceInt(Int8 value);
304  void SetVarChoiceFloat(double value);
305  void SetVarChoiceBool(bool value);
306  void SetVarChoiceString(const string& value);
307 
308  /// Set "for each" asn selector
309  void SetForEachItem(const string& name) { m_Foreach = name; };
310  /// Set named annotation
311  void SetNamedAnnot(const string& name) { m_NamedAnnot = name; }
312  /// Set the sequence range
313  void SetSeqRange(const TSeqRange& range) { m_SeqRange = range; }
314  /// Set number of threads
315  void SetThreadCount(const string& threads) { m_NrThreads = threads; }
316  /// Attach where tree after its constrution in qParser
317  void AttachWhereTree(CQueryParseTree* pWhereTree);
318 
319  /// Set function name
320  void SetFunction(const string& name, const CQueryParseNode::SSrcLoc &pos, CQueryParseTree::TNode *parentNode = 0);
321 
322  /// Set the function parameters
323  void SetFunctionParameterAsIdent(const string& name, const CQueryParseNode::SSrcLoc &pos);
324  void SetFunctionParameterAsInt(Int8 value, const CQueryParseNode::SSrcLoc &pos);
325  void SetFunctionParameterAsFloat(double value, const CQueryParseNode::SSrcLoc &pos);
326  void SetFunctionParameterAsBool(bool value, const CQueryParseNode::SSrcLoc &pos);
327  void SetFunctionParameterAsString(const string& value, const CQueryParseNode::SSrcLoc &pos);
328 
329  /// Set the function Where clause as a part of an assignment operator
330  void SetAssignmentWhereClause(const string& where_str, CQueryParseTree* where_tree, const CQueryParseNode::SSrcLoc &pos);
331 
332  /// Work with macro source text
333  void SetSource (const string& source_text) { m_SourceText = source_text; }
334  const string& GetSource() const { return m_SourceText; }
335 
336  // Access functions
337 
338  /// Look up the variable among the stored ones
339  bool FindVar(const string& name) const;
340  /// Return nullptr when the variable is not found
341  IMacroVar* GetVar(const string& name) const;
342 
343  /// Function fills in IQueryMacroUserObject-derived node out of stored variable
344  /// @param name
345  /// A constant string name of variable being searched for
346  /// @param name
347  /// A IQueryMacroUserObject-derived node to be filled in
348  /// @return
349  /// - true if node was filled in.
350  /// - false if variable was not found or problem occured.
351  bool GetNodeValue(const string& name, IQueryMacroUserObject& v) const;
352 
353  /// Return macro name
354  const string& GetName() const { return m_Name; }
355  /// Return macro description
356  const string& GetTitle() const {return m_Title; }
357 
358  /// Return "for each" string
359  const string& GetForEachString() const { return m_Foreach; }
360  /// Return "from" named annotation
361  const string& GetNamedAnnot() const { return m_NamedAnnot; }
362  /// Return sequence range
363  const TSeqRange& GetSeqRange() const { return m_SeqRange; }
364  /// Return "where" clause
365  CQueryParseTree* GetWhereClause() const { return m_WhereTree.get(); }
366  /// Return "do" clause
367  CQueryParseTree* GetDoTree() const { return m_DoTree.get(); }
368  /// Return number of threads
369  const string& GetThreadCount() const { return m_NrThreads; }
370 
371  /// Return functions for stored vars
372  IMacroVar* GetFirstVar(Int4& block_num);
373  IMacroVar* GetNextVar(Int4& block_num);
374 
375  /// Return true if identifier is in datasource (only works if m_Exec not NULL)
376  bool HasIdentifier(const string& ident) const;
377 
378  CQueryParseTree* GetAssignmentWhereClause(int index) const;
379  vector<CQueryParseTree*> GetAssignmentWhereClauses() const { return m_FuncWhereClauses; }
380 
381  /// Return true if there are any GUI variables
382  bool AreThereGUIResolvableVars() const { return m_GUIResolvable; };
383 
384  /// Get number of variable blocks
385  Int4 GetBlocksCount() const { return m_NumOfVarBlocks; }
386 private:
387  /// Print a tree with a given header and separator
388  void x_PrintTree(CNcbiOstream& os,
390  const string& title,
391  const string& separator) const;
392 
393  /// Locate the variable if it was stored.
394  IMacroVar* x_FindVar(const string& name) const;
395 
396  /// Helper function. It finds or creates a block for new variable
397  TVariables& x_GetOrCreateLastBlock();
398 
399  /// Execution objection associated with this macro (may be NULL)
400  CQueryExec* m_Exec{ nullptr };
401 
402  string m_Name; ///< Macro name
403  string m_Title; ///< Macro title
404 
405  string m_KeyWords; ///< Meta keywords for search
406 
407  TVarBlocks m_VarBlocks; ///< Variables
408  string m_Foreach; ///< For each string
409  string m_NamedAnnot; ///< Named annotation
410  TSeqRange m_SeqRange; ///< Sequence range
411  unique_ptr<CQueryParseTree> m_WhereTree; ///< Parsed Where-clause
412  unique_ptr<CQueryParseTree> m_DoTree; ///< Parsed function calls
413  string m_NrThreads{ "1" }; ///< Number of execution threads
414 
415  /// Vector of parsed function Where clauses.
416  /// They are stored here with indexes to them from eWhere nodes from the tree.
417  /// Due to limitation of CQueryParseTree::TNode, they can't be inserted easily in the tree itself.
418  vector<CQueryParseTree*> m_FuncWhereClauses;
419 
420  string m_SourceText; ///< Macro source text
421 
422  // Internal states
423  Int4 m_NumOfVarBlocks; ///< Number of blocks of variables
424  CQueryParseTree::TNode* m_ActiveNode; ///< Active tree node in where clause
425  bool m_GUIResolvable; ///< True if there is at least one GUI resolvable var
426 
427  // Iterators for get vars functions
428  TVariables::iterator m_VarIter;
429  TVarBlocks::iterator m_BlockIter;
431 
432  /// Prohibit copy constructor and assignment operator
435 };
436 
437 
438 END_SCOPE(macro)
440 
441 /* @} */
442 
443 #endif // GUI_OBJUTILS___MACRO_REP__HPP
Class for parsed macro representation.
Definition: macro_rep.hpp:254
Class for "ask" variable representation (i.e.
Definition: macro_rep.hpp:170
Class for "choice" variable representation (i.e.
Definition: macro_rep.hpp:205
derived classes for representation of specific variable types.
Definition: macro_rep.hpp:142
CObject –.
Definition: ncbiobj.hpp:180
Query execution environment holds the function registry and the execution context.
Definition: query_exec.hpp:144
Query tree and associated utility methods.
definition of a Culling tree
Definition: ncbi_tree.hpp:100
Abstract interface for variable representation.
Definition: macro_rep.hpp:57
class IQueryMacroUserObject
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char * str(char *buf, int n)
Definition: stats.c:84
#define NULL
Definition: ncbistd.hpp:225
CMacroVarSimple(const string &name, const string &value)
Definition: macro_rep.hpp:147
virtual bool IsGUIResolvable() const
Returns true is the variable can be resolved via GUI.
Definition: macro_rep.hpp:181
string m_VarName
Name of variable.
Definition: macro_rep.hpp:80
void AddChoiceFloat(double value)
Definition: macro_rep.hpp:215
void SetName(const string &name)
Set the name of the macro.
Definition: macro_rep.hpp:275
virtual ~CMacroVarSimple()
Destructor.
Definition: macro_rep.hpp:151
virtual bool IsGUIResolvable() const
Returns true is the variable can be resolved via GUI.
Definition: macro_rep.hpp:219
void x_WriteAsString(void)
Definition: macro_rep.hpp:114
const string & GetName() const
Get the name of stored variable.
Definition: macro_rep.hpp:67
void SetForEachItem(const string &name)
Set "for each" asn selector.
Definition: macro_rep.hpp:309
CMacroVarSimple(const string &name, Int8 value)
Definition: macro_rep.hpp:146
CMacroVarChoice(const string &name)
Constructor.
Definition: macro_rep.hpp:208
const string & GetForEachString() const
Return "for each" string.
Definition: macro_rep.hpp:359
TVarBlocks m_VarBlocks
Variables.
Definition: macro_rep.hpp:407
vector< SValue > m_Choices
Storage for "choice" variable values.
Definition: macro_rep.hpp:233
virtual ~CMacroVarAsk()
Destructor.
Definition: macro_rep.hpp:175
string m_Name
Macro name.
Definition: macro_rep.hpp:402
string m_Title
Macro title.
Definition: macro_rep.hpp:403
void SetNamedAnnot(const string &name)
Set named annotation.
Definition: macro_rep.hpp:311
virtual bool IsGUIResolvable() const =0
Returns true is the variable can be resolved via GUI.
static const string m_TopFuncName
Name for top level function.
Definition: macro_rep.hpp:262
Int4 m_NumOfVarBlocks
Number of blocks of variables.
Definition: macro_rep.hpp:423
EValueType m_Type
Definition: macro_rep.hpp:112
virtual SValue x_GetValue() const =0
Gets the variable value from derived classes.
const string & GetDefaultValue() const
Get default value.
Definition: macro_rep.hpp:185
CMacroVarSimple(const string &name, double value)
Definition: macro_rep.hpp:148
vector< CQueryParseTree * > GetAssignmentWhereClauses() const
Definition: macro_rep.hpp:379
string m_Foreach
For each string.
Definition: macro_rep.hpp:408
bool GetNodeValue(IQueryMacroUserObject &v) const
Fill in IQueryMacroUserObject-derived node Return true if successful.
Definition: macro_rep.cpp:52
virtual bool IsGUIResolvable() const
Returns true is the variable can be resolved via GUI.
Definition: macro_rep.hpp:154
size_t m_ReturnedChoice
Internal state for get choices functions.
Definition: macro_rep.hpp:239
Int4 m_BlockNumber
Definition: macro_rep.hpp:430
const TSeqRange & GetSeqRange() const
Return sequence range.
Definition: macro_rep.hpp:363
unique_ptr< CQueryParseTree > m_DoTree
Parsed function calls.
Definition: macro_rep.hpp:412
SValue m_DefaultValue
Default value of "ask" variable.
Definition: macro_rep.hpp:196
virtual void Print(CNcbiOstream &os) const
Prints variable.
Definition: macro_rep.hpp:73
virtual ~IMacroVar()
Definition: macro_rep.hpp:61
const string & GetNamedAnnot() const
Return "from" named annotation.
Definition: macro_rep.hpp:361
void SetNewVarBlock()
Set the new variable block.
Definition: macro_rep.hpp:292
TVarBlocks::iterator m_BlockIter
Definition: macro_rep.hpp:429
string m_NamedAnnot
Named annotation.
Definition: macro_rep.hpp:409
vector< CQueryParseTree * > m_FuncWhereClauses
Vector of parsed function Where clauses.
Definition: macro_rep.hpp:418
SValue m_NewValue
User defined value of "ask" variable.
Definition: macro_rep.hpp:198
const string & GetName() const
Return macro name.
Definition: macro_rep.hpp:354
list< TVariables > TVarBlocks
Typedef vector of blocks of variables.
Definition: macro_rep.hpp:259
virtual ~CMacroVarChoice()
Destructor.
Definition: macro_rep.hpp:210
const string & GetMetaKeywords() const
Definition: macro_rep.hpp:289
size_t m_Selection
User defined selection of choice value.
Definition: macro_rep.hpp:235
void AddMetaKeywords(const string &keyWords)
Definition: macro_rep.hpp:279
void SetTitle(const string &title)
Set the title of the macro.
Definition: macro_rep.hpp:277
virtual bool SetGUIResolvedValue(const string &new_value)
Sets GUI resolved value.
Definition: macro_rep.hpp:156
TVariables::iterator m_VarIter
Definition: macro_rep.hpp:428
const string & GetTitle() const
Return macro description.
Definition: macro_rep.hpp:356
bool AreThereGUIResolvableVars() const
Return true if there are any GUI variables.
Definition: macro_rep.hpp:382
string m_KeyWords
Meta keywords for search.
Definition: macro_rep.hpp:405
CMacroVarSimple(const string &name, bool value)
Definition: macro_rep.hpp:145
Int4 GetBlocksCount() const
Get number of variable blocks.
Definition: macro_rep.hpp:385
CMacroRep(const CMacroRep &)
Prohibit copy constructor and assignment operator.
void SetSeqRange(const TSeqRange &range)
Set the sequence range.
Definition: macro_rep.hpp:313
virtual SValue x_GetValue() const
Gets the variable value.
Definition: macro_rep.hpp:160
unique_ptr< CQueryParseTree > m_WhereTree
Parsed Where-clause.
Definition: macro_rep.hpp:411
EValueType
Type of stored value (not the type of variable)
Definition: macro_rep.hpp:83
CQueryParseTree * GetDoTree() const
Return "do" clause.
Definition: macro_rep.hpp:367
void AddChoiceString(const string &value)
Definition: macro_rep.hpp:216
virtual SValue x_GetValue() const
Gets the variable value.
Definition: macro_rep.hpp:191
void AddChoiceBool(bool value)
Definition: macro_rep.hpp:213
IMacroVar(const string &var_name)
Constructor & destructor.
Definition: macro_rep.hpp:60
const string & AsString() const
Definition: macro_rep.hpp:99
SValue m_Value
Value of the variable.
Definition: macro_rep.hpp:160
CMacroRep & operator=(const CMacroRep &)
CQueryParseTree::TNode * m_ActiveNode
Active tree node in where clause.
Definition: macro_rep.hpp:424
CQueryParseTree * GetWhereClause() const
Return "where" clause.
Definition: macro_rep.hpp:365
void SetThreadCount(const string &threads)
Set number of threads.
Definition: macro_rep.hpp:315
void SetSource(const string &source_text)
Work with macro source text.
Definition: macro_rep.hpp:333
void AddChoiceInt(Int8 value)
Definition: macro_rep.hpp:214
string m_SourceText
Macro source text.
Definition: macro_rep.hpp:420
TSeqRange m_SeqRange
Sequence range.
Definition: macro_rep.hpp:410
virtual bool SetGUIResolvedValue(const string &new_value)=0
Sets GUI resolved value.
const string & GetSource() const
Definition: macro_rep.hpp:334
bool m_GUIResolvable
True if there is at least one GUI resolvable var.
Definition: macro_rep.hpp:425
string GetGUIResolvedValue()
Definition: macro_rep.hpp:77
const string & GetThreadCount() const
Return number of threads.
Definition: macro_rep.hpp:369
list< IMacroVar * > TVariables
Typedef vector of variables.
Definition: macro_rep.hpp:257
@ eValueTypeBool
Definition: macro_rep.hpp:87
@ eValueTypeFloat
Definition: macro_rep.hpp:86
@ eValueTypeInt
Definition: macro_rep.hpp:85
int32_t Int4
4-byte (32-bit) signed integer
Definition: ncbitype.h:102
int64_t Int8
8-byte (64-bit) signed integer
Definition: ncbitype.h:104
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
static string Int8ToString(Int8 value, TNumToStringFlags flags=0, int base=10)
Convert Int8 to string.
Definition: ncbistr.hpp:5159
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
Definition: ncbistr.hpp:5187
#define NCBI_GUIOBJUTILS_EXPORT
Definition: gui_export.h:512
Defines to provide correct exporting from DLLs in Windows.
static void x_PrintTree(const TPhyTreeNode *tree, int level, vector< SAlignEntry > &aligns)
Definition: hyperclust.cpp:397
range(_Ty, _Ty) -> range< _Ty >
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
static const char * x_GetValue(const char *svc, size_t svclen, const char *param, char *value, size_t value_size, const char *def_value, int *generic, FStrNCmp strncompar)
The NCBI C++/STL use hints.
Query parser execution implementations.
Source location (points to the position in the original src) All positions are 0 based.
Variable value storage structure.
Definition: macro_rep.hpp:93
Modified on Tue May 21 10:56:08 2024 by modify_doxy.py rev. 669887