<commit_before>/*********************************************************************
 *
 * Condor ClassAd library
 * Copyright (C) 1990-2003, Condor Team, Computer Sciences Department,
 * University of Wisconsin-Madison, WI and <NAME>.
 *
 * This source code is covered by the Condor Public License, which can
 * be found in the accompanying LICENSE file, or online at
 * www.condorproject.org.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * AND THE UNIVERSITY OF WISCONSIN-MADISON "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, AND FITNESS
 * FOR A PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE COPYRIGHT
 * HOLDERS AND CONTRIBUTORS AND THE UNIVERSITY OF WISCONSIN-MADISON
 * MAKE NO MAKE NO REPRESENTATION THAT THE SOFTWARE, MODIFICATIONS,
 * ENHANCEMENTS OR DERIVATIVE WORKS THEREOF, WILL NOT INFRINGE ANY
 * PATENT, COPYRIGHT, TRADEMARK, TRADE SECRET OR OTHER PROPRIETARY
 * RIGHT.
 *
 *********************************************************************/

#ifndef __EXPR_LIST_H__
#define __EXPR_LIST_H__

#include <vector>

BEGIN_NAMESPACE( classad )

class ExprListIterator;

/// Represents a list of expressions, like {1, 2, 3}
class ExprList : public ExprTree
{
	public:
		ExprList();
		ExprList(const std::vector<ExprTree*>& exprs);

        /// Copy Constructor
        ExprList(const ExprList &other_list);

		/// Destructor
		~ExprList();

        ExprList &operator=(const ExprList &other_list);

		/** Factory to make an expression list expression
		 * 	@param	list A vector of the expressions to be contained in the
		 * 		list
		 * 	@return The constructed expression list
		 */
		static ExprList *MakeExprList( const std::vector< ExprTree* > &list );

		/** Deconstructor to obtain the components of an expression list
		 * 	@param list The list of expressions
		 */
		void GetComponents( std::vector<ExprTree*>& list) const;

		virtual ExprTree* Copy( ) const;

        bool CopyFrom(const ExprList &other_list);

        virtual bool SameAs(const ExprTree *tree) const;

        friend bool operator==(ExprList &list1, ExprList &list2);

		// STL-like iterators and functions
	    typedef std::vector<ExprTree*>::iterator       iterator;
    	typedef std::vector<ExprTree*>::const_iterator const_iterator;

        int size()                   { return exprList.size();  }
        iterator begin()             { return exprList.begin(); }<commit_msg>Marked size as a const function, since it is.<commit_after>/*********************************************************************
 *
 * Condor ClassAd library
 * Copyright (C) 1990-2003, Condor Team, Computer Sciences Department,
 * University of Wisconsin-Madison, WI and <NAME>.
 *
 * This source code is covered by the Condor Public License, which can
 * be found in the accompanying LICENSE file, or online at
 * www.condorproject.org.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * AND THE UNIVERSITY OF WISCONSIN-MADISON "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, AND FITNESS
 * FOR A PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE COPYRIGHT
 * HOLDERS AND CONTRIBUTORS AND THE UNIVERSITY OF WISCONSIN-MADISON
 * MAKE NO MAKE NO REPRESENTATION THAT THE SOFTWARE, MODIFICATIONS,
 * ENHANCEMENTS OR DERIVATIVE WORKS THEREOF, WILL NOT INFRINGE ANY
 * PATENT, COPYRIGHT, TRADEMARK, TRADE SECRET OR OTHER PROPRIETARY
 * RIGHT.
 *
 *********************************************************************/

#ifndef __EXPR_LIST_H__
#define __EXPR_LIST_H__

#include <vector>

BEGIN_NAMESPACE( classad )

class ExprListIterator;

/// Represents a list of expressions, like {1, 2, 3}
class ExprList : public ExprTree
{
	public:
		ExprList();
		ExprList(const std::vector<ExprTree*>& exprs);

        /// Copy Constructor
        ExprList(const ExprList &other_list);

		/// Destructor
		~ExprList();

        ExprList &operator=(const ExprList &other_list);

		/** Factory to make an expression list expression
		 * 	@param	list A vector of the expressions to be contained in the
		 * 		list
		 * 	@return The constructed expression list
		 */
		static ExprList *MakeExprList( const std::vector< ExprTree* > &list );

		/** Deconstructor to obtain the components of an expression list
		 * 	@param list The list of expressions
		 */
		void GetComponents( std::vector<ExprTree*>& list) const;

		virtual ExprTree* Copy( ) const;

        bool CopyFrom(const ExprList &other_list);

        virtual bool SameAs(const ExprTree *tree) const;

        friend bool operator==(ExprList &list1, ExprList &list2);

		// STL-like iterators and functions
	    typedef std::vector<ExprTree*>::iterator       iterator;
    	typedef std::vector<ExprTree*>::const_iterator const_iterator;

        int size() const             { return exprList.size();  }
        iterator begin()             { return exprList.begin(); }
{'fraction_non_alphanumeric': 0.13441712926249008, 'fraction_numerical': 0.005154639175257732, 'mean_word_length': 3.85563041385948, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6866156', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1371, 'n_words': 515}