Patch level : 12.0
Files correlati : Aggiunti operatori di confronto tra record_array git-svn-id: svn://10.65.10.50/branches/R_10_00@23464 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									f1c9bb7e4c
								
							
						
					
					
						commit
						214b7a9f25
					
				@ -377,6 +377,24 @@ TRecord_array& TRecord_array::copy(
 | 
				
			|||||||
  return *this;
 | 
					  return *this;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool TRecord_array::is_equal (const TRecord_array& a) const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						const int nrows = rows();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (nrows != a.rows())
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
						for (int i = 1; i <= nrows; i++)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							const TRectype & r0 = row(i);
 | 
				
			||||||
 | 
							const TRectype & r1 = a.row(i);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (r0 != r1)
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						return true;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int TRecord_array::read(const TRectype& filter)
 | 
					int TRecord_array::read(const TRectype& filter)
 | 
				
			||||||
{ 
 | 
					{ 
 | 
				
			||||||
  TRectype* f = (TRectype*)filter.dup();
 | 
					  TRectype* f = (TRectype*)filter.dup();
 | 
				
			||||||
 | 
				
			|||||||
@ -107,6 +107,10 @@ public:
 | 
				
			|||||||
  TRecord_array& copy(const TRecord_array& a);
 | 
					  TRecord_array& copy(const TRecord_array& a);
 | 
				
			||||||
  // @cmember Operatore di assegnamento di un record array
 | 
					  // @cmember Operatore di assegnamento di un record array
 | 
				
			||||||
  TRecord_array& operator= (const TRecord_array& a) { return copy(a); }
 | 
					  TRecord_array& operator= (const TRecord_array& a) { return copy(a); }
 | 
				
			||||||
 | 
					  // @cmember Operatori di confronto tra record array
 | 
				
			||||||
 | 
						bool is_equal(const TRecord_array& a) const;
 | 
				
			||||||
 | 
						bool operator== (const TRecord_array& a) const { return is_equal(a);};
 | 
				
			||||||
 | 
						bool operator!= (const TRecord_array& a) const { return !is_equal(a);};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // @cmember Ritorna il numero logico del file principale
 | 
					  // @cmember Ritorna il numero logico del file principale
 | 
				
			||||||
  int logic_num() const
 | 
					  int logic_num() const
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user