OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
stage
include
ost
mol
entity_base.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// This file is part of the OpenStructure project <www.openstructure.org>
3
//
4
// Copyright (C) 2008-2011 by the OpenStructure authors
5
//
6
// This library is free software; you can redistribute it and/or modify it under
7
// the terms of the GNU Lesser General Public License as published by the Free
8
// Software Foundation; either version 3.0 of the License, or (at your option)
9
// any later version.
10
// This library is distributed in the hope that it will be useful, but WITHOUT
11
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
// details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with this library; if not, write to the Free Software Foundation, Inc.,
17
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
//------------------------------------------------------------------------------
19
#ifndef OST_ENTITY_BASE_HT
20
#define OST_ENTITY_BASE_HT
21
22
#include <
ost/mol/module_config.hh
>
23
#include <
ost/mol/impl/entity_impl_fw.hh
>
24
25
#include <
ost/generic_property.hh
>
26
27
namespace
ost {
namespace
mol {
28
30
class
DLLEXPORT_OST_MOL
EntityBase
:
31
public
GenericPropContainer
<EntityBase> {
32
public
:
33
friend
class
ConstGenericPropContainer
<
EntityBase
>;
34
EntityBase
(
const
impl::EntityImplPtr
& impl);
35
EntityBase
();
36
40
const
String
& GetName()
const
;
41
47
void
SetName(
const
String
& ent_name);
48
49
public
:
50
52
53
operator
bool()
const
{
return
this->IsValid(); }
62
bool
IsValid
()
const
{
return
Impl().get()!=0; }
63
impl::EntityImplPtr
& Impl();
64
const
impl::EntityImplPtr
& Impl()
const
;
65
protected
:
66
67
GenericPropContainerImpl
* GpImpl();
68
69
const
GenericPropContainerImpl
* GpImpl()
const
;
70
71
void
CheckValidity()
const
;
72
private
:
73
impl::EntityImplPtr
impl_;
74
};
75
76
DLLEXPORT_OST_MOL
std::ostream&
operator<<
(std::ostream& os,
77
const
EntityBase& ent);
78
}}
// ns
79
80
#endif // OST_ENTITY_BASE_HH
81
generic_property.hh
String
std::string String
Definition:
base.hh:54
ost::ConstGenericPropContainer
Definition:
generic_property.hh:148
ost::mol::operator<<
DLLEXPORT_OST_MOL std::ostream & operator<<(std::ostream &os, const AtomBase &atom)
module_config.hh
ost::mol::EntityBase::IsValid
bool IsValid() const
check validity of handle
Definition:
entity_base.hh:62
ost::mol::impl::EntityImplPtr
boost::shared_ptr< EntityImpl > EntityImplPtr
Definition:
entity_impl_fw.hh:27
DLLEXPORT_OST_MOL
#define DLLEXPORT_OST_MOL
Definition:
module_config.hh:28
entity_impl_fw.hh
ost::GenericPropContainerImpl
base class for the implementation
Definition:
generic_property.hh:53
ost::GenericPropContainer
base class for the handler classes
Definition:
generic_property.hh:337
ost::mol::EntityBase
definition of EntityBase
Definition:
entity_base.hh:30
Generated by
1.8.5