dtDAL::StringActorProperty Class Reference

This actor property represents a string data member. More...

#include <enginepropertytypes.h>

Inheritance diagram for dtDAL::StringActorProperty:

dtDAL::GenericActorProperty< const std::string &, std::string > dtDAL::ActorProperty dtDAL::AbstractParameter

List of all members.

Public Member Functions

 StringActorProperty (const std::string &name, const std::string &label, Functor1< const std::string & > set, Functor0Ret< std::string > get, const std::string &desc="", const std::string &groupName="")
void SetMaxLength (unsigned int length)
 Sets the maximum length of strings stored in this property.
unsigned int GetMaxLength () const
 Gets the maximum length of strings stored in this property.
void SetValue (const std::string &str)
 Overloaded set value method so that the new string value can be truncated if it is longer than the maximum length allowed.
virtual bool FromString (const std::string &value)
 Does the same thing as SetValue.
virtual const std::string ToString () const
 
Returns:
the same as GetValue.


Protected Member Functions

virtual ~StringActorProperty ()

Protected Attributes

unsigned int mMaxLength
 Maximum length the string for this string property can be.


Detailed Description

This actor property represents a string data member.

Where as the property has a maximum string length, by default, the string has no maximum length.


Constructor & Destructor Documentation

dtDAL::StringActorProperty::StringActorProperty ( const std::string &  name,
const std::string &  label,
Functor1< const std::string & >  set,
Functor0Ret< std::string >  get,
const std::string &  desc = "",
const std::string &  groupName = "" 
) [inline]

virtual dtDAL::StringActorProperty::~StringActorProperty (  )  [inline, protected, virtual]


Member Function Documentation

void dtDAL::StringActorProperty::SetMaxLength ( unsigned int  length  )  [inline]

Sets the maximum length of strings stored in this property.

Note:
Strings longer than this value are truncated.
Parameters:
length Max length.

unsigned int dtDAL::StringActorProperty::GetMaxLength (  )  const [inline]

Gets the maximum length of strings stored in this property.

Returns:
The maximum length of strings stored in this property.

void dtDAL::StringActorProperty::SetValue ( const std::string &  str  )  [inline]

Overloaded set value method so that the new string value can be truncated if it is longer than the maximum length allowed.

Parameters:
str The new string value to set on this property.

Reimplemented from dtDAL::GenericActorProperty< const std::string &, std::string >.

virtual bool dtDAL::StringActorProperty::FromString ( const std::string &  value  )  [inline, virtual]

Does the same thing as SetValue.

Note:
Returns false it the property is read only
Parameters:
value the value to set.
Returns:
true

Implements dtDAL::AbstractParameter.

virtual const std::string dtDAL::StringActorProperty::ToString (  )  const [inline, virtual]

Returns:
the same as GetValue.

Implements dtDAL::AbstractParameter.


Member Data Documentation

unsigned int dtDAL::StringActorProperty::mMaxLength [protected]

Maximum length the string for this string property can be.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008