SOL9 2.0 Class: Item

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * Item.h 
 * Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL++2000
#pragma once

#include <sol\object.h>
#include <sol/String.h>


namespace SOL {

class Item :public Object {
private:
    String    name;
    String    text;

public:
    Item()
    {
    }

public:
    Item(TCHAR* name1, TCHAR* text1) 
    {
        name = name1;
        text = text1;        
    }

public:
    Item(TCHAR* text1, Key n)
    {
        setText(text1);
        setId((int)n);
    }


public:
    ~Item()
    {
    }

public:
    void setText(const TCHAR* text1) 
    {    
        const TCHAR* string = text1;
        if (text1 == NULL) {
            string = _T("");
        }
        text = string;
    }


    const TCHAR*    getName() { 
        return (const TCHAR*)name; 
    }

    const TCHAR*     getText() { 
        return (const TCHAR*)text; 
    }

    void    setName(const TCHAR* name1) { 
        const TCHAR* string = name1;
        if (name1==NULL) {
            string = _T("");
        }
        name = string; 
    }

};

}



Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.