search for: getcount

Displaying 20 results from an estimated 30 matches for "getcount".

2006 Nov 24
0
[756] trunk/wxruby2/swig: Moved one-shot typemaps for ListBox.get_selections into ListBox.i
.../span><span class="cx"> </span><ins>+// typemaps for GetSelections() +%typemap(in,numinputs=0) (wxArrayInt& selections) (wxArrayInt tmp) { + $1 = &tmp; +} + +%typemap(out) (wxArrayInt& selections) { + $result = rb_ary_new(); + for (int i = 0; i < $1.GetCount(); i++) + { + rb_ary_push($result,INT2NUM( $1.Item(i) ) ); + } +} + +%typemap(argout) (wxArrayInt& selections) { + $result = rb_ary_new(); + for (int i = 0; i < ($1)->GetCount(); i++) + { + rb_ary_push($result,INT2NUM( ($1)->Item(i) ) ); + } +} +// end typemaps for Get...
2009 Jul 10
0
[LLVMdev] Path profiling interface proposal
...sets of path data it seems natural to want to generalize it. I also don't understand the "order" parameter. How are paths ordered? By number? Why does the returned order of paths matter? > /* > * Returns the execution count for a path. > */ > unsigned long Path::getCount() > /* > * Returns the execution frequency for a path. > */ > float Path::getFrequency() The naming is a bit confusing here. "getCount" makes sense, but "getFrequency" could mean a few different things. My assumption is that it means the % of times this pat...
2008 Jun 10
1
Parse XML
Could someone provide a link or examples of parsing XML document in R? Few specific questions below: For instance I can retrieve specific nodes using this: node <- xpathApply(xml, "//" %+% xtag, xmlValue) 1) I want to be able to retrieve parent node for this node, how can I do this? getParentNode() does not seem to cut it. 2) How can I retrieve children nodes for a particular
2009 Jul 10
3
[LLVMdev] Path profiling interface proposal
Hello, I am planning on contributing path profiling to LLVM by the end of August. I have written a document of what the interface to the path profiles would look like at that time. If someone has any amendments, I can incorporate them. http://www.cs.ualberta.ca/~pejic/PathProfiling.html Slobodan Pejic
2005 Jul 08
2
R.oo static field
How can I define a static member of a class? not a static method, rather a static field that would be accessed by all instances of the class.
2007 Mar 17
0
[883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8
...t;> virtual int FindString(const wxString& string ); </span><span class="cx"> virtual void * GetClientData(int n ) const; </span><span class="cx"> virtual wxClientData * GetClientObject(int n ) const; </span><del>- virtual int GetCount() const; </del><ins>+ virtual unsigned int GetCount() const; </ins><span class="cx"> virtual int GetSelection() const; </span><span class="cx"> virtual wxString GetString(int n ) const; </span><span class="cx"> vi...
2009 Jul 11
1
[LLVMdev] Path profiling interface proposal
...ator over paths can load the data lazily. Some potential passes may want to look at the top paths that account for 80% execution, and will not require the majority of the path profile. > >> /* >> * Returns the execution count for a path. >> */ >> unsigned long Path::getCount() > >> /* >> * Returns the execution frequency for a path. >> */ >> float Path::getFrequency() > > The naming is a bit confusing here. "getCount" makes sense, but > "getFrequency" could mean a few different things. My assumption is th...
2006 Nov 01
1
get_client_data
As a first stab at understanding swig''s mem mgmt features, I tried to fix get_client_data, using Wx::Choice as a testbed. The attached patch resolves the immediate crasher with this function (which was b/c the typemap for void* isn''t right for this method). It also uses the %markfunc feature to prevent objects that are set as client data from being GC''d. The
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...Checks whether the C++ object is still around first... -void mark_wxControlWithItems(void* ptr) { - if ( GC_IsWindowDeleted(ptr) ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn; - - wxControlWithItems* wx_cwi = (wxControlWithItems*) ptr; - int count = wx_cwi->GetCount(); - if ( count == 0 ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn; // Empty control - if ( ! wx_cwi->HasClientObjectData() && ! wx_cwi->HasClientUntypedData() ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn; // C...
2007 Jul 22
0
[1141] trunk/wxruby2/swig/mark_free_impl.i: ControlWithItems call default Window mark routine to preserve ToolTips etc
...mp;nbsp&nbspreturn; </span><span class="cx"> </span><ins>+ GC_mark_wxWindow(ptr); + </ins><span class="cx"> wxControlWithItems* wx_cwi = (wxControlWithItems*) ptr; </span><span class="cx"> int count = wx_cwi->GetCount(); </span><span class="cx"> if ( count == 0 ) </span></span></pre> </div> </div> </body> </html>
2006 Dec 21
0
[792] trunk/wxruby2/swig/classes/include/wxDisplay.h: Added missing class, but a wrapper needs some tweaking
...pan class="lines">@@ -0,0 +1,27 @@ </span><ins>+// Copyright 2004-2006 by Kevin Smith +// released under the MIT-style wxruby2 license + +#if !defined(_wxDisplay_h_) +#define _wxDisplay_h_ +class wxDisplay +{ +public: + wxDisplay(size_t index = 0); + static size_t GetCount(); + static int GetFromPoint(const wxPoint& pt); + static int GetFromWindow(wxWindow *window); + virtual bool IsOk() const { return true; } + virtual wxRect GetGeometry() const = 0; + virtual wxString GetName() const = 0; + virtual bool IsPrimary() const { return m_index == 0;...
2013 Apr 01
1
[LLVMdev] path profile result with LLVM
...tPath != pathProfileInfo.pathEnd();nextPath++){ ProfilePath* currentPath = nextPath->second; errs() << "Function: "+ F->getName() << "\n"; errs() <<"path #" << currentPath->getNumber()<<":" << currentPath->getCount() <<"\n"; } } return true; } ////////////////////////////////////////////////////////////////// I test with a fft program,and get the output . I intend to get all path information ,but the result only contains part path information.The following is the output of...
2007 Jul 20
0
[1125] trunk/wxruby2/swig/shared/control_with_items.i: Avoid MSW crashes when unexpected object is returned by SWIG tracking
...span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwxControlWithItems* wx_cwi = (wxControlWithItems*) ptr; </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspint count = wx_cwi->GetCount(); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( count == 0 ) </span></span></pre> </div> </div> </body> </html>
2006 Nov 23
0
[752] trunk/wxruby2: Fix for Bug #6810: ListBox#get_selections should return an array of selections
...+395,16 @@ </span><span class="cx"> } </span><span class="cx"> } </span><span class="cx"> </span><ins>+%typemap(argout) (wxArrayInt& selections) { + + $result = rb_ary_new(); + + for (int i = 0; i < ($1)->GetCount(); i++) + { + rb_ary_push($result,INT2NUM( ($1)->Item(i) ) ); + } +} + </ins><span class="cx"> ############################################################## </span><span class="cx"> </span><span class="cx"> %typemap(in)...
2007 Jul 21
0
[1133] trunk/wxruby2/swig/shared/control_with_items.i: Move mark func for ControlWithItems into shared file so changes affect
...&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; - -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwxControlWithItems* wx_cwi = (wxControlWithItems*) ptr; -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspint count = wx_cwi->GetCount(); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( count == 0 ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; - if(!wx_cwi->HasClientObjectData()&&!wx_cwi->HasClientUntypedData()) - return; // Control contain...
2007 Mar 17
0
[889] branches/wxruby2/wxwidgets_282/swig/shared/control_with_items.i: Ensure SWIG doesn''t generate wrappers for client data methods (Artur Kuptel)
...span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwxControlWithItems* wx_cwi = (wxControlWithItems*) ptr; </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspint count = wx_cwi->GetCount(); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( count == 0 ) </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </span><ins>+ i...
2007 Jul 21
0
[1134] trunk/wxruby2/swig/mark_free_impl.i: When window is deleted, unhook ruby obj from DATA_PTR to avoid MSW crashes
...Checks whether the C++ object is still around first... +void mark_wxControlWithItems(void* ptr) { + if ( GC_IsWindowDeleted(ptr) ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn; + + wxControlWithItems* wx_cwi = (wxControlWithItems*) ptr; + int count = wx_cwi->GetCount(); + if ( count == 0 ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn; // Empty control + if ( ! wx_cwi->HasClientObjectData() && ! wx_cwi->HasClientUntypedData() ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn; // C...
2006 Nov 07
0
[722] trunk/wxruby2/swig: Wx::Choice fixes for get_client_data (AF)
...&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; + +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwxControlWithItems* wx_cwi = (wxControlWithItems*) ptr; +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspint count = wx_cwi->GetCount(); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( count == 0 ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspfor (int i = 0; i < count; ++i) +&nbsp&amp...
2005 Aug 21
15
New inheritance
A good number of the samples I have tested are outright or subtly broken on Windows now. I''m trying to determine what the cause is. Mostly it seems related to the initialize function not being created when it should be. Case in point: ClientDC.i The caret example won''t work at all because initialize isn''t declared any longer. If you comment out the import
2007 Apr 10
15
Wxruby doesn''t work on my Debian sid ( glibc error )
Hi everyone ! i can''t make wxruby work on my debian box, i installed wxruby2preview with the gem command line tool but when i try to run one of the samples, i get this error message : dialogs.rb:1:in `require'': no such file to load -- wxruby (LoadError) from dialogs.rb:1 i searched this mailing list a bit, i tried with the -rubygem argument, i get this error :