<commit_before>/*
 *            Copyright 2009-2018 The VOTCA Development Team
 *                       (http://www.votca.org)
 *
 *      Licensed under the Apache License, Version 2.0 (the "License")
 *
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *              http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
#ifndef __VOTCA_TOOLS_IDENTITY_H
#define __VOTCA_TOOLS_IDENTITY_H
#include <exception>
namespace votca {
namespace tools {

/**
    \brief Information about Identity

    The identity object is meant to provide functionality for storing the id of
    an object it primariy meant to be used in child classes and provides a more
    safety than other imlementations.
*/
class Identity {
 private:
  size_t id_;
  bool id_set_;

 public:
  /// Constructor
  Identity() : id_set_(false) {}
  /// Constructor that takes initial id
  Identity(size_t id) : id_(id), id_set_(true) {};
  /// Gets the id returns error of the id has not been set
  size_t getId() {
    return (id_set_ ? id_ : throw std::runtime_error("ID not set"));
  }
  /// Set the id
  void setId(size_t id) { id_ = id; }
};
}
}

#endif<commit_msg>Changed size_t to long int<commit_after>/*
 *            Copyright 2009-2018 The VOTCA Development Team
 *                       (http://www.votca.org)
 *
 *      Licensed under the Apache License, Version 2.0 (the "License")
 *
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *              http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
#ifndef __VOTCA_TOOLS_IDENTITY_H
#define __VOTCA_TOOLS_IDENTITY_H
#include <exception>
namespace votca {
namespace tools {

/**
    \brief Information about Identity

    The identity object is meant to provide functionality for storing the id of
    an object it primariy meant to be used in child classes and provides a more
    safety than other imlementations.
*/
class Identity {
 private:
  long int id_;
  bool id_set_;

 public:
  /// Constructor
  Identity() : id_set_(false) {}
  /// Constructor that takes initial id
  Identity(long int id) : id_(id), id_set_(true) {};
  /// Gets the id returns error of the id has not been set
  long int getId() {
    return (id_set_ ? id_ : throw std::runtime_error("ID not set"));
  }
  /// Set the id
  void setId(long int id) { id_ = id; }
};
}
}

#endif
{'fraction_non_alphanumeric': 0.08445171849427169, 'fraction_numerical': 0.007855973813420621, 'mean_word_length': 3.058432934926959, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7462113', 'n_tokens_mistral': 889, 'n_tokens_neox': 864, 'n_words': 371}