VIZ++ Class: Item

 VIZ++ Class Library  VIZ++ Samples  VIZ++ ClassTree 

Source code

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


#pragma once

#include <viz++\object.h>
#include <viz++/String.h>


namespace VIZ {

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: 10 Feb 2017

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