René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
class TopicItem [JoS Reader] | ||
A TopicItem represents a single post made to a
Topic. As is the case between Groups and Topics, here also is a 1:n relationship between
Topics and GroupItems.
The header fileapp/TopicItem.h
/* Topic.h Copyright (C) 2004-2005 René Nyffenegger This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this source code must not be misrepresented; you must not claim that you wrote the original source code. If you use this source code in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original source code. 3. This notice may not be removed or altered from any source distribution. Topic.h is part of "Joel on Software reader". The most current version of Joel on Software reader can be found at http://www.adp-gmbh.ch/misc/jos_reader/index.html René Nyffenegger rene.nyffenegger@adp-gmbh.ch */ #ifndef TOPICITEM_H__ #define TOPICITEM_H__ #include <string> class TopicItem { public: std::string author_; std::string html_; std::string id_; /* Flag that indicates if the topic item was posted by a moderator (For example Joel Spolsky or Eric Sink) */ bool recognized_author_; void Reset(); }; #endif The implementation fileapp/TopicItem.cpp
/* TopicItem.cpp Copyright (C) 2004-2005 René Nyffenegger This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this source code must not be misrepresented; you must not claim that you wrote the original source code. If you use this source code in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original source code. 3. This notice may not be removed or altered from any source distribution. TopicItem.cpp is part of "Joel on Software reader". The most current version of Joel on Software reader can be found at http://www.adp-gmbh.ch/misc/jos_reader/index.html René Nyffenegger rene.nyffenegger@adp-gmbh.ch */ #include "TopicItem.h" void TopicItem::Reset() { author_ = ""; html_ = ""; recognized_author_ = false; id_ = ""; } |