<commit_before>// ActiveResourceKit ARBase.h
//
// Copyright © 2011, <NAME>, Pioneering Software, United Kingdom
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the “Software”), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//	The above copyright notice and this permission notice shall be included in
//	all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EITHER
// EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO
// EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
//------------------------------------------------------------------------------

#import <Foundation/Foundation.h>
#import <ActiveResourceKit/ARFormat.h>

extern NSString *const kARFromKey;
extern NSString *const kARParamsKey;

@class AResource;

/*!
 * @brief An active resource's base configuration.
 * @details Defines an active resource's site, schema and known attributes,
 * etc. Does not however define an active resource @e instance. Active resources
 * binding to the same remote element at the same remote site associate with a
 * common base.
 *
 * ARBase corresponds to the singleton class aspects of @c
 * ActiveResource::Base. Under Rails ActiveResource, the @c ActiveResource::Base
 * singleton class carries the following state. See list below.
 *
 *	- auth_type
 *	- collection_name
 *	- connection
 *	- element_name
 *	- headers
 *	- known_attributes
 *	- nospam
 *	- password
 *	- prefix_parameters
 *	- primary_key
 *	- proxy
 *	- schema
 *	- site
 *	- ssl_options
 *	- test
 *	- timeout
 *	- user
 *
 * This might help to define what ARBase actually does, its purpose. ARBase
 * implements the anonymous singleton class behaviours belonging to
 * @c ActiveResource::Base. AResource defines the class for Active Resource
 * instances, but ARBase defines the class for Active Resource @e classes,
 * singleton classes that is. Objective-C 2.0 does not provide anything
 * comparable singleton classes. The Rails singleton class becomes the
 * Objective-C “base” class.
 *
 * Singleton methods for @c ActiveResource::Base include the following.
 *
 *	- all
 *	- auth_type
 *	- build
 *	- check_prefix_options
 *	- collection_name
 *	- collection_path
 *	- connection
 *	- create
 *	- create_proxy_uri_from
 *	- create_site_uri_from
 *	- delete
 *	- element_name
 *	- element_path
 *	- exists
 *	- find
 *	- find_every
 *	- find_one
 *	- find_single
 *	- first
 *	- format
 *	- headers
 *	- instantiate_collection
 *	- instantiate_record
 *	- known_attributes
 *	- last
 *	- new_element_path
 *	- password
 *	- prefix
 *	- prefix_parameters
 *	- prefix_source
 *	- primary_key
 *	- proxy
 *	- query_string
 *	- schema
 *	- site
 *	- split_options
 *	- ssl_options
 *	- timeout
 *	- user
 *
 * @par Lazy Getters
 * Use a getter-lazily paradigm in place of actual lazy getting. This has
 * advantages. First, it obviates the need for defining custom getters and
 * setters. This is a useful thing, since the exact setter and getter
 * implementations depend on the memory model being deployed. Automatic
 * Reference Counting (ARC) has one requirement, garbage-collection another, and
 * manual retain-release (MRR) another. Strategy employed here: Let the compiler
 * synthesise the correct setters and getters accordingly. If you want to access
 * the getter but with lazy initialisation, ask for propertyLazily.
 */
@interface ARBase : NSObject
<commit_msg>Comment for -initWithSite:<commit_after>// ActiveResourceKit ARBase.h
//
// Copyright © 2011, <NAME>, Pioneering Software, United Kingdom
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the “Software”), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//	The above copyright notice and this permission notice shall be included in
//	all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EITHER
// EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO
// EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
//------------------------------------------------------------------------------

#import <Foundation/Foundation.h>
#import <ActiveResourceKit/ARFormat.h>

extern NSString *const kARFromKey;
extern NSString *const kARParamsKey;

@class AResource;

/*!
 * @brief An active resource's base configuration.
 * @details Defines an active resource's site, schema and known attributes,
 * etc. Does not however define an active resource @e instance. Active resources
 * binding to the same remote element at the same remote site associate with a
 * common base.
 *
 * ARBase corresponds to the singleton class aspects of @c
 * ActiveResource::Base. Under Rails ActiveResource, the @c ActiveResource::Base
 * singleton class carries the following state. See list below.
 *
 *	- auth_type
 *	- collection_name
 *	- connection
 *	- element_name
 *	- headers
 *	- known_attributes
 *	- nospam
 *	- password
 *	- prefix_parameters
 *	- primary_key
 *	- proxy
 *	- schema
 *	- site
 *	- ssl_options
 *	- test
 *	- timeout
 *	- user
 *
 * This might help to define what ARBase actually does, its purpose. ARBase
 * implements the anonymous singleton class behaviours belonging to
 * @c ActiveResource::Base. AResource defines the class for Active Resource
 * instances, but ARBase defines the class for Active Resource @e classes,
 * singleton classes that is. Objective-C 2.0 does not provide anything
 * comparable singleton classes. The Rails singleton class becomes the
 * Objective-C “base” class.
 *
 * Singleton methods for @c ActiveResource::Base include the following.
 *
 *	- all
 *	- auth_type
 *	- build
 *	- check_prefix_options
 *	- collection_name
 *	- collection_path
 *	- connection
 *	- create
 *	- create_proxy_uri_from
 *	- create_site_uri_from
 *	- delete
 *	- element_name
 *	- element_path
 *	- exists
 *	- find
 *	- find_every
 *	- find_one
 *	- find_single
 *	- first
 *	- format
 *	- headers
 *	- instantiate_collection
 *	- instantiate_record
 *	- known_attributes
 *	- last
 *	- new_element_path
 *	- password
 *	- prefix
 *	- prefix_parameters
 *	- prefix_source
 *	- primary_key
 *	- proxy
 *	- query_string
 *	- schema
 *	- site
 *	- split_options
 *	- ssl_options
 *	- timeout
 *	- user
 *
 * @par Lazy Getters
 * Use a getter-lazily paradigm in place of actual lazy getting. This has
 * advantages. First, it obviates the need for defining custom getters and
 * setters. This is a useful thing, since the exact setter and getter
 * implementations depend on the memory model being deployed. Automatic
 * Reference Counting (ARC) has one requirement, garbage-collection another, and
 * manual retain-release (MRR) another. Strategy employed here: Let the compiler
 * synthesise the correct setters and getters accordingly. If you want to access
 * the getter but with lazy initialisation, ask for propertyLazily.
 */
@interface ARBase : NSObject

/*!
 * @brief Initialises a new Active Resource Base instance using a given @a site.
 * @param site An URL specifying the remote HTTP or HTTPS resource.
 * @details This is @em not the designated initialiser but rather a shorthand
 * for sending @c -init followed by @c -setSite:. The element name, if you do
 * not subsequently assign one, derives from the @ref ARBase sub-class
 * name. This assumes that you derive ARBase.
 */
{'fraction_non_alphanumeric': 0.09608002791671513, 'fraction_numerical': 0.0013958357566592997, 'mean_word_length': 3.3033033033033035, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1430437', 'n_tokens_mistral': 2406, 'n_tokens_neox': 2299, 'n_words': 1015}