Changeset 87484f1 in tol
- Timestamp:
- Oct 8, 2009, 10:42:22 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- dd045c73
- Parents:
- bb652a3
- Location:
- tol/btol/bgrammar
- Files:
-
- 2 edited
-
class.cpp (modified) (2 diffs)
-
tol_bclass.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/class.cpp
rbb652a3 r87484f1 903 903 } 904 904 905 //-------------------------------------------------------------------- 906 BList* BMemberOwner::Select( 907 BList* lst, bool isStatic, bool isMethod) const 908 //-------------------------------------------------------------------- 909 { 910 int i; 911 for(i=0; i<member_.Size(); i++) 912 { 913 BMember& mbr = *(member_[i]->member_); 914 if((mbr.isStatic_==isStatic) && 915 (mbr.isMethod_==isMethod)) 916 { 917 if(mbr.method_) { lst = Cons(mbr.method_,lst); } 918 else if(mbr.static_) { lst = Cons(mbr.static_,lst); } 919 } 920 } 921 return(lst); 922 }; 923 924 //-------------------------------------------------------------------- 925 BList* BMemberOwner::SelectStaticMembers(BList* lst) const 926 //-------------------------------------------------------------------- 927 { 928 return(Select(lst, true, false)); 929 } 930 931 //-------------------------------------------------------------------- 932 BList* BMemberOwner::SelectStaticMethods(BList* lst) const 933 //-------------------------------------------------------------------- 934 { 935 return(Select(lst, true, true)); 936 } 937 938 //-------------------------------------------------------------------- 939 BList* BMemberOwner::SelectNonStaticMethods(BList* lst) const 940 //-------------------------------------------------------------------- 941 { 942 return(Select(lst, false, true)); 943 } 905 944 906 945 //-------------------------------------------------------------------- … … 932 971 return(nb_->Dump()); 933 972 } 973 934 974 935 975 //-------------------------------------------------------------------- -
tol/btol/bgrammar/tol_bclass.h
rbb652a3 r87484f1 155 155 //! Sorts parsed members by appearing order 156 156 void SortMembers(); 157 BList* Select(BList* lst, bool isStatic, bool isMethod) const; 158 BList* SelectStaticMembers(BList* lst) const; 159 BList* SelectStaticMethods(BList* lst) const; 160 BList* SelectNonStaticMethods(BList* lst) const; 157 161 DeclareClassNewDelete(BMemberOwner); 158 162 };
Note: See TracChangeset
for help on using the changeset viewer.
