docs: Updating documentation and license boilerplates in all files
Change-Id: I321fb0d85aaddf9150ed496fe03ee0e4dc738761
diff --git a/src/util/command-interest-generator.hpp b/src/util/command-interest-generator.hpp
index 8b51cd9..3698187 100644
--- a/src/util/command-interest-generator.hpp
+++ b/src/util/command-interest-generator.hpp
@@ -1,7 +1,13 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_HELPERS_COMMAND_INTEREST_GENERATOR_HPP
diff --git a/src/util/command-interest-validator.hpp b/src/util/command-interest-validator.hpp
index c543549..17d264b 100644
--- a/src/util/command-interest-validator.hpp
+++ b/src/util/command-interest-validator.hpp
@@ -1,7 +1,13 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_UTIL_COMMAND_INTEREST_VALIDATOR_HPP
diff --git a/src/util/config-file.cpp b/src/util/config-file.cpp
index ea56d12..162cf60 100644
--- a/src/util/config-file.cpp
+++ b/src/util/config-file.cpp
@@ -1,10 +1,15 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2014 Named Data Networking Project
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
-
#include "config-file.hpp"
#include <boost/property_tree/ini_parser.hpp>
diff --git a/src/util/config-file.hpp b/src/util/config-file.hpp
index cecceba..8d49d26 100644
--- a/src/util/config-file.hpp
+++ b/src/util/config-file.hpp
@@ -1,7 +1,13 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2014 Named Data Networking Project
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_MANAGEMENT_CONFIG_FILE_HPP
@@ -100,4 +106,3 @@
#endif // NDN_MANAGEMENT_CONFIG_FILE_HPP
-
diff --git a/src/util/crypto.cpp b/src/util/crypto.cpp
index d8e803a..29cbe9d 100644
--- a/src/util/crypto.cpp
+++ b/src/util/crypto.cpp
@@ -1,6 +1,13 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#include "../common.hpp"
@@ -18,7 +25,8 @@
CryptoPP::SHA256 hash;
OBufferStream os;
- StringSource(data, dataLength, true, new HashFilter(hash, new ArraySink(digest, crypto::SHA256_DIGEST_SIZE)));
+ StringSource(data, dataLength, true,
+ new HashFilter(hash, new ArraySink(digest, crypto::SHA256_DIGEST_SIZE)));
}
catch (CryptoPP::Exception& e)
{
diff --git a/src/util/crypto.hpp b/src/util/crypto.hpp
index 82e769f..15ccf9d 100644
--- a/src/util/crypto.hpp
+++ b/src/util/crypto.hpp
@@ -1,6 +1,13 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_UTIL_CRYPTO_HPP
diff --git a/src/util/io.hpp b/src/util/io.hpp
index 0bb929b..6ca861f 100644
--- a/src/util/io.hpp
+++ b/src/util/io.hpp
@@ -1,6 +1,13 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_UTIL_IO_HPP
diff --git a/src/util/logging.cpp b/src/util/logging.cpp
index 113e3a9..d395ea0 100644
--- a/src/util/logging.cpp
+++ b/src/util/logging.cpp
@@ -1,9 +1,16 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- * @author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
+ * @author Zhenkai Zhu <http://irl.cs.ucla.edu/~zhenkai/>
*/
#include "common.hpp"
diff --git a/src/util/logging.hpp b/src/util/logging.hpp
index 5ee958c..5ac0463 100644
--- a/src/util/logging.hpp
+++ b/src/util/logging.hpp
@@ -1,9 +1,16 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- * @author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
+ * @author Zhenkai Zhu <http://irl.cs.ucla.edu/~zhenkai/>
*/
#ifndef NDN_LOGGING_HPP
diff --git a/src/util/monotonic_deadline_timer.hpp b/src/util/monotonic_deadline_timer.hpp
index 2b1558d..4147d51 100644
--- a/src/util/monotonic_deadline_timer.hpp
+++ b/src/util/monotonic_deadline_timer.hpp
@@ -1,7 +1,13 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2014 Named Data Networking Project
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
/**
diff --git a/src/util/random.cpp b/src/util/random.cpp
index db26a3e..e64b1aa 100644
--- a/src/util/random.cpp
+++ b/src/util/random.cpp
@@ -1,7 +1,13 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2014 Named Data Networking Project
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#include "common.hpp"
@@ -25,7 +31,7 @@
generateWord64()
{
static CryptoPP::AutoSeededRandomPool rng;
-
+
uint64_t random;
rng.GenerateBlock(reinterpret_cast<unsigned char*>(&random), 8);
diff --git a/src/util/random.hpp b/src/util/random.hpp
index f7dbc22..99be4e4 100644
--- a/src/util/random.hpp
+++ b/src/util/random.hpp
@@ -1,6 +1,13 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_UTIL_RANDOM_HPP
diff --git a/src/util/regex.hpp b/src/util/regex.hpp
index 9f9d306..35b85e1 100644
--- a/src/util/regex.hpp
+++ b/src/util/regex.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_HPP
diff --git a/src/util/regex/regex-backref-manager.hpp b/src/util/regex/regex-backref-manager.hpp
index f11e431..56919f5 100644
--- a/src/util/regex/regex-backref-manager.hpp
+++ b/src/util/regex/regex-backref-manager.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_BACKREF_MANAGER_HPP
diff --git a/src/util/regex/regex-backref-matcher.hpp b/src/util/regex/regex-backref-matcher.hpp
index aa00605..6ca7258 100644
--- a/src/util/regex/regex-backref-matcher.hpp
+++ b/src/util/regex/regex-backref-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_REGEX_BACKREF_MATCHER_HPP
@@ -38,7 +45,8 @@
namespace ndn {
-inline RegexBackrefMatcher::RegexBackrefMatcher(const std::string& expr, shared_ptr<RegexBackrefManager> backRefManager)
+inline RegexBackrefMatcher::RegexBackrefMatcher(const std::string& expr,
+ shared_ptr<RegexBackrefManager> backRefManager)
: RegexMatcher (expr, EXPR_BACKREF, backRefManager)
{
// compile();
@@ -51,7 +59,8 @@
if ('(' == m_expr[0] && ')' == m_expr[lastIndex]){
// m_backRefManager->pushRef(this);
- shared_ptr<RegexMatcher> matcher(new RegexPatternListMatcher(m_expr.substr(1, lastIndex - 1), m_backrefManager));
+ shared_ptr<RegexMatcher> matcher(new RegexPatternListMatcher(m_expr.substr(1, lastIndex - 1),
+ m_backrefManager));
m_matcherList.push_back(matcher);
}
else
diff --git a/src/util/regex/regex-component-matcher.hpp b/src/util/regex/regex-component-matcher.hpp
index 34bcba7..747662c 100644
--- a/src/util/regex/regex-component-matcher.hpp
+++ b/src/util/regex/regex-component-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_REGEX_COMPONENT_MATCHER_HPP
@@ -52,7 +59,7 @@
inline
RegexComponentMatcher::RegexComponentMatcher (const std::string& expr,
- ptr_lib::shared_ptr<RegexBackrefManager> backRefManager,
+ shared_ptr<RegexBackrefManager> backRefManager,
bool exact)
: RegexMatcher (expr, EXPR_COMPONENT, backRefManager),
m_exact(exact)
@@ -70,13 +77,13 @@
m_componentRegex = boost::regex (m_expr);
m_pseudoMatcher.clear();
- m_pseudoMatcher.push_back(ptr_lib::make_shared<RegexPseudoMatcher>());
+ m_pseudoMatcher.push_back(make_shared<RegexPseudoMatcher>());
for (size_t i = 1; i < m_componentRegex.mark_count(); i++)
{
- ptr_lib::shared_ptr<RegexPseudoMatcher> pMatcher = ptr_lib::make_shared<RegexPseudoMatcher>();
+ shared_ptr<RegexPseudoMatcher> pMatcher = make_shared<RegexPseudoMatcher>();
m_pseudoMatcher.push_back(pMatcher);
- m_backrefManager->pushRef(ptr_lib::static_pointer_cast<RegexMatcher>(pMatcher));
+ m_backrefManager->pushRef(static_pointer_cast<RegexMatcher>(pMatcher));
}
diff --git a/src/util/regex/regex-component-set-matcher.hpp b/src/util/regex/regex-component-set-matcher.hpp
index b8c9845..e2ff78c 100644
--- a/src/util/regex/regex-component-set-matcher.hpp
+++ b/src/util/regex/regex-component-set-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_COMPONENT_SET_MATCHER_HPP
diff --git a/src/util/regex/regex-matcher.hpp b/src/util/regex/regex-matcher.hpp
index d62ab41..c126e95 100644
--- a/src/util/regex/regex-matcher.hpp
+++ b/src/util/regex/regex-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_REGEX_MATCHER_H
diff --git a/src/util/regex/regex-pattern-list-matcher.hpp b/src/util/regex/regex-pattern-list-matcher.hpp
index 12e3c68..d6e3a72 100644
--- a/src/util/regex/regex-pattern-list-matcher.hpp
+++ b/src/util/regex/regex-pattern-list-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_REGEX_PATTERN_LIST_MATCHER_HPP
@@ -48,8 +55,10 @@
namespace ndn {
-inline RegexPatternListMatcher::RegexPatternListMatcher(const std::string& expr, shared_ptr<RegexBackrefManager> backrefManager)
- :RegexMatcher(expr, EXPR_PATTERNLIST, backrefManager)
+inline
+RegexPatternListMatcher::RegexPatternListMatcher(const std::string& expr,
+ shared_ptr<RegexBackrefManager> backrefManager)
+ : RegexMatcher(expr, EXPR_PATTERNLIST, backrefManager)
{
compile();
}
@@ -85,14 +94,16 @@
indicator = index;
end = extractRepetition(index);
if (indicator == end){
- shared_ptr<RegexMatcher> matcher = make_shared<RegexBackrefMatcher>(m_expr.substr(start, end - start), m_backrefManager);
+ shared_ptr<RegexMatcher> matcher =
+ make_shared<RegexBackrefMatcher>(m_expr.substr(start, end - start), m_backrefManager);
m_backrefManager->pushRef(matcher);
boost::dynamic_pointer_cast<RegexBackrefMatcher>(matcher)->lateCompile();
m_matcherList.push_back(matcher);
}
else
- m_matcherList.push_back(make_shared<RegexRepeatMatcher>(m_expr.substr(start, end - start), m_backrefManager, indicator - start));
+ m_matcherList.push_back(make_shared<RegexRepeatMatcher>(m_expr.substr(start, end - start),
+ m_backrefManager, indicator - start));
break;
case '<':
@@ -100,7 +111,8 @@
index = extractSubPattern ('<', '>', index);
indicator = index;
end = extractRepetition(index);
- m_matcherList.push_back(make_shared<RegexRepeatMatcher>(m_expr.substr(start, end - start), m_backrefManager, indicator - start));
+ m_matcherList.push_back(make_shared<RegexRepeatMatcher>(m_expr.substr(start, end - start),
+ m_backrefManager, indicator - start));
break;
case '[':
@@ -108,7 +120,8 @@
index = extractSubPattern ('[', ']', index);
indicator = index;
end = extractRepetition(index);
- m_matcherList.push_back(make_shared<RegexRepeatMatcher>(m_expr.substr(start, end - start), m_backrefManager, indicator - start));
+ m_matcherList.push_back(make_shared<RegexRepeatMatcher>(m_expr.substr(start, end - start),
+ m_backrefManager, indicator - start));
break;
default:
diff --git a/src/util/regex/regex-pseudo-matcher.hpp b/src/util/regex/regex-pseudo-matcher.hpp
index 0aeea57..a8b3a2c 100644
--- a/src/util/regex/regex-pseudo-matcher.hpp
+++ b/src/util/regex/regex-pseudo-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_REGEX_PSEUDO_MATCHER_HPP
@@ -18,19 +25,19 @@
public:
RegexPseudoMatcher();
- virtual ~RegexPseudoMatcher()
+ virtual ~RegexPseudoMatcher()
{
}
- virtual void
- compile()
+ virtual void
+ compile()
{
}
- void
+ void
setMatchResult(const std::string& str);
- void
+ void
resetMatchResult();
};
@@ -39,13 +46,13 @@
{
}
-inline void
+inline void
RegexPseudoMatcher::setMatchResult(const std::string& str)
{
m_matchResult.push_back(Name::Component((const uint8_t *)str.c_str(), str.size()));
}
-
-inline void
+
+inline void
RegexPseudoMatcher::resetMatchResult()
{
m_matchResult.clear();
diff --git a/src/util/regex/regex-repeat-matcher.hpp b/src/util/regex/regex-repeat-matcher.hpp
index 5eefbd1..502369f 100644
--- a/src/util/regex/regex-repeat-matcher.hpp
+++ b/src/util/regex/regex-repeat-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_REGEX_REPEAT_MATCHER_HPP
@@ -19,9 +26,12 @@
class RegexRepeatMatcher : public RegexMatcher
{
public:
- RegexRepeatMatcher(const std::string& expr, shared_ptr<RegexBackrefManager> backRefManager, int indicator);
+ RegexRepeatMatcher(const std::string& expr,
+ shared_ptr<RegexBackrefManager> backRefManager,
+ int indicator);
- virtual ~RegexRepeatMatcher(){}
+ virtual
+ ~RegexRepeatMatcher(){}
virtual bool
match(const Name& name, const int& offset, const int& len);
@@ -58,9 +68,11 @@
namespace ndn {
inline
-RegexRepeatMatcher::RegexRepeatMatcher(const std::string& expr, shared_ptr<RegexBackrefManager> backrefManager, int indicator)
- : RegexMatcher (expr, EXPR_REPEAT_PATTERN, backrefManager),
- m_indicator(indicator)
+RegexRepeatMatcher::RegexRepeatMatcher(const std::string& expr,
+ shared_ptr<RegexBackrefManager> backrefManager,
+ int indicator)
+ : RegexMatcher (expr, EXPR_REPEAT_PATTERN, backrefManager)
+ , m_indicator(indicator)
{
// _LOG_TRACE ("Enter RegexRepeatMatcher Constructor");
compile();
@@ -80,7 +92,8 @@
boost::dynamic_pointer_cast<RegexBackrefMatcher>(matcher)->lateCompile();
}
else{
- matcher = make_shared<RegexComponentSetMatcher>(m_expr.substr(0, m_indicator), m_backrefManager);
+ matcher = make_shared<RegexComponentSetMatcher>(m_expr.substr(0, m_indicator),
+ m_backrefManager);
}
m_matcherList.push_back(matcher);
@@ -93,8 +106,6 @@
inline bool
RegexRepeatMatcher::parseRepetition()
{
- // _LOG_DEBUG ("Enter RegexRepeatMatcher::ParseRepetition()" << m_expr << " indicator: " << m_indicator);
-
int exprSize = m_expr.size();
int intMax = std::numeric_limits<int>::max();
@@ -188,39 +199,29 @@
inline bool
RegexRepeatMatcher::recursiveMatch(int repeat, const Name& name, const int& offset, const int& len)
{
- // _LOG_TRACE ("Enter RegexRepeatMatcher::recursiveMatch");
-
- // _LOG_DEBUG ("repeat: " << repeat << " offset: " << offset << " len: " << len);
- // _LOG_DEBUG ("m_repeatMin: " << m_repeatMin << " m_repeatMax: " << m_repeatMax);
-
int tried = len;
shared_ptr<RegexMatcher> matcher = m_matcherList[0];
if (0 < len && repeat >= m_repeatMax)
{
- // _LOG_DEBUG("Match Fail: Reach m_repeatMax && More components");
return false;
}
if (0 == len && repeat < m_repeatMin)
{
- // _LOG_DEBUG("Match Fail: No more components && have NOT reached m_repeatMin " << len << ", " << m_repeatMin);
return false;
}
if (0 == len && repeat >= m_repeatMin)
{
- // _LOG_DEBUG("Match Succeed: No more components && reach m_repeatMin");
return true;
}
while(tried >= 0)
{
- // _LOG_DEBUG("Attempt tried: " << tried);
-
- if (matcher->match(name, offset, tried) and recursiveMatch(repeat + 1, name, offset + tried, len - tried))
+ if (matcher->match(name, offset, tried) and recursiveMatch(repeat + 1, name,
+ offset + tried, len - tried))
return true;
- // _LOG_DEBUG("Failed at tried: " << tried);
tried --;
}
diff --git a/src/util/regex/regex-top-matcher.cpp b/src/util/regex/regex-top-matcher.cpp
index 78cb389..b00a891 100644
--- a/src/util/regex/regex-top-matcher.cpp
+++ b/src/util/regex/regex-top-matcher.cpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#include "regex-top-matcher.hpp"
@@ -84,7 +91,8 @@
{
Name result;
- shared_ptr<RegexBackrefManager> backRefManager = (m_secondaryUsed ? m_secondaryBackRefManager : m_primaryBackRefManager);
+ shared_ptr<RegexBackrefManager> backRefManager =
+ (m_secondaryUsed ? m_secondaryBackRefManager : m_primaryBackRefManager);
int backRefNum = backRefManager->size();
@@ -116,8 +124,10 @@
}
else if (index <= backRefNum)
{
- std::vector<name::Component>::const_iterator it = backRefManager->getBackRef (index - 1)->getMatchResult ().begin();
- std::vector<name::Component>::const_iterator end = backRefManager->getBackRef (index - 1)->getMatchResult ().end();
+ std::vector<name::Component>::const_iterator it =
+ backRefManager->getBackRef (index - 1)->getMatchResult ().begin();
+ std::vector<name::Component>::const_iterator end =
+ backRefManager->getBackRef (index - 1)->getMatchResult ().end();
for(; it != end; it++)
result.append (*it);
}
diff --git a/src/util/regex/regex-top-matcher.hpp b/src/util/regex/regex-top-matcher.hpp
index f5b30c1..a1ae322 100644
--- a/src/util/regex/regex-top-matcher.hpp
+++ b/src/util/regex/regex-top-matcher.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Yingdi Yu <yingdi@cs.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
*/
#ifndef NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP
diff --git a/src/util/scheduler.cpp b/src/util/scheduler.cpp
index fc6492f..9a51871 100644
--- a/src/util/scheduler.cpp
+++ b/src/util/scheduler.cpp
@@ -1,7 +1,13 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2014 Named Data Networking Project
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#include "common.hpp"
@@ -110,19 +116,19 @@
return i->m_eventId;
}
-
+
void
Scheduler::cancelEvent(const EventId& eventId)
{
if (!static_cast<bool>(eventId) || !eventId->isValid())
return; // event already fired or cancelled
-
+
if (static_cast<EventQueue::iterator>(*eventId) != m_scheduledEvent) {
m_events.erase(*eventId);
eventId->invalidate();
return;
}
-
+
m_deadlineTimer.cancel();
m_events.erase(static_cast<EventQueue::iterator>(*eventId));
eventId->invalidate();
@@ -157,7 +163,7 @@
while(!m_events.empty() && m_events.begin()->m_scheduledTime <= now)
{
EventQueue::iterator head = m_events.begin();
-
+
Event event = head->m_event;
if (head->m_period < time::nanoseconds::zero())
{
diff --git a/src/util/scheduler.hpp b/src/util/scheduler.hpp
index cc8bcce..89892e1 100644
--- a/src/util/scheduler.hpp
+++ b/src/util/scheduler.hpp
@@ -1,7 +1,13 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2014 Named Data Networking Project
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_UTIL_SCHEDULER_HPP
@@ -44,7 +50,7 @@
schedulePeriodicEvent(const time::nanoseconds& after,
const time::nanoseconds& period,
const Event& event);
-
+
/**
* \brief Cancel scheduled event
*/
@@ -54,7 +60,7 @@
private:
void
onEvent(const boost::system::error_code& code);
-
+
private:
struct EventInfo
{
@@ -78,7 +84,7 @@
time::nanoseconds
expiresFromNow() const;
-
+
time::steady_clock::TimePoint m_scheduledTime;
time::nanoseconds m_period;
Event m_event;
diff --git a/src/util/string-helper.hpp b/src/util/string-helper.hpp
index 7059f0a..b4878ae 100644
--- a/src/util/string-helper.hpp
+++ b/src/util/string-helper.hpp
@@ -1,8 +1,15 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
+ *
+ * @author Jeff Thompson <jefft0@remap.ucla.edu>
*/
#ifndef NDN_STRING_HELPER_HPP
diff --git a/src/util/time.hpp b/src/util/time.hpp
index e99a4e9..3bc4e4f 100644
--- a/src/util/time.hpp
+++ b/src/util/time.hpp
@@ -1,6 +1,13 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
- * Copyright (C) 2013-2014 Regents of the University of California.
- * See COPYING for copyright and distribution information.
+ * Copyright (c) 2013-2014, Regents of the University of California.
+ * All rights reserved.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ *
+ * This file licensed under New BSD License. See COPYING for detailed information about
+ * ndn-cxx library copyright, permissions, and redistribution restrictions.
*/
#ifndef NDN_TIME_HPP