A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/author__names__container_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/edit/author_names_container.cpp Source File

44 #include <wx/scrolwin.h> 45 #include <wx/filedlg.h> 60  if

(wnd ==

NULL

)

return

;

62

wxSizerItemList& itemList = m_Sizer->GetChildren();

63

wxSizerItem* auth = x_FindSingleAuthor(wnd, itemList);

65

wxSizerItemList::iterator node = itemList.begin();

66

wxSizerItemList::iterator last_node = itemList.end();

68  if

((**last_node).GetWindow() == wnd)

70  while

(node != last_node)

72  if

((**node).GetWindow() == wnd)

74

(**node).DeleteWindows();

76

node = itemList.erase(node);

89

wxSizerItemList& itemList =

m_Sizer

->GetChildren();

90

wxSizerItemList::iterator node = itemList.begin();

91

wxSizerItemList::iterator last_node = itemList.end();

93  if

((*last_node) == link)

95  while

(node != last_node)

99

(**node).DeleteWindows();

101

node = itemList.erase(node);

106  if

(itemList.empty()) {

138

vector<string> row_values;

140  if

(row_values.size() == 2) {

142

author->

SetName

().SetName().SetFirst(row_values[0]);

143

author->

SetName

().SetName().SetLast(row_values[1]);

144

author_list.

SetNames

().SetStd().push_back(author);

146  else if

(row_values.size() == 3) {

150

std_name.

SetLast

(row_values[2]);

151  const string

middle_init = row_values[1];

153  string

initials = macro::CMacroFunction_AuthorFix::s_GetFirstNameInitials(std_name.

GetFirst

());

155

initials.append(middle_init);

159

initials.append(

"."

);

162

author_list.

SetNames

().SetStd().push_back(author);

168

wxFileDialog

file

(

this

,

wxT

(

"Import author names from file"

),

m_WorkDir

, wxEmptyString,

170

wxFD_OPEN | wxFD_FILE_MUST_EXIST);

171  if

(

file

.ShowModal() == wxID_OK)

173

wxString path =

file

.GetPath();

178  bool

list_of_names =

true

;

181

list_of_names =

false

;

188  if

(line_reader.

Empty

()) {

192  while

(!line_reader->

AtEOF

()) {

202

vector<string> author_names;

204  if

(!author_names.empty()) {

205  for

(

auto

&& it : author_names) {

217  if

(!new_auth_list->

SetNames

().SetStd().empty()) {

static void s_GetAuthorNames(const string &line, CAuth_list &author_list)

@Auth_list.hpp User-defined methods of the data storage class.

void x_DeleteAuthor(wxSizerItem *link)

virtual void x_MoveRowUp(int row_num)=0

wxScrolledWindow * m_ScrolledWindow

virtual int x_FindRow(wxWindow *wnd, wxSizerItemList &itemList)=0

wxFlexGridSizer * m_Sizer

virtual void SetAuthors(const objects::CAuth_list &auth_list)=0

virtual void x_AddRowToWindow(wxWindow *row)=0

void ShiftAuthorUp(wxWindow *link)

void ImportAuthorsFromFile()

void ShiftAuthorDown(wxWindow *link)

static wxString GetDialogFilter(EFileType fileType)

@Name_std.hpp User-defined methods of the data storage class.

static const char * str(char *buf, int n)

EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)

#define MSerial_AsnText

I/O stream manipulators –.

CTempString GetCurrentLine(void) const

static CRef< ILineReader > New(const string &filename)

Return a new ILineReader object corresponding to the given filename, taking "-" (but not "....

virtual bool AtEOF(void) const =0

Indicates (negatively) whether there is any more input.

TObjectType & GetObject(void)

Get object.

bool Empty(void) const THROWS_NONE

Check if CRef is empty – not pointing to any object, which means having a null value.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ifstream CNcbiIfstream

Portable alias for ifstream.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)

Find the pattern in the specified range of a string using a case insensitive search.

static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)

Check if a string ends with a specified suffix value.

static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)

Check if a string is blank (has no text).

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

@ fSplit_Tokenize

All delimiters are merged and trimmed, to get non-empty tokens only.

void SetName(TName &value)

Assign a value to Name data member.

void SetNames(TNames &value)

Assign a value to Names data member.

void SetInitials(const TInitials &value)

Assign a value to Initials data member.

void SetLast(const TLast &value)

Assign a value to Last data member.

void SetFirst(const TFirst &value)

Assign a value to First data member.

const TFirst & GetFirst(void) const

Get the First member data.

Lightweight interface for getting lines of data with minimal memory copying.

#define row(bind, expected)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4